From 6ffba3be0218cc5d47ee73d1cbdbc1957850bb33 Mon Sep 17 00:00:00 2001 From: psmattas Date: Wed, 19 Aug 2026 14:08:43 +0100 Subject: [PATCH] fix(about): About Outpost opens Settings' About section, no popup window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "About Outpost" in the app menu used to open a separate standalone window (Window(id: "about") wrapping AboutView). Now just opens Settings and jumps straight to the About section instead — same content (AboutInfoView, unchanged), one less window/code path to maintain. Also removed the "Check for Updates…" button — deferred per explicit instruction, not deleted for a real reason beyond "not now." A simple button can come back later; no update-checking logic was ever built; , nothing else to clean up alongside it. --- Outpost/Features/About/AboutView.swift | 34 +++++--------------------- Outpost/OutpostApp.swift | 10 ++------ 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/Outpost/Features/About/AboutView.swift b/Outpost/Features/About/AboutView.swift index 93b5afd..9137273 100644 --- a/Outpost/Features/About/AboutView.swift +++ b/Outpost/Features/About/AboutView.swift @@ -2,13 +2,11 @@ import AppKit import SwiftUI -/// Bare content (icon, name, version, links) with no window chrome — reused -/// by both the standalone "About Outpost" window (`AboutView`, the standard -/// macOS app-menu affordance) and the Settings page's own About section, so -/// the two can't drift out of sync. +/// Bare content (icon, name, version, links) with no window chrome — the +/// macOS "About Outpost" app-menu command now opens Settings' own About +/// section directly (no separate popup window), so this is its only caller. struct AboutInfoView: View { private let repositoryURL = URL(string: "https://git.psmattas.com/psmattas/Outpost")! - private let releasesURL = URL(string: "https://git.psmattas.com/psmattas/Outpost/releases")! var appName: String { Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String ?? "Outpost" @@ -45,35 +43,15 @@ struct AboutInfoView: View { .fixedSize(horizontal: false, vertical: true) .frame(maxWidth: .infinity) - VStack(spacing: 10) { - Link(destination: repositoryURL) { - Label("View Source on Git", systemImage: "link") - } - .font(.callout) - - Button("Check for Updates…") { - checkForUpdates() - } + Link(destination: repositoryURL) { + Label("View Source on Git", systemImage: "link") } + .font(.callout) Text("© \(copyrightYear) Puranjay Savar Mattas") .font(.caption2) .foregroundStyle(.tertiary) } } - - // No Sparkle-style in-app updater yet — this just opens the releases page - // on the self-hosted Gitea instance so the user can check/download manually. - private func checkForUpdates() { - NSWorkspace.shared.open(releasesURL) - } -} - -struct AboutView: View { - var body: some View { - AboutInfoView() - .padding(32) - .frame(width: 320) - } } #endif diff --git a/Outpost/OutpostApp.swift b/Outpost/OutpostApp.swift index 884c94e..e461e20 100644 --- a/Outpost/OutpostApp.swift +++ b/Outpost/OutpostApp.swift @@ -18,7 +18,6 @@ struct OutpostApp: App { @AppStorage("outpost.appearance") private var appearance: AppAppearance = .system #if os(macOS) - @Environment(\.openWindow) private var openWindow @State private var isShowingLogoutConfirmation = false #endif @@ -40,7 +39,8 @@ struct OutpostApp: App { .commands { CommandGroup(replacing: .appInfo) { Button("About Outpost") { - openWindow(id: "about") + navigation.selectedSettingsSection = .about + navigation.isShowingSettings = true } } // No `Settings {}` scene anymore — Settings renders inside the @@ -64,12 +64,6 @@ struct OutpostApp: App { #endif #if os(macOS) - Window("About Outpost", id: "about") { - AboutView() - .disablesFullScreen() - } - .windowResizability(.contentSize) - Window("Keyboard Shortcuts", id: "keyboard-shortcuts") { KeyboardShortcutsView() .disablesFullScreen()