fix: unify navigation context and feedback across tools
This commit is contained in:
@@ -79,7 +79,8 @@ final class SettingsWindowController: NSWindowController, NSWindowDelegate {
|
||||
recorder.capture = { [weak self] event in self?.capture(event) }
|
||||
recorder.cancel = { [weak self] in self?.cancelRecording() }
|
||||
recorder.modifiersChanged = { [weak self] in
|
||||
self?.errorLabel.stringValue = "Press a key together with Command, Option, or Control. Escape cancels."
|
||||
self?.errorLabel.stringValue = ""
|
||||
self?.statusLabel.stringValue = "Press a key together with Command, Option, or Control. Escape cancels."
|
||||
}
|
||||
let commandSpaceButton = NSButton(title: "Use ⌘Space", target: self, action: #selector(useCommandSpace))
|
||||
commandSpaceButton.bezelStyle = .rounded
|
||||
@@ -175,6 +176,7 @@ final class SettingsWindowController: NSWindowController, NSWindowDelegate {
|
||||
recoveryLabel.stringValue = report.needsRecovery
|
||||
? "An interrupted uninstall needs attention. Files have been retained for recovery."
|
||||
: "Interrupted uninstall recovery completed."
|
||||
recoveryLabel.textColor = report.needsRecovery ? .systemRed : SunsetPalette.secondaryText
|
||||
recoveryButton.title = report.needsRecovery ? "Retry uninstall recovery…" : "View recovery details…"
|
||||
}
|
||||
|
||||
@@ -197,6 +199,7 @@ final class SettingsWindowController: NSWindowController, NSWindowDelegate {
|
||||
|
||||
private func refreshLogin() {
|
||||
let status = SMAppService.mainApp.status
|
||||
loginStatus.textColor = SunsetPalette.secondaryText
|
||||
loginToggle.state = (status == .enabled || status == .requiresApproval) ? .on : .off
|
||||
loginSettings.isHidden = status != .requiresApproval
|
||||
switch status {
|
||||
@@ -210,6 +213,7 @@ final class SettingsWindowController: NSWindowController, NSWindowDelegate {
|
||||
loginStatus.stringValue = "Install Conjure in Applications before enabling launch at login."
|
||||
@unknown default:
|
||||
loginStatus.stringValue = "Launch at login status is unavailable."
|
||||
loginStatus.textColor = .systemRed
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,6 +229,7 @@ final class SettingsWindowController: NSWindowController, NSWindowDelegate {
|
||||
} catch {
|
||||
refreshLogin()
|
||||
loginStatus.stringValue = "Could not change launch at login: \(error.localizedDescription)"
|
||||
loginStatus.textColor = .systemRed
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user