macos: clean up the permission request

This commit is contained in:
Mitchell Hashimoto
2025-10-08 21:21:26 -07:00
parent 9e17255ca9
commit b4ab1cc1ed
3 changed files with 10 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ class UpdateViewModel: ObservableObject {
case .idle:
return ""
case .permissionRequest:
return "Update Permission"
return "Enable Automatic Updates?"
case .checking:
return "Checking for Updates…"
case .updateAvailable(let update):
@@ -67,7 +67,9 @@ class UpdateViewModel: ObservableObject {
switch state {
case .idle:
return .secondary
case .permissionRequest, .checking:
case .permissionRequest:
return .white
case .checking:
return .secondary
case .updateAvailable, .readyToInstall:
return .accentColor
@@ -83,6 +85,8 @@ class UpdateViewModel: ObservableObject {
/// The background color for the update pill.
var backgroundColor: Color {
switch state {
case .permissionRequest:
return Color(nsColor: NSColor.systemBlue.blended(withFraction: 0.3, of: .black) ?? .systemBlue)
case .updateAvailable:
return .accentColor
case .readyToInstall:
@@ -99,6 +103,8 @@ class UpdateViewModel: ObservableObject {
/// The foreground (text) color for the update pill.
var foregroundColor: Color {
switch state {
case .permissionRequest:
return .white
case .updateAvailable, .readyToInstall:
return .white
case .notFound: