mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-06 01:37:22 +01:00
Nightly display version (#670)
* Link to nightly and parse version better * Add nightly date.
This commit is contained in:
@@ -6,7 +6,7 @@ import Brief
|
||||
|
||||
var update: Release? = nil
|
||||
|
||||
let testBuild = false
|
||||
let currentVersion = SemVer("0.0.0_preview")
|
||||
|
||||
init(update: Update = .none) {
|
||||
switch update {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user