From d66394c0b87b5a1bf50badaca681b990dcf4bdfc Mon Sep 17 00:00:00 2001 From: huangzhenpc Date: Sun, 8 Feb 2026 00:37:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=B8=8A=E6=B8=B8v0.1.74?= =?UTF-8?q?=E5=B9=B6=E7=A6=81=E7=94=A8=E6=9B=B4=E6=96=B0=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=92=8C=E5=90=8E=E5=8F=B0=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- backend/internal/handler/admin/system_handler.go | 14 +++++++------- deploy/docker-compose.yml | 2 +- frontend/src/components/common/VersionBadge.vue | 4 ++-- frontend/src/stores/app.ts | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/backend/internal/handler/admin/system_handler.go b/backend/internal/handler/admin/system_handler.go index 28c075aa..22442a4e 100644 --- a/backend/internal/handler/admin/system_handler.go +++ b/backend/internal/handler/admin/system_handler.go @@ -35,13 +35,13 @@ func (h *SystemHandler) GetVersion(c *gin.Context) { // CheckUpdates checks for available updates // GET /api/v1/admin/system/check-updates func (h *SystemHandler) CheckUpdates(c *gin.Context) { - force := c.Query("force") == "true" - info, err := h.updateSvc.CheckUpdate(c.Request.Context(), force) - if err != nil { - response.Error(c, http.StatusInternalServerError, err.Error()) - return - } - response.Success(c, info) + info, _ := h.updateSvc.CheckUpdate(c.Request.Context(), false) + response.Success(c, gin.H{ + "current_version": info.CurrentVersion, + "latest_version": info.CurrentVersion, + "has_update": false, + "build_type": "source", + }) } // PerformUpdate downloads and applies the update diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index c3c03fa6..a36493eb 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -10,7 +10,7 @@ # All configuration is done via environment variables. # No Setup Wizard needed - the system auto-initializes on first run. # ============================================================================= - +name: xinghuoapi services: # =========================================================================== # Sub2API Application diff --git a/frontend/src/components/common/VersionBadge.vue b/frontend/src/components/common/VersionBadge.vue index fbff4185..e0c2ccd2 100644 --- a/frontend/src/components/common/VersionBadge.vue +++ b/frontend/src/components/common/VersionBadge.vue @@ -375,8 +375,8 @@ const updateError = ref('') const updateSuccess = ref(false) const restartCountdown = ref(0) -// Only show update check for release builds (binary/docker deployment) -const isReleaseBuild = computed(() => buildType.value === 'release') +// Disable update module - always treat as source build +const isReleaseBuild = computed(() => false) function toggleDropdown() { dropdownOpen.value = !dropdownOpen.value diff --git a/frontend/src/stores/app.ts b/frontend/src/stores/app.ts index 0abf5a53..3241403f 100644 --- a/frontend/src/stores/app.ts +++ b/frontend/src/stores/app.ts @@ -255,10 +255,10 @@ export const useAppStore = defineStore('app', () => { try { const data = await checkUpdatesAPI(force) currentVersion.value = data.current_version - latestVersion.value = data.latest_version - hasUpdate.value = data.has_update - buildType.value = data.build_type || 'source' - releaseInfo.value = data.release_info || null + latestVersion.value = data.current_version + hasUpdate.value = false + buildType.value = 'source' + releaseInfo.value = null versionLoaded.value = true return data } catch (error) {