Skip to content

Commit 06bc31f

Browse files
gi11esclaude
andcommitted
feat: show dev indicator in about screen and open settings about pane
"About Deckard" menu item now opens the Settings about tab instead of the standard macOS about panel. Version label shows "(dev)" suffix when running a debug build. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 7a60fe2 commit 06bc31f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Sources/App/AppDelegate.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
117117
windowController?.closeCurrentTab()
118118
}
119119

120+
@objc private func showAbout() {
121+
SettingsWindowController.shared.showAboutPane()
122+
}
123+
120124
// MARK: - Menu
121125

122126
@MainActor private func setupMainMenu() {
@@ -125,7 +129,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
125129
// App menu
126130
let appMenuItem = NSMenuItem()
127131
let appMenu = NSMenu()
128-
appMenu.addItem(withTitle: "About Deckard", action: #selector(NSApplication.orderFrontStandardAboutPanel(_:)), keyEquivalent: "")
132+
appMenu.addItem(withTitle: "About Deckard", action: #selector(showAbout), keyEquivalent: "")
129133
appMenu.addItem(.separator())
130134
let settingsItem = NSMenuItem(title: "Settings...", action: #selector(showSettings), keyEquivalent: "")
131135
settingsItem.setShortcut(for: .settings)

Sources/Window/SettingsWindow.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ class SettingsWindowController: NSWindowController, NSToolbarDelegate, NSTextFie
8282
switchToPane(pane)
8383
}
8484

85+
func showAboutPane() {
86+
switchToPane(.about)
87+
window?.toolbar?.selectedItemIdentifier = Pane.about.toolbarItemIdentifier
88+
showWindow(nil)
89+
}
90+
8591
private func switchToPane(_ pane: Pane) {
8692
guard let window = window else { return }
8793

@@ -975,7 +981,8 @@ class SettingsWindowController: NSWindowController, NSToolbarDelegate, NSTextFie
975981
stack.addArrangedSubview(nameLabel)
976982

977983
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "?"
978-
let versionLabel = NSTextField(labelWithString: "Version \(version)")
984+
let isDev = Bundle.main.bundleIdentifier?.hasSuffix(".dev") == true
985+
let versionLabel = NSTextField(labelWithString: "Version \(version)\(isDev ? " (dev)" : "")")
979986
versionLabel.font = .systemFont(ofSize: 12)
980987
versionLabel.textColor = .secondaryLabelColor
981988
stack.addArrangedSubview(versionLabel)

0 commit comments

Comments
 (0)