Nightly display version (#670)

* Link to nightly and parse version better

* Add nightly date.
This commit is contained in:
Max Goedjen
2025-09-04 00:19:55 -07:00
committed by GitHub
parent e0c24917f2
commit 902d5c4a1e
8 changed files with 46 additions and 12 deletions

View File

@@ -75,7 +75,7 @@ extension ContentView {
if update.critical {
return (.updateCriticalNoticeTitle, .red)
} else {
if updater.testBuild {
if updater.currentVersion.isTestBuild {
return (.updateTestNoticeTitle, .blue)
} else {
return (.updateNormalNoticeTitle, .orange)
@@ -95,7 +95,22 @@ extension ContentView {
})
.buttonStyle(ToolbarButtonStyle(color: color))
.sheet(item: $selectedUpdate) { update in
UpdateDetailView(update: update)
VStack {
if updater.currentVersion.isTestBuild {
VStack {
if let description = updater.currentVersion.previewDescription {
Text(description)
}
Link(destination: URL(string: "https://github.com/maxgoedjen/secretive/actions/workflows/nightly.yml")!) {
Button(.updaterDownloadLatestNightlyButton) {}
.frame(maxWidth: .infinity)
.primaryButton()
}
}
.padding()
}
UpdateDetailView(update: update)
}
}
}
}