JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix(updater): 优化更新页面文案提示和按钮状态
kdgmpw9cb230f68b0d
diff --git a/jiuwenswarm/channels/web/frontend/src/components/UpdatePanel/index.tsx b/jiuwenswarm/channels/web/frontend/src/components/UpdatePanel/index.tsxindex 60c29f167e..14de452ebf 100644--- a/jiuwenswarm/channels/web/frontend/src/components/UpdatePanel/index.tsx+++ b/jiuwenswarm/channels/web/frontend/src/components/UpdatePanel/index.tsx@@ -140,7 +140,7 @@ export function UpdatePanel({ isConnected, request }: UpdatePanelProps) {}, [refreshStatus, status?.state]);const handleCheck = useCallback(async () => {- if (!isConnected || checking) return;+ if (!isConnected || checking || normalizeString(status?.state) === 'downloading') return;setChecking(true);setError(null);try {@@ -152,7 +152,7 @@ export function UpdatePanel({ isConnected, request }: UpdatePanelProps) {} finally {setChecking(false);}- }, [checking, isConnected, request, t]);+ }, [checking, isConnected, status, request, t]);const handleDownload = useCallback(async () => {if (!isConnected) return;@@ -255,7 +255,7 @@ export function UpdatePanel({ isConnected, request }: UpdatePanelProps) {<p className="text-sm text-text-muted mt-1">{t('updatePanel.subtitle')}</p></div><div className="flex items-center gap-2">- <button onClick={() => void handleCheck()} className="btn secondary" disabled={!isConnected || checking}>+ <button onClick={() => void handleCheck()} className="btn secondary" disabled={!isConnected || checking || state === 'downloading'}>{checking ? t('updatePanel.checking') : t('updatePanel.checkNow')}</button>{isPipMode ? (diff --git a/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json b/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.jsonindex e86db2657e..6505c7e1e6 100644--- a/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json+++ b/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json@@ -1612,7 +1612,7 @@},"updatePanel": {"title": "App Updates",- "subtitle": "Check for new versions and download the silent Windows installer.",+ "subtitle": "Check for new versions and download the installer.","configTitle": "Update Source Config","checkNow": "Check for updates","checking": "Checking...",@@ -1627,7 +1627,7 @@"publishedAt": "Published at","releaseNotes": "Release notes","downloadProgress": "Download progress",- "readyToInstall": "The installer is ready. Click “Install and restart” to close the app and perform a silent upgrade.",+ "readyToInstall": "The installer is ready. Click “Install and restart” to close the app and begin the upgrade.","restartPendingHint": "Upgrade complete. Click “Restart now” to restart the service.","unsupported": "This update flow is not supported on the current platform.","noReleaseNotes": "No release notes available.",@@ -1653,7 +1653,7 @@"downloadFailed": "Failed to download the update","upgradeFailed": "Failed to install the update","saveConfigFailed": "Failed to save updater config",- "installUnavailable": "The installer cannot be started here. Please run inside the Windows desktop app.",+ "installUnavailable": "The installer cannot be started here. Please run inside the desktop app.","installFailed": "Failed to launch the update installer"},"fields": {diff --git a/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json b/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.jsonindex 0eefa7520d..fde3434039 100644--- a/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json+++ b/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json@@ -1611,7 +1611,7 @@},"updatePanel": {"title": "应用更新",- "subtitle": "检查新版本并在 Windows 上下载静默安装包。",+ "subtitle": "检查新版本并下载安装包。","configTitle": "更新源配置","checkNow": "检查更新","checking": "检查中...",@@ -1626,7 +1626,7 @@"publishedAt": "发布时间","releaseNotes": "更新说明","downloadProgress": "下载进度",- "readyToInstall": "安装包已下载完成,点击「安装并重启」后将退出当前应用并静默升级。",+ "readyToInstall": "安装包已下载完成,点击「安装并重启」后退出应用开始升级。","restartPendingHint": "升级完成,请点击「立即重启」重启服务。","unsupported": "当前平台暂不支持此更新流程。","noReleaseNotes": "暂无更新说明。",@@ -1652,7 +1652,7 @@"downloadFailed": "下载更新失败","upgradeFailed": "安装更新失败","saveConfigFailed": "保存更新配置失败",- "installUnavailable": "当前环境无法直接触发安装,请确认在 Windows 桌面应用内运行。",+ "installUnavailable": "当前环境无法直接触发安装,请确认在桌面应用内运行。","installFailed": "启动更新安装失败"},"fields": {