Commit 08eaee57 authored by shigemi miura's avatar shigemi miura

新ログイン対応

Information削除
parent 22f57ea7
...@@ -90,9 +90,10 @@ ...@@ -90,9 +90,10 @@
D52D21412AEDE18F00324D58 /* EcaCoordinatesTable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D21402AEDE18F00324D58 /* EcaCoordinatesTable.swift */; }; D52D21412AEDE18F00324D58 /* EcaCoordinatesTable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52D21402AEDE18F00324D58 /* EcaCoordinatesTable.swift */; };
D5384AFC2B306CEF006228C6 /* TermsView.html in Resources */ = {isa = PBXBuildFile; fileRef = D5384AFB2B306CEF006228C6 /* TermsView.html */; }; D5384AFC2B306CEF006228C6 /* TermsView.html in Resources */ = {isa = PBXBuildFile; fileRef = D5384AFB2B306CEF006228C6 /* TermsView.html */; };
D5384AFE2B3121F2006228C6 /* PrivacyView.html in Resources */ = {isa = PBXBuildFile; fileRef = D5384AFD2B3121F2006228C6 /* PrivacyView.html */; }; D5384AFE2B3121F2006228C6 /* PrivacyView.html in Resources */ = {isa = PBXBuildFile; fileRef = D5384AFD2B3121F2006228C6 /* PrivacyView.html */; };
D5384B012B312F2D006228C6 /* MenuLocalHtmlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5384B002B312F2D006228C6 /* MenuLocalHtmlView.swift */; }; D53B97262B341867000B3D29 /* AboutAppView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53B97252B341867000B3D29 /* AboutAppView.swift */; };
D545FC742B09C74300F206D0 /* AlertManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D545FC732B09C74300F206D0 /* AlertManager.swift */; }; D545FC742B09C74300F206D0 /* AlertManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D545FC732B09C74300F206D0 /* AlertManager.swift */; };
D545FC762B09C81300F206D0 /* PushNotificationTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D545FC752B09C81300F206D0 /* PushNotificationTypes.swift */; }; D545FC762B09C81300F206D0 /* PushNotificationTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D545FC752B09C81300F206D0 /* PushNotificationTypes.swift */; };
D54D174B2B35137A00A0EAA5 /* LocalWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D54D174A2B35137A00A0EAA5 /* LocalWebView.swift */; };
D55135202B15B030007B66B1 /* SetEcaArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = D551351F2B15B030007B66B1 /* SetEcaArea.swift */; }; D55135202B15B030007B66B1 /* SetEcaArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = D551351F2B15B030007B66B1 /* SetEcaArea.swift */; };
D55135222B15C062007B66B1 /* GetEcaList.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55135212B15C062007B66B1 /* GetEcaList.swift */; }; D55135222B15C062007B66B1 /* GetEcaList.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55135212B15C062007B66B1 /* GetEcaList.swift */; };
D55135242B15C3BF007B66B1 /* DeleteEcaArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55135232B15C3BF007B66B1 /* DeleteEcaArea.swift */; }; D55135242B15C3BF007B66B1 /* DeleteEcaArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55135232B15C3BF007B66B1 /* DeleteEcaArea.swift */; };
...@@ -245,10 +246,11 @@ ...@@ -245,10 +246,11 @@
D52D21402AEDE18F00324D58 /* EcaCoordinatesTable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = EcaCoordinatesTable.swift; path = Sailassist/ECA/EcaCoordinatesTable.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; }; 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; }; 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>"; }; D53ACA752B0AECF8008DCB18 /* Sailassist.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Sailassist.entitlements; path = Sailassist/Sailassist.entitlements; sourceTree = "<group>"; };
D53B97252B341867000B3D29 /* AboutAppView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AboutAppView.swift; path = Sailassist/Login/AboutAppView.swift; sourceTree = SOURCE_ROOT; };
D545FC732B09C74300F206D0 /* AlertManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AlertManager.swift; path = Sailassist/VoiceManager/AlertManager.swift; sourceTree = SOURCE_ROOT; }; 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; }; D545FC752B09C81300F206D0 /* PushNotificationTypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PushNotificationTypes.swift; path = Sailassist/DataSource/PushNotificationTypes.swift; sourceTree = SOURCE_ROOT; };
D54D174A2B35137A00A0EAA5 /* LocalWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LocalWebView.swift; path = Sailassist/Menu/View/LocalWebView.swift; sourceTree = SOURCE_ROOT; };
D551351F2B15B030007B66B1 /* SetEcaArea.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SetEcaArea.swift; path = Sailassist/ECA/SetEcaArea.swift; sourceTree = SOURCE_ROOT; }; D551351F2B15B030007B66B1 /* SetEcaArea.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SetEcaArea.swift; path = Sailassist/ECA/SetEcaArea.swift; sourceTree = SOURCE_ROOT; };
D55135212B15C062007B66B1 /* GetEcaList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = GetEcaList.swift; path = Sailassist/ECA/GetEcaList.swift; sourceTree = SOURCE_ROOT; }; D55135212B15C062007B66B1 /* GetEcaList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = GetEcaList.swift; path = Sailassist/ECA/GetEcaList.swift; sourceTree = SOURCE_ROOT; };
D55135232B15C3BF007B66B1 /* DeleteEcaArea.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DeleteEcaArea.swift; path = Sailassist/ECA/DeleteEcaArea.swift; sourceTree = SOURCE_ROOT; }; D55135232B15C3BF007B66B1 /* DeleteEcaArea.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DeleteEcaArea.swift; path = Sailassist/ECA/DeleteEcaArea.swift; sourceTree = SOURCE_ROOT; };
...@@ -398,6 +400,7 @@ ...@@ -398,6 +400,7 @@
020B98402AD8C3810029DE4C /* LoginView.swift */, 020B98402AD8C3810029DE4C /* LoginView.swift */,
020B98492AD915510029DE4C /* ViewModel */, 020B98492AD915510029DE4C /* ViewModel */,
020B98482AD915480029DE4C /* View */, 020B98482AD915480029DE4C /* View */,
D53B97252B341867000B3D29 /* AboutAppView.swift */,
); );
path = Login; path = Login;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -604,7 +607,7 @@ ...@@ -604,7 +607,7 @@
D5E008732B2ADD3F00C4070A /* MenuManualECDISView.swift */, D5E008732B2ADD3F00C4070A /* MenuManualECDISView.swift */,
D5E008752B2ADD5900C4070A /* MenuManualRADARView.swift */, D5E008752B2ADD5900C4070A /* MenuManualRADARView.swift */,
D5E008772B2B022200C4070A /* MenuAboutAppView.swift */, D5E008772B2B022200C4070A /* MenuAboutAppView.swift */,
D5384B002B312F2D006228C6 /* MenuLocalHtmlView.swift */, D54D174A2B35137A00A0EAA5 /* LocalWebView.swift */,
); );
path = View; path = View;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -997,6 +1000,7 @@ ...@@ -997,6 +1000,7 @@
025F99702B2AC2C100C9A18A /* YesNoButtons.swift in Sources */, 025F99702B2AC2C100C9A18A /* YesNoButtons.swift in Sources */,
025C27FE2B0206D700BADC49 /* PDFDownloadManager.swift in Sources */, 025C27FE2B0206D700BADC49 /* PDFDownloadManager.swift in Sources */,
D59908CA2B1AC381000E13DD /* GetPushHistory.swift in Sources */, D59908CA2B1AC381000E13DD /* GetPushHistory.swift in Sources */,
D54D174B2B35137A00A0EAA5 /* LocalWebView.swift in Sources */,
025C27FC2AFE191A00BADC49 /* MenuManualView.swift in Sources */, 025C27FC2AFE191A00BADC49 /* MenuManualView.swift in Sources */,
D58E1F502B142A260092D8FE /* EcaArea.swift in Sources */, D58E1F502B142A260092D8FE /* EcaArea.swift in Sources */,
020B98592AD92A4C0029DE4C /* MainTabView.swift in Sources */, 020B98592AD92A4C0029DE4C /* MainTabView.swift in Sources */,
...@@ -1004,6 +1008,7 @@ ...@@ -1004,6 +1008,7 @@
D5AE351A2AEBA66A00059889 /* ReqLogin.swift in Sources */, D5AE351A2AEBA66A00059889 /* ReqLogin.swift in Sources */,
020B98512AD9189A0029DE4C /* InputIdPassWordView.swift in Sources */, 020B98512AD9189A0029DE4C /* InputIdPassWordView.swift in Sources */,
D52D213A2AEBAC0500324D58 /* HttpRequestType.swift in Sources */, D52D213A2AEBAC0500324D58 /* HttpRequestType.swift in Sources */,
D53B97262B341867000B3D29 /* AboutAppView.swift in Sources */,
D5258CA12B03593500365276 /* SessionMonitoringRoute.swift in Sources */, D5258CA12B03593500365276 /* SessionMonitoringRoute.swift in Sources */,
D5E03A672B04484D00D65FCE /* SessionTaskList.swift in Sources */, D5E03A672B04484D00D65FCE /* SessionTaskList.swift in Sources */,
020B986E2ADD3E8D0029DE4C /* DateTextLib.swift in Sources */, 020B986E2ADD3E8D0029DE4C /* DateTextLib.swift in Sources */,
...@@ -1028,7 +1033,6 @@ ...@@ -1028,7 +1033,6 @@
D5E008762B2ADD5900C4070A /* MenuManualRADARView.swift in Sources */, D5E008762B2ADD5900C4070A /* MenuManualRADARView.swift in Sources */,
D59908C62B19EA70000E13DD /* ResPushHistory.swift in Sources */, D59908C62B19EA70000E13DD /* ResPushHistory.swift in Sources */,
020B986C2ADD3E810029DE4C /* InTextLib.swift in Sources */, 020B986C2ADD3E810029DE4C /* InTextLib.swift in Sources */,
D5384B012B312F2D006228C6 /* MenuLocalHtmlView.swift in Sources */,
02C3E5D12AFCC16800AF7837 /* ChatTitleView.swift in Sources */, 02C3E5D12AFCC16800AF7837 /* ChatTitleView.swift in Sources */,
024EDE1D2B0C42F70013BAC8 /* MenuGpsSelectView.swift in Sources */, 024EDE1D2B0C42F70013BAC8 /* MenuGpsSelectView.swift in Sources */,
020B98472AD8FEE30029DE4C /* ColorSet.swift in Sources */, 020B98472AD8FEE30029DE4C /* ColorSet.swift in Sources */,
......
...@@ -13,7 +13,7 @@ enum HttpRequestType : String { ...@@ -13,7 +13,7 @@ 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 RegisterLogin = "https://ssv-canary-web.azurewebsites.net/sailassistlogin"
case SitePolicy = "https://ssv-canary-web.azurewebsites.net/sitepolicy" case SitePolicy = "https://ssv-canary-web.azurewebsites.net/sitepolicy"
case CookiePolicy = "https://ssv-canary-web.azurewebsites.net/cookiepolicy" // 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 TaskList = "https://ssv-canary-web.azurewebsites.net/api/sailassist/tasklist/XXXXX"
case EcaArea = "https://ssv-canary-web.azurewebsites.net/api/sailassist/ecaarea/XXXXX" case EcaArea = "https://ssv-canary-web.azurewebsites.net/api/sailassist/ecaarea/XXXXX"
...@@ -35,7 +35,7 @@ enum HttpRequestType : String { ...@@ -35,7 +35,7 @@ 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 RegisterLogin = "https://ssv-qc-web.azurewebsites.net/sailassistlogin"
case SitePolicy = "https://ssv-qc-web.azurewebsites.net/sitepolicy" case SitePolicy = "https://ssv-qc-web.azurewebsites.net/sitepolicy"
case CookiePolicy = "https://ssv-qc-web.azurewebsites.net/cookiepolicy" // 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 TaskList = "https://ssv-qc-web.azurewebsites.net/api/sailassist/tasklist/XXXXX"
case EcaArea = "https://ssv-qc-web.azurewebsites.net/api/sailassist/ecaarea" case EcaArea = "https://ssv-qc-web.azurewebsites.net/api/sailassist/ecaarea"
...@@ -58,7 +58,7 @@ enum HttpRequestType : String { ...@@ -58,7 +58,7 @@ 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 RegisterLogin = "https://ssv.jmarinecloud.com/sailassistlogin"
case SitePolicy = "https://ssv.jmarinecloud.com/sitepolicy" case SitePolicy = "https://ssv.jmarinecloud.com/sitepolicy"
case CookiePolicy = "https://ssv.jmarinecloud.com/cookiepolicy" // 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 TaskList = "https://ssv.jmarinecloud.com/api/sailassist/tasklist/XXXXX"
case EcaArea = "https://ssv.jmarinecloud.com/api/sailassist/ecaarea" case EcaArea = "https://ssv.jmarinecloud.com/api/sailassist/ecaarea"
......
...@@ -10,10 +10,14 @@ import Foundation ...@@ -10,10 +10,14 @@ import Foundation
struct ReqLogin : Codable { struct ReqLogin : Codable {
var id: String var id: String
var password: String var password: String
var deviceid: String
var username: String
init(Id: String, Password: String) { init(Id: String, Password: String, DeviceId: String, UserName: String) {
self.id = Id self.id = Id
self.password = Password self.password = Password
self.deviceid = DeviceId
self.username = UserName
} }
} }
......
//
// AboutAppView.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/12/21.
//
import SwiftUI
import PDFKit
enum Policy: String, Hashable{
case TermsOfUse
case PrivacyStatement
var title: String{
switch self {
case .TermsOfUse:
"Terms Of Use"
case .PrivacyStatement:
"Privacy Statement"
}
}
}
struct AboutAppView: View {
// @State var policy: Policy = .TermsOfUse
let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String
var body: some View {
VStack{
HStack {
VStack(alignment: .leading, spacing: 10){
Text("Version")
.font(FontStyle.SupplementText.font)
.foregroundColor(ColorSet.BodyDescriptiion.color)
#if CANARY
Text("\(version)" + " Canary")
.font(FontStyle.SupplementText.font)
.foregroundColor(ColorSet.Body.color)
.padding(.leading, 20)
#elseif QC
Text("\(version)" + " QC")
.font(FontStyle.TitleS.font)
.foregroundColor(ColorSet.Body.color)
#else
Text("\(version)")
.font(FontStyle.TitleS.font)
.foregroundColor(ColorSet.Body.color)
#endif
}
.padding(.horizontal, 30)
.padding(.vertical, 17)
Spacer()
}
Divider()
.background(ColorSet.LineColor04.color)
Spacer().frame(height: 50)
Text("Policy")
.font(FontStyle.SupplementText.font)
.foregroundColor(ColorSet.BodyDescriptiion.color)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 30)
Divider()
.background(ColorSet.LineColor04.color)
HStack {
NavigationLink {
LocalWebView()
} label: {
Text("Terms Of Use")
.font(FontStyle.EmphasisText.font)
.foregroundColor(ColorSet.Body.color)
Spacer()
Image("ink_01")
.resizable()
.frame(width: 22, height: 22)
}
.padding(.vertical, 17)
.padding(.horizontal, 30)
}
HStack {
NavigationLink {
// policy = PrivacyStatement
LocalWebView()
} label: {
Text("Privacy Statement")
.font(FontStyle.EmphasisText.font)
.foregroundColor(ColorSet.Body.color)
Spacer()
Image("ink_01")
.resizable()
.frame(width: 22, height: 22)
}
.padding(.vertical, 17)
.padding(.horizontal, 30)
}
Spacer().frame(height: 50)
Text("Open Source Licenses")
.font(FontStyle.SupplementText.font)
.foregroundColor(ColorSet.BodyDescriptiion.color)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 30)
Divider()
.background(ColorSet.LineColor04.color)
Text("Azure Notification Hubs SDK for Apple")
.font(FontStyle.EmphasisText.font)
.foregroundColor(ColorSet.Body.color)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 50)
.padding(.top, 17)
VStack(spacing: 30) {
Link("https://github.com/Azure/azure-notificationhubs-ios/blob/main/LICENSE", destination: URL(string: HttpRequestType.ApachLicens.rawValue)!)
}
.padding(.top, 2)
.padding(.horizontal, 50)
.font(FontStyle.RadioButtonText.font)
.foregroundColor(ColorSet.Body.color)
Spacer()
}
.background(ColorSet.BackgroundPrimary.color)
}
}
#Preview {
AboutAppView()
}
...@@ -26,6 +26,7 @@ enum AlertType: String { ...@@ -26,6 +26,7 @@ enum AlertType: String {
class LoginViewParam: ObservableObject{ class LoginViewParam: ObservableObject{
@Published var shipId: String = "" @Published var shipId: String = ""
@Published var password: String = "" @Published var password: String = ""
@Published var deviceid: String = ""
@Published var userName: String = "" @Published var userName: String = ""
} }
...@@ -47,6 +48,7 @@ struct LoginView: View { ...@@ -47,6 +48,7 @@ struct LoginView: View {
let sessionLogin = SessionLogin() let sessionLogin = SessionLogin()
var body: some View { var body: some View {
NavigationView {
ZStack{ ZStack{
Triangle() Triangle()
.fill(ColorSet.LoginBk03.color) .fill(ColorSet.LoginBk03.color)
...@@ -71,9 +73,9 @@ struct LoginView: View { ...@@ -71,9 +73,9 @@ struct LoginView: View {
case .SelectType: case .SelectType:
LoginTypeSelectView(isQrRead: $scannerViewModel.isShowing, viewMode: $viewMode) LoginTypeSelectView(isQrRead: $scannerViewModel.isShowing, viewMode: $viewMode)
case .InputIdPassword: case .InputIdPassword:
InputIdPassWordView(isLogin: $isLogin, viewMode: $viewMode, param: $loginViewParam, isProgressView: $isProgressView, isAlert: $isAlert, alertType: $alertType) InputIdPassWordView(viewMode: $viewMode, param: $loginViewParam)
case .InputUserName: case .InputUserName:
InputUserNameView(isLogin: $isLogin, param: $loginViewParam, viewMode: $viewMode) InputUserNameView(isLogin: $isLogin, param: $loginViewParam, viewMode: $viewMode, isProgressView: $isProgressView, isAlert: $isAlert, alertType: $alertType)
} }
} else { } else {
Text("Login Check").padding() Text("Login Check").padding()
...@@ -85,12 +87,13 @@ struct LoginView: View { ...@@ -85,12 +87,13 @@ struct LoginView: View {
VStack(spacing: 40){ VStack(spacing: 40){
VStack(spacing: 30) { VStack(spacing: 30) {
if !isProgressView { if !isProgressView {
Link("Site policy", destination: URL(string: HttpRequestType.SitePolicy.rawValue)!) // Link("Information", destination: URL(string: HttpRequestType.SitePolicy.rawValue)!)
Link("Cookie policy", destination: URL(string: HttpRequestType.CookiePolicy.rawValue)!) Link("Contact Us", destination: URL(string: HttpRequestType.ContactPage.rawValue)!)
if let htmlPath = Bundle.main.path(forResource: "PrivacyView", ofType: "html") { NavigationLink {
Link("Privacy policy", destination: URL(fileURLWithPath: htmlPath)) AboutAppView()
} label: {
Text("About This App")
} }
// Link("Privacy policy", destination: URL(string: HttpRequestType.CookiePolicy.rawValue)!)
} else { } else {
EmptyView() EmptyView()
} }
...@@ -139,13 +142,16 @@ struct LoginView: View { ...@@ -139,13 +142,16 @@ struct LoginView: View {
} }
.preferredColorScheme(.dark) .preferredColorScheme(.dark)
} }
}
func LoginCheckQR() -> () { func LoginCheckQR() -> () {
isProgressView = true isProgressView = true
loginViewParam.shipId = Preferences.Id loginViewParam.shipId = Preferences.Id
loginViewParam.password = Preferences.Password loginViewParam.password = Preferences.Password
loginViewParam.deviceid = Preferences.DeviceId
loginViewParam.userName = Preferences.UserName
let login = ReqLogin(Id: Preferences.Id, Password: Preferences.Password) let login = ReqLogin(Id: Preferences.Id, Password: Preferences.Password, DeviceId: Preferences.DeviceId, UserName: Preferences.UserName)
sessionLogin.RequestLogin(login, completion: responseQrLogin) sessionLogin.RequestLogin(login, completion: responseQrLogin)
} }
...@@ -155,9 +161,9 @@ struct LoginView: View { ...@@ -155,9 +161,9 @@ struct LoginView: View {
let interval = Date.now.timeIntervalSince(lastDate) let interval = Date.now.timeIntervalSince(lastDate)
if interval < 2592000 { if interval < 2592000 {
if Preferences.Id != "" && Preferences.Password != "" && Preferences.UserName != ""{ if Preferences.Id != "" && Preferences.Password != "" && Preferences.UserName != "" && Preferences.DeviceId != ""{
isProgressView = true isProgressView = true
let login = ReqLogin(Id: Preferences.Id, Password: Preferences.Password) let login = ReqLogin(Id: Preferences.Id, Password: Preferences.Password, DeviceId: Preferences.DeviceId, UserName: Preferences.UserName)
sessionLogin.RequestLogin(login, completion: responseLogin) sessionLogin.RequestLogin(login, completion: responseLogin)
} }
} }
......
...@@ -9,15 +9,10 @@ import SwiftUI ...@@ -9,15 +9,10 @@ import SwiftUI
import Combine import Combine
struct InputIdPassWordView: View { struct InputIdPassWordView: View {
@Binding var isLogin: Bool
@Binding var viewMode : LoginViewMode @Binding var viewMode : LoginViewMode
@Binding var param : LoginViewParam @Binding var param : LoginViewParam
@Binding var isProgressView : Bool
@Binding var isAlert : Bool
@Binding var alertType: AlertType
@State private var isUserNmaeEmpty = false @State private var isUserNmaeEmpty = false
@State private var isIdPassWordEmpty = false @State private var isIdPassWordEmpty = false
@State var timer :Timer?
let sessionLogin = SessionLogin() let sessionLogin = SessionLogin()
...@@ -35,7 +30,7 @@ struct InputIdPassWordView: View { ...@@ -35,7 +30,7 @@ struct InputIdPassWordView: View {
text: $param.shipId, text: $param.shipId,
prompt: Text("Ship ID") prompt: Text("Ship ID")
.font(FontStyle.DefaultText.font) .font(FontStyle.DefaultText.font)
.foregroundColor(ColorSet.BodyDescriptiion.color) ) .foregroundColor(ColorSet.BodyDescriptiion.color))
.frame(height: 49) .frame(height: 49)
.padding(.zero) .padding(.zero)
.autocapitalization(.none) .autocapitalization(.none)
...@@ -62,7 +57,6 @@ struct InputIdPassWordView: View { ...@@ -62,7 +57,6 @@ struct InputIdPassWordView: View {
} }
.padding(.top, 16) .padding(.top, 16)
Divider() Divider()
.frame(height: 1) .frame(height: 1)
.background(ColorSet.LineColor03.color) .background(ColorSet.LineColor03.color)
...@@ -72,10 +66,7 @@ struct InputIdPassWordView: View { ...@@ -72,10 +66,7 @@ struct InputIdPassWordView: View {
if param.shipId.isEmpty || param.password.isEmpty { if param.shipId.isEmpty || param.password.isEmpty {
isIdPassWordEmpty = true isIdPassWordEmpty = true
} else { } else {
isAlert = false viewMode = .InputUserName
isProgressView = true
let login = ReqLogin(Id: param.shipId, Password: param.password)
sessionLogin.RequestLogin(login, completion: responseLogin)
} }
}, label: { }, label: {
Text("Sign In") Text("Sign In")
...@@ -96,68 +87,8 @@ struct InputIdPassWordView: View { ...@@ -96,68 +87,8 @@ struct InputIdPassWordView: View {
.background(ColorSet.LoginBk02.color) .background(ColorSet.LoginBk02.color)
.padding(.horizontal, 30) .padding(.horizontal, 30)
} }
func responseLogin(result: Result<Data, APIError>) {
print(debug: "calld")
switch result {
case .success(let resultData):
let serverSession = ServerSession()
let resjson = serverSession.fromJSON(resultData: resultData, resltType: ResLogin.self)
if let res = resjson {
SharingData.my.id = res.id
SharingData.my.shipName = res.shipName
SharingData.my.imo = res.imo
SharingData.my.mmsi = res.mmsi
Preferences.shipId = res.shipId
let notificationTags = NotificationTags()
notificationTags.addTags()
}
Preferences.lastLoginDate_Int64 = DateTextLib.Date2UnixTime(date: Date())
viewMode = .InputUserName
// let ecaArea = EcaArea()
// ecaArea.start()
timer = Timer.scheduledTimer(withTimeInterval: TimerInterval, repeats: true) { _ in
print(debug: "called timer")
let eca = EcaTask()
eca.start()
let message = GetMessage()
message.start()
let route = MonitoringRoute()
route.start()
let ecaList = GetEcaList()
ecaList.start()
let pushHistory = GetPushHistory()
pushHistory.start()
}
timer?.fire()
case .failure(let errorCode):
print(debug: errorCode)
switch errorCode {
case .clientError:
alertType = .ClientError
case .serverError:
alertType = .loginFailure
default:
alertType = .loginFailure
}
isLogin = false
isAlert = true
break
}
isProgressView = false
}
} }
#Preview { #Preview {
InputIdPassWordView(isLogin: .constant(false), viewMode: .constant(.InputIdPassword), param: .constant(LoginViewParam()), isProgressView: .constant(false), isAlert: .constant(false), alertType: .constant(.loginFailure)) InputIdPassWordView(viewMode: .constant(.InputIdPassword), param: .constant(LoginViewParam()))
} }
...@@ -12,16 +12,15 @@ struct InputUserNameView: View { ...@@ -12,16 +12,15 @@ struct InputUserNameView: View {
@Binding var isLogin: Bool @Binding var isLogin: Bool
@Binding var param: LoginViewParam @Binding var param: LoginViewParam
@Binding var viewMode : LoginViewMode @Binding var viewMode : LoginViewMode
@Binding var isProgressView : Bool
@Binding var isAlert : Bool
@Binding var alertType: AlertType
@State private var isEmptyAlert = false @State private var isEmptyAlert = false
@State var timer :Timer?
var body: some View { var body: some View {
VStack{ VStack{
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
Text(SharingData.my.shipName)
.font(FontStyle.TitleSBold.font)
.padding(.leading, 10)
.foregroundColor(.white)
HStack(spacing: 0){ HStack(spacing: 0){
Image("account") Image("account")
.resizable() .resizable()
...@@ -49,8 +48,12 @@ struct InputUserNameView: View { ...@@ -49,8 +48,12 @@ struct InputUserNameView: View {
if param.userName.isEmpty { if param.userName.isEmpty {
isEmptyAlert = true isEmptyAlert = true
} else { } else {
print(debug: "signin: id(\(param.shipId)), pass(\(param.password)), name(\(param.userName))")
isAlert = false
isProgressView = true
Preferences.UserName = param.userName Preferences.UserName = param.userName
isLogin = true let login = ReqLogin(Id: param.shipId, Password: param.password, DeviceId: param.deviceid, UserName: param.userName)
sessionLogin.RequestLogin(login, completion: responseLogin)
} }
}, label: { }, label: {
Text("Sign In") Text("Sign In")
...@@ -71,8 +74,63 @@ struct InputUserNameView: View { ...@@ -71,8 +74,63 @@ struct InputUserNameView: View {
.background(ColorSet.LoginBk02.color) .background(ColorSet.LoginBk02.color)
.padding(.horizontal, 30) .padding(.horizontal, 30)
} }
func responseLogin(result: Result<Data, APIError>) {
print(debug: "calld")
switch result {
case .success(let resultData):
let serverSession = ServerSession()
let resjson = serverSession.fromJSON(resultData: resultData, resltType: ResLogin.self)
if let res = resjson {
SharingData.my.id = res.id
SharingData.my.shipName = res.shipName
SharingData.my.imo = res.imo
SharingData.my.mmsi = res.mmsi
Preferences.shipId = res.shipId
let notification = NotificationTags()
notification.addTags()
}
Preferences.Id = param.shipId
Preferences.Password = param.password
Preferences.lastLoginDate_Int64 = DateTextLib.Date2UnixTime(date: Date())
timer = Timer.scheduledTimer(withTimeInterval: 60.0, repeats: true) { _ in
print(debug: "called timer")
let eca = EcaTask()
eca.start()
let message = GetMessage()
message.start()
let route = MonitoringRoute()
route.start()
let ecaList = GetEcaList()
ecaList.start()
let pushHistory = GetPushHistory()
pushHistory.start()
}
timer?.fire()
isProgressView = false
isLogin = true
isAlert = false
case .failure(let errorCode):
print(debug: errorCode)
isProgressView = false
isLogin = false
isAlert = true
alertType = .loginFailure
break
}
}
} }
#Preview { #Preview {
InputUserNameView(isLogin: .constant(false), param: .constant(LoginViewParam()), viewMode: .constant(.InputIdPassword)) InputUserNameView(isLogin: .constant(false), param: .constant(LoginViewParam()), viewMode: .constant(.InputIdPassword), isProgressView: .constant(false), isAlert: .constant(false), alertType: .constant(.loginFailure))
} }
...@@ -36,7 +36,9 @@ struct MapRepresentable: UIViewControllerRepresentable{ ...@@ -36,7 +36,9 @@ struct MapRepresentable: UIViewControllerRepresentable{
DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) { DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) {
do{ do{
mapVC.updateOneTimeEca(eca: nil) mapVC.updateOneTimeEca(eca: nil)
}catch{} }catch{
print(debug: "called")
}
} }
} }
......
...@@ -12,7 +12,7 @@ struct EcaListView: View { ...@@ -12,7 +12,7 @@ struct EcaListView: View {
@ObservedObject var ecaData = SharingData.eca @ObservedObject var ecaData = SharingData.eca
var body: some View { var body: some View {
ForEach(ecaData.ecaArea.map{ $0.1 }.sorted{ $0.id ?? 0 < $1.id ?? 0 }, id: \.name){ eca in ForEach(ecaData.ecaArea.map{ $0.1 }.sorted{ $0.id < $1.id }, id: \.name){ eca in
HStack { HStack {
Text(eca.name) Text(eca.name)
.font(FontStyle.DefaultText.font) .font(FontStyle.DefaultText.font)
......
...@@ -21,7 +21,7 @@ struct TaskSwitchingMenuView: View { ...@@ -21,7 +21,7 @@ struct TaskSwitchingMenuView: View {
var body: some View { var body: some View {
VStack{ VStack{
ForEach(ecaData.ecaArea.map{ $0.1 }.filter{ $0.isEnable }.sorted{ $0.id ?? 0 < $1.id ?? 0 }, id: \.name){ eca in ForEach(ecaData.ecaArea.map{ $0.1 }.filter{ $0.isEnable }.sorted{ $0.id < $1.id }, id: \.name){ eca in
VStack { VStack {
HStack { HStack {
//ECA開始・終了ボタン //ECA開始・終了ボタン
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
import SwiftUI import SwiftUI
import PDFKit import PDFKit
import WindowsAzureMessaging
enum MenuPath: String, Hashable{ enum MenuPath: String, Hashable{
case Manual case Manual
...@@ -20,7 +21,7 @@ enum MenuPath: String, Hashable{ ...@@ -20,7 +21,7 @@ enum MenuPath: String, Hashable{
case ManualInmalsatC case ManualInmalsatC
case ManualInternationalVHF case ManualInternationalVHF
case ManualVDR case ManualVDR
case Information // case Information
case Setting case Setting
case GpsSelect case GpsSelect
case Help case Help
...@@ -33,7 +34,7 @@ enum MenuPath: String, Hashable{ ...@@ -33,7 +34,7 @@ enum MenuPath: String, Hashable{
var title: String{ var title: String{
switch self { switch self {
case .Manual: case .Manual:
"Equipment manual" "Equipment Manual"
case .ManualECDIS: case .ManualECDIS:
"ECDIS" "ECDIS"
case .ManualECDISBasic: case .ManualECDISBasic:
...@@ -54,8 +55,8 @@ enum MenuPath: String, Hashable{ ...@@ -54,8 +55,8 @@ enum MenuPath: String, Hashable{
"International VHF" "International VHF"
case .ManualVDR: case .ManualVDR:
"VDR" "VDR"
case .Information: // case .Information:
"Information" // "Information"
case .Setting: case .Setting:
"Setting" "Setting"
case .GpsSelect: case .GpsSelect:
...@@ -112,6 +113,7 @@ enum MenuPath: String, Hashable{ ...@@ -112,6 +113,7 @@ enum MenuPath: String, Hashable{
struct MenuView: View { struct MenuView: View {
@EnvironmentObject private var sceneDelegate: SceneDelegate @EnvironmentObject private var sceneDelegate: SceneDelegate
@EnvironmentObject private var loginViewModel : LoginViewModel @EnvironmentObject private var loginViewModel : LoginViewModel
@Environment(\.openURL) var openURL
@State var path: [MenuPath] = [] @State var path: [MenuPath] = []
@Binding var isSignout: Bool @Binding var isSignout: Bool
...@@ -142,11 +144,11 @@ struct MenuView: View { ...@@ -142,11 +144,11 @@ struct MenuView: View {
MenuContentView(content: .Manual) MenuContentView(content: .Manual)
} }
Button{ // Button{
path.append(.Information) // path.append(.Information)
}label: { // }label: {
MenuContentView(content: .Information) // MenuContentView(content: .Information)
} // }
Button{ Button{
path.append(.Setting) path.append(.Setting)
...@@ -185,13 +187,13 @@ struct MenuView: View { ...@@ -185,13 +187,13 @@ struct MenuView: View {
MenuAboutAppView(path: $path) MenuAboutAppView(path: $path)
.navigationBarHidden(true) .navigationBarHidden(true)
}else if goto == .TermsOfUse{ }else if goto == .TermsOfUse{
MenuLocalHtmlView(path: $path) if let htmlPath = Bundle.main.path(forResource: "TermsView", ofType: "html") {
.navigationBarHidden(true) WebView(isLoading: .constant(false), url: htmlPath)
}
}else if goto == .PrivacyStatement{ }else if goto == .PrivacyStatement{
MenuLocalHtmlView(path: $path) if let htmlPath = Bundle.main.path(forResource: "PrivacyView", ofType: "html") {
.navigationBarHidden(true) WebView(isLoading: .constant(false), url: htmlPath)
}else if goto == .ContactUs{ }
WebView(isLoading: .constant(false), url: HttpRequestType.ContactPage.rawValue)
}else{ }else{
VStack(spacing: 0) { VStack(spacing: 0) {
MenuTitleView(path: $path, title: goto.title) MenuTitleView(path: $path, title: goto.title)
...@@ -209,6 +211,7 @@ struct MenuView: View { ...@@ -209,6 +211,7 @@ struct MenuView: View {
.alert("Sign Out", isPresented: $isSignout) { .alert("Sign Out", isPresented: $isSignout) {
Button("Yes") { Button("Yes") {
MSNotificationHub.clearTags()
Preferences.Id = "" Preferences.Id = ""
Preferences.Password = "" Preferences.Password = ""
loginViewModel.isLogin = false loginViewModel.isLogin = false
......
//
// LocalWebView.swift
// Sailassist
//
// Created by 三浦薫巳 on 2023/12/22.
//
import SwiftUI
struct LocalWebView: View {
// @Binding var policy: Policy
var body: some View {
VStack{
if let htmlPath = Bundle.main.path(forResource: "TermsView", ofType: "html") {
WebView(isLoading: .constant(false), url: htmlPath)
}
Spacer()
}
.background(ColorSet.BackgroundPrimary.color)
}
}
#Preview {
LocalWebView()
}
...@@ -24,6 +24,7 @@ struct MenuAboutAppView: View { ...@@ -24,6 +24,7 @@ struct MenuAboutAppView: View {
Text("\(version)" + " Canary") Text("\(version)" + " Canary")
.font(FontStyle.SupplementText.font) .font(FontStyle.SupplementText.font)
.foregroundColor(ColorSet.Body.color) .foregroundColor(ColorSet.Body.color)
.padding(.leading, 20)
#elseif QC #elseif QC
Text("\(version)" + " QC") Text("\(version)" + " QC")
.font(FontStyle.TitleS.font) .font(FontStyle.TitleS.font)
...@@ -56,11 +57,14 @@ struct MenuAboutAppView: View { ...@@ -56,11 +57,14 @@ struct MenuAboutAppView: View {
}label: { }label: {
MenuContentView(content: .TermsOfUse) MenuContentView(content: .TermsOfUse)
} }
.padding(.leading, 20)
Button{ Button{
path.append(.PrivacyStatement) path.append(.PrivacyStatement)
}label: { }label: {
MenuContentView(content: .PrivacyStatement) MenuContentView(content: .PrivacyStatement)
} }
.padding(.leading, 20)
Spacer().frame(height: 50) Spacer().frame(height: 50)
Text("Open Source Licenses") Text("Open Source Licenses")
...@@ -76,10 +80,14 @@ struct MenuAboutAppView: View { ...@@ -76,10 +80,14 @@ struct MenuAboutAppView: View {
.font(FontStyle.EmphasisText.font) .font(FontStyle.EmphasisText.font)
.foregroundColor(ColorSet.Body.color) .foregroundColor(ColorSet.Body.color)
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 30) .padding(.leading, 50)
.padding(.top, 17)
VStack(spacing: 30) { VStack(spacing: 30) {
Link("https://github.com/Azure/azure-notificationhubs-ios/blob/main/LICENSE", destination: URL(string: HttpRequestType.ApachLicens.rawValue)!) Link("https://github.com/Azure/azure-notificationhubs-ios/blob/main/LICENSE", destination: URL(string: HttpRequestType.ApachLicens.rawValue)!)
} }
.padding(.top, 2)
.padding(.horizontal, 50)
.font(FontStyle.RadioButtonText.font) .font(FontStyle.RadioButtonText.font)
.foregroundColor(ColorSet.Body.color) .foregroundColor(ColorSet.Body.color)
Spacer() Spacer()
......
//
// 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]))
}
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import SwiftUI import SwiftUI
struct MenuSettingView: View { struct MenuSettingView: View {
@Environment(\.openURL) private var openURL
@Binding var path : [MenuPath] @Binding var path : [MenuPath]
var body: some View { var body: some View {
VStack{ VStack{
...@@ -32,7 +33,9 @@ struct MenuSettingView: View { ...@@ -32,7 +33,9 @@ struct MenuSettingView: View {
} }
Button{ Button{
path.append(.ContactUs) if let url = URL(string: HttpRequestType.ContactPage.rawValue) {
openURL(url)
}
}label: { }label: {
MenuContentView(content: .ContactUs) MenuContentView(content: .ContactUs)
} }
......
...@@ -45,7 +45,6 @@ struct MenuTitleView: View { ...@@ -45,7 +45,6 @@ struct MenuTitleView: View {
Divider() Divider()
.background(ColorSet.LineColor04.color) .background(ColorSet.LineColor04.color)
} }
} }
} }
......
...@@ -51,6 +51,7 @@ class Preferences{ ...@@ -51,6 +51,7 @@ class Preferences{
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.Id.rawValue) static var Id: String @AppStorage(wrappedValue:"", PreferencesKey.TypeString.Id.rawValue) static var Id: String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.Password.rawValue) static var Password: String @AppStorage(wrappedValue:"", PreferencesKey.TypeString.Password.rawValue) static var Password: String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.DeviceId.rawValue) static var DeviceId: String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.UserName.rawValue) static var UserName: String @AppStorage(wrappedValue:"", PreferencesKey.TypeString.UserName.rawValue) static var UserName: String
@AppStorage(wrappedValue:0, PreferencesKey.TypeInt.shipId.rawValue) static var shipId: Int @AppStorage(wrappedValue:0, PreferencesKey.TypeInt.shipId.rawValue) static var shipId: Int
......
...@@ -15,6 +15,7 @@ class PreferencesKey{ ...@@ -15,6 +15,7 @@ class PreferencesKey{
case Id case Id
case Password case Password
case UserName case UserName
case DeviceId
//Manual類Version //Manual類Version
case ECDISBasic case ECDISBasic
......
...@@ -60,7 +60,6 @@ struct SailassistApp: App { ...@@ -60,7 +60,6 @@ struct SailassistApp: App {
} }
} }
private func getManualUrl(){ private func getManualUrl(){
let session = SessionGetManualUrl() let session = SessionGetManualUrl()
...@@ -88,6 +87,7 @@ struct SailassistApp: App { ...@@ -88,6 +87,7 @@ struct SailassistApp: App {
class NotificationTags: NSObject { class NotificationTags: NSObject {
func addTags() { func addTags() {
MSNotificationHub.clearTags()
if Preferences.shipId != 0 { if Preferences.shipId != 0 {
let shipId = String(Preferences.shipId) let shipId = String(Preferences.shipId)
let routeTag = "route-" + shipId let routeTag = "route-" + shipId
...@@ -119,6 +119,11 @@ class AppDelegate: NSObject, UIApplicationDelegate ,MSNotificationHubDelegate, M ...@@ -119,6 +119,11 @@ class AppDelegate: NSObject, UIApplicationDelegate ,MSNotificationHubDelegate, M
} }
application.registerForRemoteNotifications() application.registerForRemoteNotifications()
//ユニークな値の生成
if Preferences.DeviceId == "" {
Preferences.DeviceId = UUID().uuidString
}
return true return true
} }
......
...@@ -93,7 +93,7 @@ class ServerSession{ ...@@ -93,7 +93,7 @@ class ServerSession{
do{ do{
if let error = error{ if let error = error{
let err = APIError.clientError // let err = APIError.clientError
throw APIError.clientError throw APIError.clientError
} }
guard let indata = data, let inresponse = response as? HTTPURLResponse else { guard let indata = data, let inresponse = response as? HTTPURLResponse else {
......
...@@ -51,5 +51,5 @@ struct WebView: UIViewRepresentable { ...@@ -51,5 +51,5 @@ struct WebView: UIViewRepresentable {
} }
#Preview { #Preview {
WebView(isLoading: .constant(false), url: "https://ssv-canary-web.azurewebsites.net/login?ReturnUrl=%2F") WebView(isLoading: .constant(false), url: "https://www.jmarinecloud.com/eng/contact.php?type=ssv_mobile")
} }
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