mirror of
https://github.com/kkebo/DNSecure.git
synced 2026-03-11 08:54:36 +00:00
parent
f3f050d1c6
commit
cbff3bcedb
1 changed files with 13 additions and 0 deletions
|
|
@ -20,6 +20,11 @@ struct ContentView {
|
||||||
@State private var alertMessage = ""
|
@State private var alertMessage = ""
|
||||||
@State private var isGuidePresented = false
|
@State private var isGuidePresented = false
|
||||||
@State private var isRestoring = false
|
@State private var isRestoring = false
|
||||||
|
#if targetEnvironment(macCatalyst)
|
||||||
|
// Workaround for https://github.com/kkebo/DNSecure/issues/139
|
||||||
|
@State private var sidebarEditMode: EditMode = .inactive
|
||||||
|
@State private var detailEditMode: EditMode = .inactive
|
||||||
|
#endif
|
||||||
|
|
||||||
private var navigationBarTitleDisplayMode: NavigationBarItem.TitleDisplayMode {
|
private var navigationBarTitleDisplayMode: NavigationBarItem.TitleDisplayMode {
|
||||||
if #available(iOS 26, *) {
|
if #available(iOS 26, *) {
|
||||||
|
|
@ -203,12 +208,20 @@ extension ContentView: View {
|
||||||
} message: {
|
} message: {
|
||||||
Text(self.alertMessage)
|
Text(self.alertMessage)
|
||||||
}
|
}
|
||||||
|
#if targetEnvironment(macCatalyst)
|
||||||
|
// Workaround for https://github.com/kkebo/DNSecure/issues/139
|
||||||
|
.environment(\.editMode, self.$sidebarEditMode)
|
||||||
|
#endif
|
||||||
} detail: {
|
} detail: {
|
||||||
if let i = self.selection, i >= 0 {
|
if let i = self.selection, i >= 0 {
|
||||||
NavigationStack {
|
NavigationStack {
|
||||||
self.detailView(at: i)
|
self.detailView(at: i)
|
||||||
.navigationBarTitleDisplayMode(self.navigationBarTitleDisplayMode)
|
.navigationBarTitleDisplayMode(self.navigationBarTitleDisplayMode)
|
||||||
}
|
}
|
||||||
|
#if targetEnvironment(macCatalyst)
|
||||||
|
// Workaround for https://github.com/kkebo/DNSecure/issues/139
|
||||||
|
.environment(\.editMode, self.$detailEditMode)
|
||||||
|
#endif
|
||||||
} else if !self.isActivated {
|
} else if !self.isActivated {
|
||||||
HowToActivateView()
|
HowToActivateView()
|
||||||
.navigationBarTitleDisplayMode(self.navigationBarTitleDisplayMode)
|
.navigationBarTitleDisplayMode(self.navigationBarTitleDisplayMode)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue