feat(updater): professional update modal with skip, changelog, and OS-aware downloader

Replaces the small corner toast with a centered modal that appears on
startup when a newer GitHub release is detected (4 s delay).

Features:
- Skip this Version: stores skipped tag in localStorage, reappears only
  for newer releases
- Collapsible changelog: renders GitHub release body as markdown accordion
- OS-aware download: Windows → .exe installer, macOS → .dmg (aarch64
  preferred), Linux Arch → AUR hint (yay/pacman), Linux other → .AppImage/.deb
- In-app downloader: Rust download_update command streams to ~/Downloads/,
  emits update:download:progress every 250 ms for a real-time progress bar
- Post-download: Show in Folder button opens Downloads dir via shell.open
- Buttons: Download Now / Skip this Version / Remind me Later

Rust: check_arch_linux() reads /etc/arch-release + /etc/os-release
platform.ts: adds IS_MACOS, IS_WINDOWS alongside existing IS_LINUX
Settings About: Preview Update Modal button for testing
Fixes: renderInline regex had nested capture group causing undefined entries
in split() result → TypeError → React crash → WebKit white-screen freeze

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-09 13:23:37 +02:00
parent 5d067b1f8b
commit 9c57d4f887
12 changed files with 687 additions and 50 deletions
+12
View File
@@ -346,6 +346,18 @@ export const zhTranslation = {
updaterAvailable: '有可用更新',
updaterVersion: 'v{{version}} 已发布',
updaterWebsite: '官网',
updaterModalTitle: '有新版本可用',
updaterChangelog: '更新内容',
updaterDownloadBtn: '立即下载',
updaterSkipBtn: '跳过此版本',
updaterRemindBtn: '稍后提醒',
updaterDone: '下载完成',
updaterShowFolder: '在文件夹中显示',
updaterInstallHint: '请关闭 Psysonic 并手动运行安装程序。',
updaterAurHint: '通过 AUR 安装更新:',
updaterErrorMsg: '下载失败',
updaterRetryBtn: '重试',
updaterOpenGitHub: '在 GitHub 上打开',
},
settings: {
title: '设置',