mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-12 10:16:37 +08:00
feat: 增强更新功能,支持开发版本的自我升级检查;优化仪表板和应用日志页面的用户界面
This commit is contained in:
@@ -124,8 +124,9 @@ func fetchLatestRelease(ctx context.Context) (*githubReleaseResponse, error) {
|
||||
|
||||
func buildLatestServerReleaseView(release *githubReleaseResponse) *LatestServerRelease {
|
||||
currentVersion := strings.TrimSpace(common.Version)
|
||||
isDevBuild := currentVersion == "" || strings.EqualFold(currentVersion, "dev")
|
||||
hasUpdate := false
|
||||
if release != nil {
|
||||
if release != nil && !isDevBuild {
|
||||
hasUpdate = isVersionNewer(currentVersion, release.TagName)
|
||||
}
|
||||
|
||||
@@ -136,7 +137,7 @@ func buildLatestServerReleaseView(release *githubReleaseResponse) *LatestServerR
|
||||
view := &LatestServerRelease{
|
||||
CurrentVersion: currentVersion,
|
||||
HasUpdate: hasUpdate,
|
||||
UpgradeSupported: runtime.GOOS != "windows",
|
||||
UpgradeSupported: !isDevBuild && runtime.GOOS != "windows",
|
||||
InProgress: inProgress,
|
||||
}
|
||||
if release != nil {
|
||||
|
||||
Reference in New Issue
Block a user