mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-12-23 11:50:07 +01:00
✨ Add early access release notes
This commit is contained in:
@@ -86,6 +86,10 @@ struct Constants {
|
|||||||
string: "https://phpmon.app/builds/early-access/sponsors/phpmon-eap.rb"
|
string: "https://phpmon.app/builds/early-access/sponsors/phpmon-eap.rb"
|
||||||
)!
|
)!
|
||||||
|
|
||||||
|
static let EarlyAccessChangelog = URL(
|
||||||
|
string: "https://phpmon.app/early-access/release-notes"
|
||||||
|
)!
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class AppUpdater {
|
|||||||
: "brew upgrade phpmon"
|
: "brew upgrade phpmon"
|
||||||
|
|
||||||
Task { @MainActor in
|
Task { @MainActor in
|
||||||
var alert = BetterAlert().withInformation(
|
BetterAlert().withInformation(
|
||||||
title: "updater.alerts.newer_version_available.title"
|
title: "updater.alerts.newer_version_available.title"
|
||||||
.localized(latestVersionOnline.humanReadable),
|
.localized(latestVersionOnline.humanReadable),
|
||||||
subtitle: "updater.alerts.newer_version_available.subtitle"
|
subtitle: "updater.alerts.newer_version_available.subtitle"
|
||||||
@@ -89,21 +89,21 @@ class AppUpdater {
|
|||||||
vc.close(with: .OK)
|
vc.close(with: .OK)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
.withSecondary(
|
||||||
if !App.identifier.contains(".phpmon.eap") {
|
text: "updater.alerts.buttons.release_notes".localized,
|
||||||
alert = alert.withSecondary(
|
action: { _ in
|
||||||
text: "updater.alerts.buttons.release_notes".localized,
|
NSWorkspace.shared.open({
|
||||||
action: { _ in
|
if App.identifier.contains(".eap") {
|
||||||
let urlSegments = self.caskFile.url.split(separator: "/")
|
return Constants.Urls.EarlyAccessChangelog
|
||||||
let tag = urlSegments[urlSegments.count - 2] // ../download/{tag}/{file.zip}
|
} else {
|
||||||
NSWorkspace.shared.open(
|
let urlSegments = self.caskFile.url.split(separator: "/")
|
||||||
Constants.Urls.GitHubReleases.appendingPathComponent("/tag/\(tag)")
|
let tag = urlSegments[urlSegments.count - 2] // ../download/{tag}/{file.zip}
|
||||||
)
|
return Constants.Urls.GitHubReleases.appendingPathComponent("/tag/\(tag)")
|
||||||
}
|
}
|
||||||
)
|
}())
|
||||||
}
|
}
|
||||||
|
)
|
||||||
alert.withTertiary(text: "updater.alerts.buttons.dismiss".localized, action: { vc in
|
.withTertiary(text: "updater.alerts.buttons.dismiss".localized, action: { vc in
|
||||||
vc.close(with: .OK)
|
vc.close(with: .OK)
|
||||||
})
|
})
|
||||||
.show()
|
.show()
|
||||||
|
|||||||
Reference in New Issue
Block a user