Commit e2778fbf authored by shigemi miura's avatar shigemi miura

Ver1.0.1

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