summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2025-10-08 21:21:26 -0700
committerMitchell Hashimoto <m@mitchellh.com>2025-10-08 21:21:27 -0700
commitb4ab1cc1edd273577449c9ced8f713c4293134b7 (patch)
tree9e7dd5976deb38e11a01f9f16ef02a0cd132f7a7
parent9e17255ca9f097ebcccb0025ce32c798360f31a0 (diff)
macos: clean up the permission request
-rw-r--r--macos/Sources/App/macOS/AppDelegate.swift2
-rw-r--r--macos/Sources/Features/Update/UpdatePopoverView.swift2
-rw-r--r--macos/Sources/Features/Update/UpdateViewModel.swift10
3 files changed, 10 insertions, 4 deletions
diff --git a/macos/Sources/App/macOS/AppDelegate.swift b/macos/Sources/App/macOS/AppDelegate.swift
index 9e1425062..62c5c0316 100644
--- a/macos/Sources/App/macOS/AppDelegate.swift
+++ b/macos/Sources/App/macOS/AppDelegate.swift
@@ -1008,7 +1008,7 @@ class AppDelegate: NSObject,
}
@IBAction func checkForUpdates(_ sender: Any?) {
- UpdateSimulator.error.simulate(with: updateViewModel)
+ UpdateSimulator.permissionRequest.simulate(with: updateViewModel)
}
diff --git a/macos/Sources/Features/Update/UpdatePopoverView.swift b/macos/Sources/Features/Update/UpdatePopoverView.swift
index cbe517f74..7f1886d60 100644
--- a/macos/Sources/Features/Update/UpdatePopoverView.swift
+++ b/macos/Sources/Features/Update/UpdatePopoverView.swift
@@ -62,7 +62,7 @@ fileprivate struct PermissionRequestView: View {
Text("Enable automatic updates?")
.font(.system(size: 13, weight: .semibold))
- Text("Ghostty can automatically check for and download updates in the background.")
+ Text("Ghostty can automatically check for updates in the background.")
.font(.system(size: 11))
.foregroundColor(.secondary)
.fixedSize(horizontal: false, vertical: true)
diff --git a/macos/Sources/Features/Update/UpdateViewModel.swift b/macos/Sources/Features/Update/UpdateViewModel.swift
index f0b779d60..674888bb5 100644
--- a/macos/Sources/Features/Update/UpdateViewModel.swift
+++ b/macos/Sources/Features/Update/UpdateViewModel.swift
@@ -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: