feat: configure launcher color scheme

This commit is contained in:
2026-10-22 15:36:44 +02:00
parent 1ec4c0d582
commit be761b4704
21 changed files with 460 additions and 150 deletions
+7 -8
View File
@@ -108,7 +108,7 @@ private final class ApplicationDelegate: NSObject, NSApplicationDelegate {
controller.retryUninstallRecovery = { [uninstaller] in await uninstaller.recover() }
return controller
}
private var startupShortcutError: String?
private var startupError = ThemePalette.configurationError
private var startupRecoveryMessage: String?
private var isLoginLaunch: Bool {
@@ -137,24 +137,23 @@ private final class ApplicationDelegate: NSObject, NSApplicationDelegate {
launcher.present()
}
let shortcutErrors = shortcuts.start()
if !shortcutErrors.isEmpty {
startupShortcutError = shortcutErrors.joined(separator: "\n")
if !isLoginLaunch { showSettings(nil) }
}
startupError = ([startupError].compactMap { $0 } + shortcutErrors).joined(separator: "\n")
if startupError?.isEmpty == true { startupError = nil }
if startupError != nil && !loginLaunch { showSettings(nil) }
}
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows: Bool) -> Bool {
guard !isLoginLaunch else { return false }
launcher.present()
if startupShortcutError != nil || startupRecoveryMessage != nil {
if startupError != nil || startupRecoveryMessage != nil {
showSettings(nil)
}
return false
}
@objc func showSettings(_ sender: Any?) {
settings.present(error: startupShortcutError)
startupShortcutError = nil
settings.present(error: startupError)
startupError = nil
startupRecoveryMessage = nil
}