2 Commits
Author SHA1 Message Date
Puranjay Savar Mattas 0da26e0fed Merge pull request 'fix(about): About Outpost opens Settings' About section, no popup window' (#10) from fix/about-menu-no-popup into main
Reviewed-on: #10
2026-08-19 14:22:40 +01:00
Puranjay Savar Mattas 6ffba3be02 fix(about): About Outpost opens Settings' About section, no popup window
"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.
2026-08-19 14:08:43 +01:00
2 changed files with 8 additions and 36 deletions
+6 -28
View File
@@ -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
+2 -8
View File
@@ -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()