新增: 应用内版本更新与自动升级全链路

后端 update.rs: app_check_update(拉 latest.json+ed25519 签名校验) /
app_download_install_update / prefs 读写 / mark_checked / mark_notified 五命令,
lib.rs 注册;tauri.conf updater 段(endpoints=app.1216.top/download/devflow/latest.json
+ pubkey + createUpdaterArtifacts) + tauri-plugin-updater 依赖 + capabilities 权限。

前端 UpdateBadge.vue(顶栏徽章+下拉) / useUpdateCheck.ts(检查/下载/安装状态机) /
AboutPanel.vue(设置页关于面板) + AppLayout 接线 + SettingsNav/searchIndex 索引 +
i18n zh/en settings 键。

运维 scripts/publish-release.ps1(发版) + swap-install.ps1(换装校验) +
设计文档 版本更新与自动升级-设计-2026-10-09.md。

验收: cargo check -p devflow EXIT 0 + vue-tsc EXIT 0 + build EXIT 0。
This commit is contained in:
lxy
2026-10-09 22:53:14 +08:00
parent c70faa7bb8
commit a8c92e9619
27 changed files with 2021 additions and 24 deletions
+38
View File
@@ -11,6 +11,7 @@ export default {
navSecurity: 'Security',
navIntegrations: 'Integrations',
navAdvanced: 'Advanced',
navAbout: 'About',
// ===== Settings search (phase 4) =====
searchPlaceholder: 'Search settings…',
@@ -132,6 +133,42 @@ export default {
sectionAppearance: '🎨 Appearance',
sectionPerformance: '⚡ Performance',
sectionAdvanced: '⚙️ Advanced',
// ===== About (B1/L0 version governance: version visibility + update entry) =====
sectionAbout: 'ℹ️ About DevFlow',
labelAppVersion: 'Current version',
descAppVersion: 'DevFlow desktop app version (injected at compile time, same source as the installer)',
labelCheckUpdate: 'Check for updates',
descCheckUpdate: 'Fetch the latest version info from the release source; a new version prompts download & install (wired in B2)',
checkUpdateAction: 'Check for updates',
checkUpdateChecking: 'Checking…',
checkUpdateNotReady: 'Check-for-updates is coming soon',
checkUpdateFound: 'New version v{version} available',
checkUpdateLatest: 'Already up to date (v{version})',
checkUpdateFailed: 'Check failed: {error}',
labelAutoCheckUpdate: 'Auto check for updates',
descAutoCheckUpdate: 'Automatically check for new versions on startup (notify only, never auto-install)',
labelCheckInterval: 'Check interval',
descCheckInterval: 'Interval between automatic checks',
interval5m: '5 minutes',
interval15m: '15 minutes',
interval30m: '30 minutes',
interval60m: '60 minutes',
labelLastCheck: 'Last checked',
lastCheckNever: 'Never checked',
updateAvailableTitle: '🎉 New version v{version} available',
updateBadgeTitle: 'New version available, click to view',
updateBadgeText: 'New v{version}',
updateLater: 'Later',
updateNow: 'Update now',
updateInstalling: 'Updating…',
updateInstallingStage: 'Installing, the app will restart shortly…',
updateDownloading: 'Downloading {percent}% ({done} / {total} MB)',
updateDownloadingUnknown: 'Downloading…',
updateInstallFailed: 'Update failed: {error}',
updateNotReady: 'Download & install is coming soon',
labelBuildTime: 'Build time',
labelGitHash: 'Git commit',
labelTheme: 'Theme',
descTheme: 'Dark / light',
themeDark: '🌙 Dark',
@@ -267,6 +304,7 @@ export default {
labelFeishuWhitelist: 'open_id whitelist',
descFeishuWhitelist: 'Comma-separated open_id list; leave empty to allow all users',
phFeishuWhitelist: 'ou_xxx, ou_yyy',
hintFeishuWhitelist: 'How to get an open_id: after enabling, have the member send any message to the bot; the bot replies with their open_id. Paste it above to allow them (leave empty to allow everyone).',
feishuSave: 'Save',
feishuSaveOk: 'Feishu integration settings saved',
// Submit guard: when enabled=true, either of id/secret empty blocks the write