Commit f89be70e authored by shigemi miura's avatar shigemi miura

Web表示関連更新

parent 179391e5
......@@ -86,6 +86,9 @@
D52D213A2AEBAC0500324D58 /* HttpRequestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D21392AEBAC0500324D58 /* HttpRequestType.swift */; };
D52D213F2AEBB7D700324D58 /* RegisteredEca.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D213E2AEBB7D700324D58 /* RegisteredEca.swift */; };
D52D21412AEDE18F00324D58 /* EcaCoordinatesTable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D21402AEDE18F00324D58 /* EcaCoordinatesTable.swift */; };
D5384AFC2B306CEF006228C6 /* TermsView.html in Resources */ = {isa = PBXBuildFile; fileRef = D5384AFB2B306CEF006228C6 /* TermsView.html */; };
D5384AFE2B3121F2006228C6 /* PrivacyView.html in Resources */ = {isa = PBXBuildFile; fileRef = D5384AFD2B3121F2006228C6 /* PrivacyView.html */; };
D5384B012B312F2D006228C6 /* MenuLocalHtmlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5384B002B312F2D006228C6 /* MenuLocalHtmlView.swift */; };
D545FC742B09C74300F206D0 /* AlertManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D545FC732B09C74300F206D0 /* AlertManager.swift */; };
D545FC762B09C81300F206D0 /* PushNotificationTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D545FC752B09C81300F206D0 /* PushNotificationTypes.swift */; };
D55135202B15B030007B66B1 /* SetEcaArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = D551351F2B15B030007B66B1 /* SetEcaArea.swift */; };
......@@ -236,6 +239,9 @@
D52D21392AEBAC0500324D58 /* HttpRequestType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = HttpRequestType.swift; path = Sailassist/Http/HttpRequestType.swift; sourceTree = SOURCE_ROOT; };
D52D213E2AEBB7D700324D58 /* RegisteredEca.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = RegisteredEca.swift; path = Sailassist/ECA/RegisteredEca.swift; sourceTree = SOURCE_ROOT; };
D52D21402AEDE18F00324D58 /* EcaCoordinatesTable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = EcaCoordinatesTable.swift; path = Sailassist/ECA/EcaCoordinatesTable.swift; sourceTree = SOURCE_ROOT; };
D5384AFB2B306CEF006228C6 /* TermsView.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = TermsView.html; path = SailAssist/html/TermsView.html; sourceTree = SOURCE_ROOT; };
D5384AFD2B3121F2006228C6 /* PrivacyView.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = PrivacyView.html; path = SailAssist/html/PrivacyView.html; sourceTree = SOURCE_ROOT; };
D5384B002B312F2D006228C6 /* MenuLocalHtmlView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MenuLocalHtmlView.swift; path = Sailassist/Menu/View/MenuLocalHtmlView.swift; sourceTree = SOURCE_ROOT; };
D53ACA752B0AECF8008DCB18 /* Sailassist.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Sailassist.entitlements; path = Sailassist/Sailassist.entitlements; sourceTree = "<group>"; };
D545FC732B09C74300F206D0 /* AlertManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AlertManager.swift; path = Sailassist/VoiceManager/AlertManager.swift; sourceTree = SOURCE_ROOT; };
D545FC752B09C81300F206D0 /* PushNotificationTypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PushNotificationTypes.swift; path = Sailassist/DataSource/PushNotificationTypes.swift; sourceTree = SOURCE_ROOT; };
......@@ -324,6 +330,7 @@
020B98122AD8C3140029DE4C /* SailAssist */ = {
isa = PBXGroup;
children = (
D5384AFF2B3121FA006228C6 /* html */,
D545FC722B09C6DA00F206D0 /* VoiceManager */,
D51AA4052B099F6D00EBBDD4 /* DataSource */,
D51AA4022B099DA600EBBDD4 /* SignalR */,
......@@ -592,6 +599,7 @@
D5E008732B2ADD3F00C4070A /* MenuManualECDISView.swift */,
D5E008752B2ADD5900C4070A /* MenuManualRADARView.swift */,
D5E008772B2B022200C4070A /* MenuAboutAppView.swift */,
D5384B002B312F2D006228C6 /* MenuLocalHtmlView.swift */,
);
path = View;
sourceTree = "<group>";
......@@ -685,6 +693,15 @@
path = ECA;
sourceTree = "<group>";
};
D5384AFF2B3121FA006228C6 /* html */ = {
isa = PBXGroup;
children = (
D5384AFB2B306CEF006228C6 /* TermsView.html */,
D5384AFD2B3121F2006228C6 /* PrivacyView.html */,
);
path = html;
sourceTree = "<group>";
};
D545FC722B09C6DA00F206D0 /* VoiceManager */ = {
isa = PBXGroup;
children = (
......@@ -827,6 +844,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D5384AFE2B3121F2006228C6 /* PrivacyView.html in Resources */,
D5384AFC2B306CEF006228C6 /* TermsView.html in Resources */,
020B981B2AD8C3190029DE4C /* Preview Assets.xcassets in Resources */,
020B98182AD8C3190029DE4C /* Assets.xcassets in Resources */,
);
......@@ -1001,6 +1020,7 @@
D5E008762B2ADD5900C4070A /* MenuManualRADARView.swift in Sources */,
D59908C62B19EA70000E13DD /* ResPushHistory.swift in Sources */,
020B986C2ADD3E810029DE4C /* InTextLib.swift in Sources */,
D5384B012B312F2D006228C6 /* MenuLocalHtmlView.swift in Sources */,
02C3E5D12AFCC16800AF7837 /* ChatTitleView.swift in Sources */,
024EDE1D2B0C42F70013BAC8 /* MenuGpsSelectView.swift in Sources */,
020B98472AD8FEE30029DE4C /* ColorSet.swift in Sources */,
......@@ -1187,6 +1207,7 @@
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UIRequiresFullScreen = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = (
......@@ -1229,6 +1250,7 @@
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UIRequiresFullScreen = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = (
......@@ -1414,6 +1436,7 @@
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UIRequiresFullScreen = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = (
......
......@@ -37,6 +37,7 @@ struct ContentView: View {
selectedTabModel.activeTab = .task
}, content: {
LoginView(isLogin: $loginViewModel.isLogin)
.environmentObject(selectedTabModel)
})
}
}
......
......@@ -10,11 +10,11 @@ import Foundation
// TODO: サイトのアドレスを変更
#if CANARY
enum HttpRequestType : String {
case Terms = "https://tacmistorage.blob.core.windows.net/$web/terms/terms.mobile.html?sv=2021-10-04&st=2023-11-22T06%3A26%3A32Z&se=2023-11-23T06%3A26%3A32Z&sr=b&sp=r&sig=wS6kbbT5SvNVTkRsnRk%2BiDceZAsQ3Y56vrqTUO1X50E%3D"
// case Terms = "https://tacmistorage.blob.core.windows.net/$web/terms/terms.mobile.html?sv=2021-10-04&st=2023-11-22T06%3A26%3A32Z&se=2023-11-23T06%3A26%3A32Z&sr=b&sp=r&sig=wS6kbbT5SvNVTkRsnRk%2BiDceZAsQ3Y56vrqTUO1X50E%3D"
case RegisterLogin = "https://ssv-canary-web.azurewebsites.net/sailassistlogin"
case SitePolicy = "https://ssv-canary-web.azurewebsites.net/sitepolicy"
case CookiePolicy = "https://ssv-canary-web.azurewebsites.net/cookiepolicy"
case PrivacyPolicy = "https://ssv-canary-web.azurewebsites.net/inapp?" //+バージョン番号
// case PrivacyPolicy = "https://ssv-canary-web.azurewebsites.net/inapp?" //+バージョン番号
case TaskList = "https://ssv-canary-web.azurewebsites.net/api/sailassist/tasklist/XXXXX"
case EcaArea = "https://ssv-canary-web.azurewebsites.net/api/sailassist/ecaarea/XXXXX"
case ShipStatus = "https://ssv-canary-web.azurewebsites.net/api/sailassist/shipstatus/XXXXX"
......@@ -26,14 +26,16 @@ enum HttpRequestType : String {
case ConnectionString = "Endpoint=sb://ssv-canary-notification.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=zHzVMA757FciMum5jVG4NMl82YpYVzclUgCiKOVRKf8="
case HubName = "ssv-canary-sailassist-notification"
case storage = "https://ssvcanarystorage.z1.web.core.windows.net/"
case ContactPage = "https://www.jmarinecloud.com/eng/contact.php?type=ssv_mobile"
case ApachLicens = "https://raw.githubusercontent.com/Azure/azure-notificationhubs-ios/main/LICENSE"
}
#elseif QC
enum HttpRequestType : String {
case Terms = "https://tacmistorage.blob.core.windows.net/$web/terms/terms.mobile.html?sv=2021-10-04&st=2023-11-22T06%3A26%3A32Z&se=2023-11-23T06%3A26%3A32Z&sr=b&sp=r&sig=wS6kbbT5SvNVTkRsnRk%2BiDceZAsQ3Y56vrqTUO1X50E%3D"
// case Terms = "https://tacmistorage.blob.core.windows.net/$web/terms/terms.mobile.html?sv=2021-10-04&st=2023-11-22T06%3A26%3A32Z&se=2023-11-23T06%3A26%3A32Z&sr=b&sp=r&sig=wS6kbbT5SvNVTkRsnRk%2BiDceZAsQ3Y56vrqTUO1X50E%3D"
case RegisterLogin = "https://ssv-qc-web.azurewebsites.net/sailassistlogin"
case SitePolicy = "https://ssv-qc-web.azurewebsites.net/sitepolicy"
case CookiePolicy = "https://ssv-qc-web.azurewebsites.net/cookiepolicy"
case PrivacyPolicy = "https://ssv-qc-web.azurewebsites.net/inapp?" //+バージョン番号
// case PrivacyPolicy = "https://ssv-qc-web.azurewebsites.net/inapp?" //+バージョン番号
case TaskList = "https://ssv-qc-web.azurewebsites.net/api/sailassist/tasklist/XXXXX"
case EcaArea = "https://ssv-qc-web.azurewebsites.net/api/sailassist/ecaarea"
case ShipStatus = "https://ssv-qc-web.azurewebsites.net/api/sailassist/shipstatus/XXXXX"
......@@ -45,15 +47,17 @@ enum HttpRequestType : String {
case ConnectionString = "Endpoint=sb://ssv-qc-notification.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=qjI5K38IyGfh2arFherVgp5tNUBE2U4eVClgTEQip54="
case HubName = "ssv-qc-sailassist-notification"
case storage = "https://tacmiquaritycheckstorage.z31.web.core.windows.net/"
case ContactPage = "https://www.jmarinecloud.com/eng/contact.php?type=ssv_mobile"
case ApachLicens = "https://raw.githubusercontent.com/Azure/azure-notificationhubs-ios/main/LICENSE"
}
#else
//MARK: 運用サーバー用
enum HttpRequestType : String {
case Terms = "https://tacmistorage.blob.core.windows.net/$web/terms/terms.mobile.html?sv=2021-10-04&st=2023-11-22T06%3A26%3A32Z&se=2023-11-23T06%3A26%3A32Z&sr=b&sp=r&sig=wS6kbbT5SvNVTkRsnRk%2BiDceZAsQ3Y56vrqTUO1X50E%3D"
// case Terms = "https://tacmistorage.blob.core.windows.net/$web/terms/terms.mobile.html?sv=2021-10-04&st=2023-11-22T06%3A26%3A32Z&se=2023-11-23T06%3A26%3A32Z&sr=b&sp=r&sig=wS6kbbT5SvNVTkRsnRk%2BiDceZAsQ3Y56vrqTUO1X50E%3D"
case RegisterLogin = "https://ssv.jmarinecloud.com/sailassistlogin"
case SitePolicy = "https://ssv.jmarinecloud.com/sitepolicy"
case CookiePolicy = "https://ssv.jmarinecloud.com/cookiepolicy"
case PrivacyPolicy = "https://ssv.jmarinecloud.com/inapp?" //+バージョン番号
// case PrivacyPolicy = "https://ssv.jmarinecloud.com/inapp?" //+バージョン番号
case TaskList = "https://ssv.jmarinecloud.com/api/sailassist/tasklist/XXXXX"
case EcaArea = "https://ssv.jmarinecloud.com/api/sailassist/ecaarea"
case ShipStatus = "https://ssv.jmarinecloud.com/api/sailassist/shipstatus/XXXXX"
......@@ -65,5 +69,7 @@ enum HttpRequestType : String {
case ConnectionString = "Endpoint=sb://ssv-notification.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=IzbO7Lo+PenhlIaHBw1MA7+NE9XaLikwieOFwCzZC50="
case HubName = "ssv-sailassist-notification"
case storage = "https://tacmistorage.z31.web.core.windows.net/"
case ContactPage = "https://www.jmarinecloud.com/eng/contact.php?type=ssv_mobile"
case ApachLicens = "https://raw.githubusercontent.com/Azure/azure-notificationhubs-ios/main/LICENSE"
}
#endif
......@@ -22,9 +22,8 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
super.init()
}
func requestPermission() -> (alert: Bool, type: AlertType) {
var alert = false
let type: AlertType = .gpsPermission
func requestPermission() -> Bool {
var alert = true
locationManager.requestWhenInUseAuthorization()
locationManager.requestAlwaysAuthorization() // バックグラウンド実行中も座標取得する場合はこちら
......@@ -32,18 +31,15 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
let status = CLLocationManager().authorizationStatus
switch status {
case .authorizedAlways :
alert = false
print(debug: "authorizationStatus : .authorizedAlways") //常に利用許可
case .notDetermined:
alert = true
print(debug: "authorizationStatus : .notDetermined") //一度だけ許可
case .restricted:
alert = true
print(debug: "authorizationStatus : .restricted") //ペアレンタルコントロールなどの影響で制限中
case .denied:
alert = true
print(debug: "authorizationStatus : .denied") //利用拒否
case .authorizedWhenInUse:
alert = true
print(debug: "authorizationStatus : .authorizedWhenInUse") //使用中のみ利用許可
@unknown default:
print(debug: "authorizationStatus : Unknown")
......@@ -63,7 +59,7 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
locationManager.startUpdatingLocation()
}
return(alert, type)
return alert
}
func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
......
......@@ -21,7 +21,6 @@ enum AlertType: String {
case QrFailure
case ClientError
case Expired
case gpsPermission
}
class LoginViewParam: ObservableObject{
......@@ -35,6 +34,7 @@ let TimerInterval = 60.0 * 10.0
struct LoginView: View {
@ObservedObject var scannerViewModel = ScannerViewModel()
@EnvironmentObject var locationViewModel: LocationViewModel
@EnvironmentObject var selectedTabModel: SelectedTabModel
@Binding var isLogin: Bool
@State var isQrRead: Bool = false
@State var viewMode: LoginViewMode = .SelectType
......@@ -87,7 +87,10 @@ struct LoginView: View {
if !isProgressView {
Link("Site policy", destination: URL(string: HttpRequestType.SitePolicy.rawValue)!)
Link("Cookie policy", destination: URL(string: HttpRequestType.CookiePolicy.rawValue)!)
Link("Privacy policy", destination: URL(string: HttpRequestType.PrivacyPolicy.rawValue)!)
if let htmlPath = Bundle.main.path(forResource: "PrivacyView", ofType: "html") {
Link("Privacy policy", destination: URL(fileURLWithPath: htmlPath))
}
// Link("Privacy policy", destination: URL(string: HttpRequestType.CookiePolicy.rawValue)!)
} else {
EmptyView()
}
......@@ -122,11 +125,6 @@ struct LoginView: View {
message: Text("Expired."),
dismissButton: .default(Text("OK"), action: {viewMode = .SelectType})
)
case .gpsPermission:
return Alert(title: Text("Location"),
message: Text("To use ECA,set the permission to use location information to Always."),
dismissButton: .default(Text("Next"), action: {locationViewModel.requestPermission()})
)
}
}
}
......@@ -137,9 +135,7 @@ struct LoginView: View {
})
.onAppear() {
LoginCheck()
let result = locationViewModel.requestPermission()
isAlert = result.alert
alertType = result.type
selectedTabModel.isLocationAlert = locationViewModel.requestPermission()
}
.preferredColorScheme(.dark)
}
......@@ -302,4 +298,5 @@ fileprivate struct Triangle: Shape{
#Preview {
LoginView(isLogin: .constant(false))
.environmentObject(SelectedTabModel())
}
......@@ -151,6 +151,14 @@ struct MenuView: View {
}else if goto == .AboutApp{
MenuAboutAppView(path: $path)
.navigationBarHidden(true)
}else if goto == .TermsOfUse{
MenuLocalHtmlView(path: $path)
.navigationBarHidden(true)
}else if goto == .PrivacyStatement{
MenuLocalHtmlView(path: $path)
.navigationBarHidden(true)
}else if goto == .ContactUs{
WebView(isLoading: .constant(false), url: HttpRequestType.ContactPage.rawValue)
}else{
VStack(spacing: 0) {
MenuTitleView(path: $path, title: goto.title)
......@@ -165,11 +173,11 @@ struct MenuView: View {
.background(ColorSet.BackgroundPrimary.color)
}
}
.alert("Sign Out", isPresented: $isSignout) {
Button("Yes") {
Preferences.Id = ""
Preferences.Password = ""
Preferences.UserName = ""
loginViewModel.isLogin = false
sceneDelegate.tabWindow?.isHidden = true
}
......
......@@ -18,11 +18,11 @@ struct MenuAboutAppView: View {
HStack {
VStack(alignment: .leading, spacing: 10){
Text("Version")
.font(FontStyle.EmphasisText.font)
.font(FontStyle.SupplementText.font)
.foregroundColor(ColorSet.BodyDescriptiion.color)
#if CANARY
Text("\(version)" + " Canary")
.font(FontStyle.EmphasisText.font)
.font(FontStyle.SupplementText.font)
.foregroundColor(ColorSet.Body.color)
#elseif QC
Text("\(version)" + " QC")
......@@ -44,7 +44,7 @@ struct MenuAboutAppView: View {
Spacer().frame(height: 50)
Text("Policy")
.font(FontStyle.EmphasisText.font)
.font(FontStyle.SupplementText.font)
.foregroundColor(ColorSet.BodyDescriptiion.color)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 30)
......@@ -64,7 +64,7 @@ struct MenuAboutAppView: View {
Spacer().frame(height: 50)
Text("Open Source Licenses")
.font(FontStyle.EmphasisText.font)
.font(FontStyle.SupplementText.font)
.foregroundColor(ColorSet.BodyDescriptiion.color)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 30)
......@@ -77,6 +77,11 @@ struct MenuAboutAppView: View {
.foregroundColor(ColorSet.Body.color)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 30)
VStack(spacing: 30) {
Link("https://github.com/Azure/azure-notificationhubs-ios/blob/main/LICENSE", destination: URL(string: HttpRequestType.ApachLicens.rawValue)!)
}
.font(FontStyle.RadioButtonText.font)
.foregroundColor(ColorSet.Body.color)
Spacer()
}
.background(ColorSet.BackgroundPrimary.color)
......
//
// MenuLocalHtmlView.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/12/19.
//
import Foundation
import SwiftUI
struct MenuLocalHtmlView: View {
@State var isAlert: Bool = false
@Binding var path : [MenuPath]
var body: some View {
VStack{
let aaa = path
MenuTitleView(path: $path, title: MenuPath.ManualRADAR.title)
// if content.rawValue != "TermsOfUse" {
// if let htmlPath = Bundle.main.path(forResource: "TermsView", ofType: "html") {
// WebView(isLoading: .constant(false), url: htmlPath)
// }
// } else if content.rawValue != "PrivacyStatement" {
// if let htmlPath = Bundle.main.path(forResource: "PrivacyView", ofType: "html") {
// WebView(isLoading: .constant(false), url: htmlPath)
// }
// }
Spacer()
}
.background(ColorSet.BackgroundPrimary.color)
.alert("delete", isPresented: $isAlert) {
Button(role: .destructive) {
} label: {
Text("delete")
}
} message: {
Text("eca delete")
}
}
}
#Preview {
MenuLocalHtmlView(path: .constant([.ManualRADAR]))
}
......@@ -16,13 +16,15 @@ struct SailassistApp: App {
@State private var isPrivAgree = Preferences.privacyPolicyAgreeDate != nil
let locationViewModel = LocationViewModel()
// let signalRService = SignalRService()
let signalRService = SignalRService()
var body: some Scene {
WindowGroup {
if !isTermsAgree{
VStack(spacing: 0){
WebView(isLoading: .constant(false), url: HttpRequestType.Terms.rawValue)
if let htmlPath = Bundle.main.path(forResource: "TermsView", ofType: "html") {
WebView(isLoading: .constant(false), url: htmlPath)
}
YesNoButtons(yesTitle: "Accept", noTitle: "Cancel") {
Preferences.termsAgreeDate_Int64 = DateTextLib.Date2UnixTime(date: Date())
......@@ -35,7 +37,9 @@ struct SailassistApp: App {
}else if !isPrivAgree{
VStack(spacing: 0){
WebView(isLoading: .constant(false), url: HttpRequestType.Terms.rawValue)
if let htmlPath = Bundle.main.path(forResource: "PrivacyView", ofType: "html") {
WebView(isLoading: .constant(false), url: htmlPath)
}
YesNoButtons(yesTitle: "Accept", noTitle: "Cancel") {
Preferences.privacyPolicyAgreeDate_Int64 = DateTextLib.Date2UnixTime(date: Date())
......
......@@ -110,12 +110,11 @@ struct CustomTabBar: View {
} message: {
Text("Do you change an emargency mode?")
}
.alert("location", isPresented: $isLocationAlert) {
Button("Next") {
print("")
.alert("location", isPresented: $selectedTabModel.isLocationAlert) {
Button("OK") {
}
} message: {
Text("To use ECA,set the permission to use location information to Always.")
Text("To use ECA,set the permission to use location information to ALWAYS.")
}
}
}
......
......@@ -11,4 +11,5 @@ import SwiftUI
class SelectedTabModel: ObservableObject {
@Published var activeTab: Tab = .task
@Published var isShowChangeEmrMode: Bool = false
@Published var isLocationAlert: Bool = false
}
......@@ -13,7 +13,13 @@ struct WebView: UIViewRepresentable {
var url : String
func makeUIView(context: Context) -> WKWebView {
let request = URLRequest(url: URL(string: url)!)
var address: URL
if url.contains("https://") {
address = URL(string: url)!
} else {
address = URL(fileURLWithPath: url)
}
let request = URLRequest(url: address)
let webView = WKWebView()
webView.navigationDelegate = context.coordinator
webView.load(request)
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Privacy Statement</title>
</head>
<body>
<h1>Privacy Statement</h1>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Sail Assist Application Terms of Use</title>
</head>
<body>
<h1>Sail Assist Application Terms of Use</h1>
<p>These Terms of Use (the "Terms") set forth the terms of use between a Customer (meaning a customer who has executed an SSV Service Contract as defined in Article 4 with Japan Radio Co., Ltd. ("JRC") or any of its subsidiaries or agencies or other third parties to which JRC outsources services (collectively, the "JRC Agencies, etc."); the same applies hereinafter), on the one hand, and JRC and the JRC Agencies, etc., on the other hand, for the Customer's use of the Software (as defined in Article 1, paragraph 1) provided through the Website (meaning the "Website" as defined in Article 1, paragraph 3 below; the same applies hereinafter) operated by JRC. Only after reading and accepting the provisions of these Terms shall the Customer be entitled to use the Software and Data (meaning "Data" as defined in Article 1, paragraph 2; the same applies hereinafter) downloaded within the Software.</p>
<p>Article 1: Definitions</p>
<p>1. "Software" means an application for smart devices (the "Intended Products") which is a set of programs comprising the "SSV Mobile" application (the "Application"), an application for ship management linked to JRC's information websites. "Software" includes any updated versions of the programs in the event of an update of the Software.</p>
<p>2. "Data" means all data used by the Software.</p>
<p>3. "Website" means "J-Marine Cloud," a website for providing information which is operated by JRC and provides various information for ships.</p>
<p>Article 2: Intellectual Property Rights</p>
<p>All intellectual property rights in the Software are the property of JRC or the third parties which licensed rights to JRC. The granting to the Customer hereunder of a license to use the Software does not mean any transfer of rights or whatsoever to the Customer.</p>
<p>Article 3: Grant of License</p>
<p>JRC grants to the Customer a non-exclusive, non-transferable right to use the Software, solely on the Customer's Intended Product in accordance with these Terms and for the purpose of using various features related to the Application.</p>
<p>Article 4: Conditions of Use</p>
<p>1. The Customer acknowledges that the Customer will comply with all applicable laws and regulations in, and is solely responsible for, downloading, installing, uninstalling and using the Software, including creating, maintaining and managing an environment required to use the Software.</p>
<p>2. Use of the Software separately requires the execution of a Smart Ship Viewer Service Contract (an "SSV Service Contract"). The execution of an SSV Service Contract shall be subject to "II. Service Contract and Use" of the terms of use of the Website. The Customer acknowledges that the Software cannot be used if an SSV Service Contract has not been executed or if the "Smart Ship Viewer" is not available on the ship.</p>
<p>3. Use of the Software separately attracts packet communication fees.</p>
<p>4. In some cases, the Software may not be able to be used with the latest data due to a temporary inability to download Data caused by the location being outside the network connection area or by a deterioration of the communication environment.</p>
<p>5. The Customer acknowledges that if the Software or Data is deleted or uninstalled, all Data downloaded by the Customer to the customer's Intended Product will be deleted entirely.</p>
<p>Article 5: Prohibited Activities</p>
<p>1. Unless expressly permitted on the Software, JRC prohibits the Customer from reprinting, copying, reproducing, transferring, extracting, processing, modifying, making transmittable, or making any other secondary use of, the Software or Data, or lending, selling, redistributing, transmitting to the public or sublicensing, or otherwise allowing or causing third parties to use, the Software or Data. The Customer may not analyze or modify the Software or Data by disassembling, decompiling, reverse engineering or otherwise.</p>
<p>2. The Customer shall not engage in any act which: (i) infringes or may infringe any rights of JRC or any other third party in the Software or Data; (ii) causes or may cause disadvantage or damage to JRC or any other third party; or (iii) interferes or may interfere with the operation of the Software.</p>
<p>3. The Customer shall not use the Software or Data for profit or commercial purposes.</p>
<p>Article 6: Disclaimer</p>
<p>1. JRC and the JRC Agencies, etc. shall be released from any liability for any damage incurred by the Customer or any third party due to any cause not attributable to JRC or the JRC Agencies, etc. or as a result of any of the following events:</p>
<Label Style="{StaticResource SubListStyle}">(1) The Customer's breach of these Terms.</p>
<Label Style="{StaticResource SubListStyle}">(2) Any inconsistency between Data and the actual condition (including in terms of dispatch and receipt of notices and data synchronization).</p>
<Label Style="{StaticResource SubListStyle}">(3) Use of any of the Software on anything other than the devices on which the Software allowed to be used (i.e., other than the Intended Products).</p>
<Label Style="{StaticResource SubListStyle}">(4) Any adaptation or modification of the Software.</p>
<Label Style="{StaticResource SubListStyle}">(5) Any combination with other data or program or product.</p>
<Label Style="{StaticResource SubListStyle}">(6) Any viral infection.</p>
<Label Style="{StaticResource SubListStyle}">(7) Any act of God or other force majeure.</p>
<Label Style="{StaticResource SubListStyle}">(8) Any other event in which, in JRC's opinion, the Customer has engaged in an inappropriate action or omission.</p>
<Label Style="{StaticResource SubListStyle}">(9) Any other cause not attributable to JRC or the JRC Agencies, etc.</p>
<p>2. JRC and the JRC Agencies, etc. make no warranty to the Customer against defects, etc. in the operation of the Intended Products or the Software in the event set forth in item (3) of the preceding paragraph.</p>
<p>3. If the Customer is for any reason able to use the Software on a ship not covered by the contract and if such ship incurs any damage as a result of such use of the Software, JRC and the JRC Agencies, etc. shall assume no liability for such damage.</p>
<p>4. The location information provided by the Software may differ from the actual condition. The Software is provided on an “as is” basis. JRC and the JRC Agencies, etc. make no warranty, express or implied, for the Software including the accuracy, completeness or fitness for a particular purpose of any information provided by the Software or the normal operation or functionality of the Software on the Intended Products.</p>
<p>5. JRC and the JRC Agencies, etc. make no warranty, express or implied, for the Software's non-infringement of third-party intellectual property rights.</p>
<p>6. If the Customer cannot use the Software. due to a deterioration of the communication environment in which communication for the Software (including communication through which the Customer uses the Software, communication through which data is transmitted from the Customer's ship, etc.to the Website, and communication between an external data provider contracted by JRC and the Website) takes place or due to any other trouble, JRC and the JRC Agencies, etc. shall assume no liability for any damage incurred by the Customer.</p>
<p>7. Other than as set forth in the preceding six paragraphs, JRC and the JRC Agencies, etc. shall assume no liability for the Customer's inability to use any of the Software or for any damage (including, without limitation, damage caused by an accident or lost operating profit) incurred by the Customer in connection with his/her/its use of the Software, except in the event of intent or gross negligence on the part of JRC or any of the JRC Agencies, etc. If the Customer incurs any damage due to intent or gross negligence on the part of JRC or any of the JRC Agencies, etc., JRC and the JRC Agencies, etc. shall assume liability to compensate for such damage within the extent of damage that can normally occur and up to the amount of usage fees for the Paid Services (meaning the Paid Services as set forth in the terms of use of the Website) (or the amount equivalent to one [1] month's usage fee in the case of a continuous service) paid by the Customer for his/her/its use of the Website, including the Software.</p>
<p>Article 7: Change, Suspension and Discontinuation of the Software</p>
<p>1. JRC may, without prior notice and at its own discretion, improve the features for, add, discontinue, change, delete or make inaccessible, the content and the distribution method of the Software, and JRC and the JRC Agencies, etc. shall assume no liability to compensate for any damage incurred by the Customer as a result of such improvement of the features, addition, discontinuation, changes, deletion or inaccessibility.</p>
<p>2. JRC may, without prior notice to the Customer, suspend all or part of the distribution of the Software in the event of necessity for, among other things, regular or emergency maintenance of, or works on, or measures against failures of, the equipment, etc. required for the distribution of the Software, or in cases where the distribution of the Software becomes impossible due to an accident, act of God, force majeure, discontinuation of the provision of telecommunications services by a telecommunications carrier, or any other cause not attributable to JRC, or where JRC considers that such suspension is inevitable for operational or technical reasons. In such case, JRC and the JRC Agencies, etc. shall assume no liability to compensate the Customer for any damage incurred by the Customer.</p>
<p>Article 8: Handling of Personal Information</p>
<p>1. JRC and the JRC Agencies, etc. will comply with the Act on the Protection of Personal Information and all other applicable laws and regulations, and will handle, pursuant to the Privacy Statement (https://www.jrc.co.jp/eng/privacy.html) separately published by JRC, all personal information of the Customer obtained by JRC in the course of the Customer’s use of the Software.</p>
<p>2. JRC and the JRC Agencies, etc. shall use personal information obtained from the Customer for the following purposes:</p>
<Label Style="{StaticResource SubListStyle}">(1) Operating the Software and completing various procedures.</p>
<Label Style="{StaticResource SubListStyle}">(2) Providing notifications regarding the Software and maintaining and changing, and dealing with failures in, the Software</p>
<Label Style="{StaticResource SubListStyle}">(3) Receiving opinions and suggestions from the Customer.</p>
<Label Style="{StaticResource SubListStyle}">(4) Responding to the Customer’s inquiries and requests for documents.</p>
<Label Style="{StaticResource SubListStyle}">(5) Conducting market research and developing new products and services.</p>
<Label Style="{StaticResource SubListStyle}">(6) Providing information on various events, seminars, promotional campaigns, members-only services, etc.</p>
<Label Style="{StaticResource SubListStyle}">(7) Providing email delivery services and sending published materials, etc.</p>
<Label Style="{StaticResource SubListStyle}">(8) Providing information on products and services handled by JRC or its business partners.</p>
<Label Style="{StaticResource SubListStyle}">(9) Conducting confirmation activities for accounting audit purposes.</p>
<Label Style="{StaticResource SubListStyle}">(10) Any other matter incidental or related to JRC's business.</p>
<p>3. Except for personally identifiable information, personal information obtained by JRC may be provided to third parties.</p>
<p>Article 9: Cautions</p>
<p>1. The Customer is advised not to operate or watch his/her/its Intended Product and the Software while operating a ship, etc. or a vehicle, etc. (including a car, motorcycle, bicycle, etc.; the same applies hereinafter), as doing so would entail great risk. The Customer is advised to always anchor the ship, etc. or park the vehicle, etc. in a safe place before operating or watching the Intended Product and the Software. JRC and the JRC Agencies, etc. shall assume no liability for any accident, etc. caused by the Customer while operating or watching the Intended Product and the Software.</p>
<p>2. Information provided by the Software may differ from the actual condition. The Customer shall use the Software at his/her/its own risk, in accordance with the actual condition and all applicable marine traffic rules and all applicable traffic rules for vehicles, etc.</p>
<p>3. JRC will not take backups of data provided by the Software or transmitted by the Client to the Website and will not recover data in the event of loss of data. JRC and the JRC Agencies, etc. shall assume no liability for any loss of data related to the Software.</p>
<p>Article 10: Amendment</p>
<p>JRC may amend all or part of these Terms without prior notice to the Customer and without the consent of the Customer. Any amended Terms shall become effective upon being posted on the Website. In such case, the Customer shall comply with the amended Terms.</p>
<p>Article 11: Termination</p>
<p>If the Customer breaches or is likely to breach these Terms, JRC may, without any notice or demand, suspend or terminate the provision of the Software to the Customer. These articles does not release the Customer from any liability to compensate for damage.</p>
<p>Article 12: Governing Law and Jurisdiction</p>
<p>These Terms shall be governed by the laws of Japan. In the event of any question or dispute arising in relation to these Terms between the Customer and JRC or any of the JRC Agencies, etc., such question or dispute shall be resolved through good-faith consultation, failing which the parties agree that the Tokyo District Court shall have exclusive jurisdiction as the court of first instance over such question or dispute.</p>
<p>Supplementary Provisions:</p>
<p>Effective date: April 1, 2019</p>
<p>Copyright 2019 JRC NihonMusen All Rights Reserved.</p>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment