From bc3871c9b16360eb7d79ce68c68cd1107b94dae9 Mon Sep 17 00:00:00 2001
From: digua
Date: Tue, 26 May 2026 23:08:48 +0800
Subject: [PATCH] fix(settings): remove broken web update action
---
src/components/common/Settings/AboutTab.vue | 49 ++-------------------
src/i18n/locales/en-US/settings.json | 1 +
src/i18n/locales/ja-JP/settings.json | 1 +
src/i18n/locales/zh-CN/settings.json | 1 +
src/i18n/locales/zh-TW/settings.json | 1 +
5 files changed, 8 insertions(+), 45 deletions(-)
diff --git a/src/components/common/Settings/AboutTab.vue b/src/components/common/Settings/AboutTab.vue
index fd9b56e9..a737a82f 100644
--- a/src/components/common/Settings/AboutTab.vue
+++ b/src/components/common/Settings/AboutTab.vue
@@ -42,8 +42,6 @@ async function toggleAnalytics(enabled: boolean) {
}
}
-const isUpdating = ref(false)
-
async function checkUpdate() {
isCheckingUpdate.value = true
try {
@@ -55,13 +53,7 @@ async function checkUpdate() {
} else if (result.hasUpdate) {
toast.success(t('settings.about.newVersionAvailable', { version: result.latestVersion }), {
duration: 15_000,
- actions: [
- {
- label: t('settings.about.updateNow'),
- icon: 'i-heroicons-arrow-down-tray',
- onClick: () => performUpdate(),
- },
- ],
+ description: IS_ELECTRON ? undefined : t('settings.about.webUpdateHint'),
})
} else {
toast.success(t('settings.about.upToDate'))
@@ -79,23 +71,6 @@ async function checkUpdate() {
}
}
-async function performUpdate() {
- isUpdating.value = true
- toast.info(t('settings.about.updating'))
- try {
- const result = await usePlatformService().performUpdate()
- if (result.success) {
- toast.success(t('settings.about.updateSuccess'), { duration: 60_000 })
- } else {
- toast.fail(t('settings.about.updateFailed', { error: result.error || '' }))
- }
- } catch (error) {
- toast.fail(t('settings.about.updateFailed', { error: String(error) }))
- } finally {
- isUpdating.value = false
- }
-}
-
onMounted(() => {
loadAppVersion()
loadAnalyticsEnabled()
@@ -124,25 +99,9 @@ onMounted(() => {
{{ t('settings.about.version') }} {{ appVersion }}
-
-
- {{
- isUpdating
- ? t('settings.about.updating')
- : isCheckingUpdate
- ? t('settings.about.checking')
- : t('settings.about.checkUpdate')
- }}
+
+
+ {{ isCheckingUpdate ? t('settings.about.checking') : t('settings.about.checkUpdate') }}
diff --git a/src/i18n/locales/en-US/settings.json b/src/i18n/locales/en-US/settings.json
index 161fe7ba..bc8b6172 100644
--- a/src/i18n/locales/en-US/settings.json
+++ b/src/i18n/locales/en-US/settings.json
@@ -379,6 +379,7 @@
"upToDate": "You are up to date",
"newVersionAvailable": "New version {version} available",
"updateNow": "Update Now",
+ "webUpdateHint": "Run npm install -g chatlab-cli@latest in your terminal, then restart the service.",
"updating": "Updating...",
"updateSuccess": "Update successful, please restart the service to apply",
"updateFailed": "Update failed: {error}",
diff --git a/src/i18n/locales/ja-JP/settings.json b/src/i18n/locales/ja-JP/settings.json
index a0b45c85..c6f9e3fd 100644
--- a/src/i18n/locales/ja-JP/settings.json
+++ b/src/i18n/locales/ja-JP/settings.json
@@ -379,6 +379,7 @@
"upToDate": "最新バージョンです",
"newVersionAvailable": "新しいバージョン {version} があります",
"updateNow": "今すぐ更新",
+ "webUpdateHint": "ターミナルで npm install -g chatlab-cli@latest を実行し、サービスを再起動してください。",
"updating": "更新中...",
"updateSuccess": "更新が完了しました。サービスを再起動してください",
"updateFailed": "更新に失敗しました:{error}",
diff --git a/src/i18n/locales/zh-CN/settings.json b/src/i18n/locales/zh-CN/settings.json
index bf00a04e..4ca62870 100644
--- a/src/i18n/locales/zh-CN/settings.json
+++ b/src/i18n/locales/zh-CN/settings.json
@@ -379,6 +379,7 @@
"upToDate": "已是最新版本",
"newVersionAvailable": "发现新版本 {version}",
"updateNow": "立即更新",
+ "webUpdateHint": "请在终端运行 npm install -g chatlab-cli@latest 后重启服务。",
"updating": "更新中...",
"updateSuccess": "更新成功,请重启服务以生效",
"updateFailed": "更新失败:{error}",
diff --git a/src/i18n/locales/zh-TW/settings.json b/src/i18n/locales/zh-TW/settings.json
index adf44a7b..49b40d34 100644
--- a/src/i18n/locales/zh-TW/settings.json
+++ b/src/i18n/locales/zh-TW/settings.json
@@ -379,6 +379,7 @@
"upToDate": "已是最新版本",
"newVersionAvailable": "發現新版本 {version}",
"updateNow": "立即更新",
+ "webUpdateHint": "請在終端機執行 npm install -g chatlab-cli@latest 後重啟服務。",
"updating": "更新中...",
"updateSuccess": "更新成功,請重啟服務以生效",
"updateFailed": "更新失敗:{error}",