diff --git a/CHANGELOG.md b/CHANGELOG.md index bcec2c4..fbca8e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to Forel are documented here. Format loosely follows ## [Unreleased] ### Fixed +- About Forel now displays the app name, version, build number, copyright, and repository link. - Automatic rules now keep processing simultaneous file arrivals when an earlier file takes time to move to another disk or network folder. - Activity timestamps now follow the Mac's current locale, time zone, and clock format instead of displaying UTC. diff --git a/Sources/ForelApp/ForelMacApp.swift b/Sources/ForelApp/ForelMacApp.swift index dd86b91..d8ac1d5 100644 --- a/Sources/ForelApp/ForelMacApp.swift +++ b/Sources/ForelApp/ForelMacApp.swift @@ -45,13 +45,22 @@ struct ForelMacApp: App { .commands { CommandGroup(replacing: .appInfo) { Button("About Forel") { - let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "alpha" - let icon = Bundle.module.url(forResource: "AppIcon", withExtension: "png").flatMap { NSImage(contentsOf: $0) } - NSApplication.shared.orderFrontStandardAboutPanel(options: [ + let info = Bundle.main.infoDictionary + let version = info?["CFBundleShortVersionString"] as? String ?? "Development" + let build = info?["CFBundleVersion"] as? String ?? "Development" + var options: [NSApplication.AboutPanelOptionKey: Any] = [ .applicationName: "Forel", .applicationVersion: version, - .applicationIcon: icon as Any, - ]) + .version: "Build \(build)", + .credits: Self.aboutCredits, + ] + + if let icon = Bundle.module.url(forResource: "AppIcon", withExtension: "png") + .flatMap({ NSImage(contentsOf: $0) }) { + options[.applicationIcon] = icon + } + + NSApplication.shared.orderFrontStandardAboutPanel(options: options) } } } @@ -67,4 +76,20 @@ struct ForelMacApp: App { } .windowResizability(.contentSize) } + + private static var aboutCredits: NSAttributedString { + let credits = NSMutableAttributedString( + string: "\nGitHub Repository", + attributes: [.link: URL(string: "https://github.com/lab421/forel")!] + ) + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.alignment = .center + credits.addAttribute( + .paragraphStyle, + value: paragraphStyle, + range: NSRange(location: 0, length: credits.length) + ) + return credits + } } diff --git a/build.sh b/build.sh index 137c37b..33a4a7b 100755 --- a/build.sh +++ b/build.sh @@ -123,6 +123,8 @@ write_info_plist() { ${version_number} CFBundleVersion ${version_number} + NSHumanReadableCopyright + Copyright © 2026 Lab421 LSMinimumSystemVersion 13.0 LSUIElement