diff --git a/Outpost/Features/Account/AccountFooter.swift b/Outpost/Features/Account/AccountFooter.swift index 79722ee..e4c2033 100644 --- a/Outpost/Features/Account/AccountFooter.swift +++ b/Outpost/Features/Account/AccountFooter.swift @@ -10,7 +10,6 @@ struct AccountFooter: View { @Environment(SessionStore.self) private var session @Environment(AppNavigation.self) private var navigation @Environment(\.openURL) private var openURL - @Environment(\.openWindow) private var openWindow @AppStorage("outpost.appearance") private var appearance: AppAppearance = .system @AppStorage(CachingOutlineAPIClient.offlineModeDefaultsKey) private var isOfflineModeEnabled = false @State private var isMenuPresented = false @@ -63,10 +62,6 @@ struct AccountFooter: View { private var menuContent: some View { VStack(alignment: .leading, spacing: 2) { - menuItem("Keyboard Shortcuts…") { openWindow(id: "keyboard-shortcuts") } - - Divider() - menuItem("Documentation") { openURL(repositoryURL) } if let apiDocumentationURL { menuItem("API Documentation") { openURL(apiDocumentationURL) } diff --git a/Outpost/Features/Account/KeyboardShortcutsView.swift b/Outpost/Features/Account/KeyboardShortcutsView.swift deleted file mode 100644 index 2e98c6c..0000000 --- a/Outpost/Features/Account/KeyboardShortcutsView.swift +++ /dev/null @@ -1,39 +0,0 @@ -#if os(macOS) -import SwiftUI - -struct KeyboardShortcutsView: View { - private struct Shortcut: Identifiable { - let id = UUID() - let action: String - let keys: String - } - - private let shortcuts: [Shortcut] = [ - Shortcut(action: "Sign In", keys: "⏎"), - Shortcut(action: "Preferences", keys: "⌘ ,"), - Shortcut(action: "Close Window", keys: "⌘ W"), - Shortcut(action: "Quit Outpost", keys: "⌘ Q") - ] - - var body: some View { - VStack(alignment: .leading, spacing: 16) { - Text("Keyboard Shortcuts") - .font(.title3.bold()) - - VStack(spacing: 10) { - ForEach(shortcuts) { shortcut in - HStack { - Text(shortcut.action) - Spacer() - Text(shortcut.keys) - .foregroundStyle(.secondary) - .monospaced() - } - } - } - } - .padding(24) - .frame(width: 280) - } -} -#endif diff --git a/Outpost/OutpostApp.swift b/Outpost/OutpostApp.swift index 3ad9c4a..c784767 100644 --- a/Outpost/OutpostApp.swift +++ b/Outpost/OutpostApp.swift @@ -75,14 +75,6 @@ struct OutpostApp: App { } } #endif - - #if os(macOS) - Window("Keyboard Shortcuts", id: "keyboard-shortcuts") { - KeyboardShortcutsView() - .disablesFullScreen() - } - .windowResizability(.contentSize) - #endif } #if os(macOS) diff --git a/Outpost/Support/WindowConfigurator.swift b/Outpost/Support/WindowConfigurator.swift deleted file mode 100644 index 412325a..0000000 --- a/Outpost/Support/WindowConfigurator.swift +++ /dev/null @@ -1,38 +0,0 @@ -#if os(macOS) -import SwiftUI -import AppKit - -/// Grabs the hosting `NSWindow` once it's attached to a screen, for the -/// handful of things SwiftUI's `Window` scene doesn't expose a modifier for. -private struct WindowConfigurator: NSViewRepresentable { - let configure: (NSWindow) -> Void - - func makeNSView(context: Context) -> NSView { - let view = NSView() - DispatchQueue.main.async { - if let window = view.window { - configure(window) - } - } - return view - } - - func updateNSView(_ nsView: NSView, context: Context) {} -} - -extension View { - /// `Window` scenes default to a full standard titlebar, fullscreen - /// (green) button included — not appropriate for fixed-size reference - /// panels like About or Keyboard Shortcuts, which have no reason to - /// support fullscreen at all. - func disablesFullScreen() -> some View { - background( - WindowConfigurator { window in - window.collectionBehavior.remove(.fullScreenPrimary) - window.collectionBehavior.insert(.fullScreenNone) - window.standardWindowButton(.zoomButton)?.isHidden = true - } - ) - } -} -#endif