同步上游v0.1.74并禁用更新模块显示和后台检查
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,13 +35,13 @@ func (h *SystemHandler) GetVersion(c *gin.Context) {
|
|||||||
// CheckUpdates checks for available updates
|
// CheckUpdates checks for available updates
|
||||||
// GET /api/v1/admin/system/check-updates
|
// GET /api/v1/admin/system/check-updates
|
||||||
func (h *SystemHandler) CheckUpdates(c *gin.Context) {
|
func (h *SystemHandler) CheckUpdates(c *gin.Context) {
|
||||||
force := c.Query("force") == "true"
|
info, _ := h.updateSvc.CheckUpdate(c.Request.Context(), false)
|
||||||
info, err := h.updateSvc.CheckUpdate(c.Request.Context(), force)
|
response.Success(c, gin.H{
|
||||||
if err != nil {
|
"current_version": info.CurrentVersion,
|
||||||
response.Error(c, http.StatusInternalServerError, err.Error())
|
"latest_version": info.CurrentVersion,
|
||||||
return
|
"has_update": false,
|
||||||
}
|
"build_type": "source",
|
||||||
response.Success(c, info)
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// PerformUpdate downloads and applies the update
|
// PerformUpdate downloads and applies the update
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# All configuration is done via environment variables.
|
# All configuration is done via environment variables.
|
||||||
# No Setup Wizard needed - the system auto-initializes on first run.
|
# No Setup Wizard needed - the system auto-initializes on first run.
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
name: xinghuoapi
|
||||||
services:
|
services:
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# Sub2API Application
|
# Sub2API Application
|
||||||
|
|||||||
@@ -375,8 +375,8 @@ const updateError = ref('')
|
|||||||
const updateSuccess = ref(false)
|
const updateSuccess = ref(false)
|
||||||
const restartCountdown = ref(0)
|
const restartCountdown = ref(0)
|
||||||
|
|
||||||
// Only show update check for release builds (binary/docker deployment)
|
// Disable update module - always treat as source build
|
||||||
const isReleaseBuild = computed(() => buildType.value === 'release')
|
const isReleaseBuild = computed(() => false)
|
||||||
|
|
||||||
function toggleDropdown() {
|
function toggleDropdown() {
|
||||||
dropdownOpen.value = !dropdownOpen.value
|
dropdownOpen.value = !dropdownOpen.value
|
||||||
|
|||||||
@@ -255,10 +255,10 @@ export const useAppStore = defineStore('app', () => {
|
|||||||
try {
|
try {
|
||||||
const data = await checkUpdatesAPI(force)
|
const data = await checkUpdatesAPI(force)
|
||||||
currentVersion.value = data.current_version
|
currentVersion.value = data.current_version
|
||||||
latestVersion.value = data.latest_version
|
latestVersion.value = data.current_version
|
||||||
hasUpdate.value = data.has_update
|
hasUpdate.value = false
|
||||||
buildType.value = data.build_type || 'source'
|
buildType.value = 'source'
|
||||||
releaseInfo.value = data.release_info || null
|
releaseInfo.value = null
|
||||||
versionLoaded.value = true
|
versionLoaded.value = true
|
||||||
return data
|
return data
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user