summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2025-10-08 21:45:46 -0700
committerMitchell Hashimoto <m@mitchellh.com>2025-10-08 21:45:48 -0700
commitabab6899f93acc461f84a08cd333a6c93069dab1 (patch)
tree22a62f0aad2e441d56777b280baa1f71995fc778
parentbce49a08438b39bbc699348d8308e724f6334f75 (diff)
macos: better update descriptions
-rw-r--r--macos/Sources/Features/Update/UpdatePopoverView.swift25
1 files changed, 24 insertions, 1 deletions
diff --git a/macos/Sources/Features/Update/UpdatePopoverView.swift b/macos/Sources/Features/Update/UpdatePopoverView.swift
index 7f1886d60..ae1dc9c28 100644
--- a/macos/Sources/Features/Update/UpdatePopoverView.swift
+++ b/macos/Sources/Features/Update/UpdatePopoverView.swift
@@ -124,6 +124,8 @@ fileprivate struct UpdateAvailableView: View {
let update: UpdateState.UpdateAvailable
let dismiss: DismissAction
+ private let labelWidth: CGFloat = 60
+
var body: some View {
VStack(alignment: .leading, spacing: 0) {
VStack(alignment: .leading, spacing: 12) {
@@ -135,11 +137,32 @@ fileprivate struct UpdateAvailableView: View {
HStack(spacing: 6) {
Text("Version:")
.foregroundColor(.secondary)
- .frame(width: 50, alignment: .trailing)
+ .frame(width: labelWidth, alignment: .trailing)
Text(update.appcastItem.displayVersionString)
}
.font(.system(size: 11))
+
+ if update.appcastItem.contentLength > 0 {
+ HStack(spacing: 6) {
+ Text("Size:")
+ .foregroundColor(.secondary)
+ .frame(width: labelWidth, alignment: .trailing)
+ Text(ByteCountFormatter.string(fromByteCount: Int64(update.appcastItem.contentLength), countStyle: .file))
+ }
+ .font(.system(size: 11))
+ }
+
+ if let date = update.appcastItem.date {
+ HStack(spacing: 6) {
+ Text("Released:")
+ .foregroundColor(.secondary)
+ .frame(width: labelWidth, alignment: .trailing)
+ Text(date.formatted(date: .abbreviated, time: .omitted))
+ }
+ .font(.system(size: 11))
+ }
}
+ .textSelection(.enabled)
}
HStack(spacing: 8) {