Commit e2778fbf authored by shigemi miura's avatar shigemi miura

Ver1.0.1

・燃料切替タスク機能のON/OFF
parent b1777788
...@@ -13,4 +13,5 @@ struct ResLogin : Codable { ...@@ -13,4 +13,5 @@ struct ResLogin : Codable {
var shipName: String = "" var shipName: String = ""
var imo: Int = 0 var imo: Int = 0
var mmsi: Int = 0 var mmsi: Int = 0
var enableFuelSwitchTask: Bool = false
} }
...@@ -250,6 +250,7 @@ struct LoginView: View { ...@@ -250,6 +250,7 @@ struct LoginView: View {
SharingData.my.shipName = res.shipName SharingData.my.shipName = res.shipName
SharingData.my.imo = res.imo SharingData.my.imo = res.imo
SharingData.my.mmsi = res.mmsi SharingData.my.mmsi = res.mmsi
SharingData.my.isFuelSwitchTask = res.enableFuelSwitchTask
Preferences.shipId = res.shipId Preferences.shipId = res.shipId
......
...@@ -16,6 +16,7 @@ class SharingData{ ...@@ -16,6 +16,7 @@ class SharingData{
@Published var imo: Int = 0 @Published var imo: Int = 0
@Published var mmsi: Int = 0 @Published var mmsi: Int = 0
@Published var isUpDate: Bool = false @Published var isUpDate: Bool = false
@Published var isFuelSwitchTask: Bool = false
@Published var ecaStatus: EcaState? @Published var ecaStatus: EcaState?
......
...@@ -25,6 +25,7 @@ struct MainTabView: View { ...@@ -25,6 +25,7 @@ struct MainTabView: View {
@EnvironmentObject private var sceneDelegate: SceneDelegate @EnvironmentObject private var sceneDelegate: SceneDelegate
@State var isSignout = false @State var isSignout = false
@State var isLogin = false @State var isLogin = false
@State var isEcaTask = SharingData.my.isFuelSwitchTask
init() { init() {
let appearance: UITabBarAppearance = UITabBarAppearance() let appearance: UITabBarAppearance = UITabBarAppearance()
...@@ -55,7 +56,7 @@ struct MainTabView: View { ...@@ -55,7 +56,7 @@ struct MainTabView: View {
.tag(Tab.menu) .tag(Tab.menu)
} }
.hideNativeTabBar() .hideNativeTabBar()
.sheet(isPresented: .constant(isTaskSel && isTabShow), content: { .sheet(isPresented: .constant(isTaskSel && isTabShow && isEcaTask), content: {
MapTaskView() MapTaskView()
.zIndex(0) .zIndex(0)
.presentationDragIndicator(.hidden) .presentationDragIndicator(.hidden)
...@@ -84,7 +85,7 @@ struct MainTabView: View { ...@@ -84,7 +85,7 @@ struct MainTabView: View {
.tag(Tab.menu) .tag(Tab.menu)
} }
.hideNativeTabBar() .hideNativeTabBar()
.popover(isPresented: .constant(isPopover), attachmentAnchor: .point(.bottom)) { .popover(isPresented: .constant(isPopover && isEcaTask), attachmentAnchor: .point(.bottom)) {
MapTaskView() MapTaskView()
.presentationCompactAdaptation(.none) .presentationCompactAdaptation(.none)
.zIndex(0) .zIndex(0)
......
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