diff --git a/Shared (App)/MainView.swift b/Shared (App)/MainView.swift index b386cd9..00b6cfc 100644 --- a/Shared (App)/MainView.swift +++ b/Shared (App)/MainView.swift @@ -9,51 +9,54 @@ import SwiftUI struct MainView: View { var body: some View { - VStack { - NavigationStack { - Image("bigicon").resizable().frame(width: 150.0, height: 150.0) - Text("Nostash").font(.title) - Text("A Safari Nostr Extension").font(.title2) - NavigationLink("Privacy Policy") { - PrivacyPolicyView() - } - #if macOS - .buttonStyle(.link) - #endif - .padding(.all, 3.0) - - NavigationLink("Getting Started: iPhone") { - GettingStartediPhone() - } - #if macOS - .buttonStyle(.link) - #endif - .padding(.all, 3.0) - - NavigationLink("Getting Started: iPad") { - GettingStartediPad() - } - #if macOS - .buttonStyle(.link) - #endif - .padding(.all, 3.0) - - NavigationLink("Getting Started: Mac") { - GettingStartedMac() - } - #if macOS - .buttonStyle(.link) - #endif - .padding(.all, 3.0) - - NavigationLink("Tips and Tricks") { - TipsAndTricks() - } - #if macOS - .buttonStyle(.link) - #endif - .padding(.all, 3.0) + NavigationStack { + Image("bigicon").resizable().frame(width: 150.0, height: 150.0) + Text("Nostash").font(.title) + Text("A Safari Nostr Extension").font(.title2) + NavigationLink("Privacy Policy") { + PrivacyPolicyView() } +#if os(macOS) + .buttonStyle(.link) +#endif + .padding(.all, 3.0) + + NavigationLink("Getting Started: iPhone") { + GettingStartediPhone() + } +#if os(macOS) + .buttonStyle(.link) +#endif + .padding(.all, 3.0) + + NavigationLink("Getting Started: iPad") { + GettingStartediPad() + } +#if os(macOS) + .buttonStyle(.link) +#endif + .padding(.all, 3.0) + + NavigationLink("Getting Started: Mac") { + GettingStartedMac() + } +#if os(macOS) + .buttonStyle(.link) +#endif + .padding(.all, 3.0) + + NavigationLink("Tips and Tricks") { + TipsAndTricks() + } +#if os(macOS) + .buttonStyle(.link) +#endif + .padding(.all, 3.0) + } + .toolbar { + // There is a macOS bug where the back button overlaps the title in the navigation bar. + // Adding an empty Text element fixes the issue apparently. + Text("") } } } diff --git a/Shared (App)/NostashApp.swift b/Shared (App)/NostashApp.swift index 7f9ab1c..205e16e 100644 --- a/Shared (App)/NostashApp.swift +++ b/Shared (App)/NostashApp.swift @@ -10,11 +10,11 @@ import SwiftUI @main struct NostashApp: App { var body: some Scene { - WindowGroup("Nostash") { + WindowGroup { MainView() } - #if macOS +#if os(macOS) .defaultSize(width: 400, height: 500) - #endif +#endif } }