From 7d647e0ed7b05133befefb180ba3fe638aa4eb18 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sat, 13 Jun 2026 23:50:55 +0800 Subject: [PATCH] feat(webui): redesign settings About panel in the Apple style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Split the single centered card into a clean three-section stack consistent with the rest of settings: - Brand hero card: logo glow + name + version pill + tagline/description. - "软件更新" grouped list (reuses Group/SettingRow): current-version row + check-update row (status dot/spinner + 重新检查); when an update exists, a tinted detail block with version, notes, platform asset hint and 前往下载. - Support card: refined Star CTA + repo/releases/issues links. UpdateStatus → UpdateGroup; all update states (checking/disabled/error/ latest) preserved. --- .../src/components/pages/settings-page.tsx | 193 +++++++++--------- 1 file changed, 95 insertions(+), 98 deletions(-) diff --git a/packages/webui/src/components/pages/settings-page.tsx b/packages/webui/src/components/pages/settings-page.tsx index 6b59aaaf..a828aea6 100644 --- a/packages/webui/src/components/pages/settings-page.tsx +++ b/packages/webui/src/components/pages/settings-page.tsx @@ -758,44 +758,43 @@ function assetHint(latest: string, platform?: string, arch?: string): string | n return null; } -// Advisory update status. Read-only: links to the GitHub release; SnowLuma -// never downloads or applies anything itself. -function UpdateStatus() { +// Advisory software update, shown as a grouped list. Read-only: links to the +// GitHub release; SnowLuma never downloads or applies anything itself. +function UpdateGroup() { const { updateInfo, refreshUpdate, systemInfo } = useAppState(); const [checking, setChecking] = useState(false); const onCheck = async () => { setChecking(true); - try { - await refreshUpdate(true); - } finally { - setChecking(false); - } + try { await refreshUpdate(true); } finally { setChecking(false); } }; - const checkButton = ( - - ); + const disabledCheck = updateInfo?.error === 'disabled'; + let status: ReactNode; + if (!updateInfo) status = 正在检查…; + else if (disabledCheck) status = 检查已关闭; + else if (updateInfo.error) status = 无法检查; + else if (updateInfo.hasUpdate && updateInfo.latest) status = 发现新版本; + else status = 已是最新; + + // Rich detail block, only when an update is available (narrows `latest`). + let detail: ReactNode = null; if (updateInfo?.hasUpdate && updateInfo.latest) { - const hint = assetHint(updateInfo.latest, systemInfo?.platform, systemInfo?.arch); - return ( -
+ const latest = updateInfo.latest; + const hint = assetHint(latest, systemInfo?.platform, systemInfo?.arch); + detail = ( +
- 发现新版本 v{updateInfo.latest} + v{latest} {updateInfo.publishedAt && ( {new Date(updateInfo.publishedAt).toLocaleDateString()} )}
-

- 当前 v{updateInfo.current} → 最新 v{updateInfo.latest} -

+

当前 v{updateInfo.current} → 最新 v{latest}

{updateInfo.notes && (
             {updateInfo.notes}
@@ -803,99 +802,97 @@ function UpdateStatus() {
         )}
         {hint && (
           

- 适合你的平台: - {hint} - (在下载页选择) + 适合你的平台:{hint}(在下载页选择)

)} -
- {updateInfo.htmlUrl && ( - - )} - {checkButton} -
+ {updateInfo.htmlUrl && ( + + )}
); } - let text: string; - if (!updateInfo) text = '正在检查更新…'; - else if (updateInfo.error === 'disabled') text = '更新检查已关闭'; - else if (updateInfo.error) text = '无法检查更新'; - else text = `已是最新版本(v${updateInfo.current})`; - - const ok = !!updateInfo && !updateInfo.error; - return ( -
- - {ok ? : } - {text} - - {updateInfo?.error !== 'disabled' && checkButton} -
+ + + v{__APP_VERSION__} + + +
+ {status} + {!disabledCheck && ( + + )} +
+
+ {detail} +
); } function AboutPanel() { return ( - - - {/* brand hero */} - -
-
- SnowLuma -
-
- SnowLuma - - v{__APP_VERSION__} - -
-

Next Remote Protocol Framework · 下一代远程协议框架

- - -

- 以轻量注入驱动 QQ NT,对外提供标准 OneBot v11 接口,让机器人一次部署、长期稳定运行。 -

- - {/* Update status */} - - - {/* Star CTA */} -
- -

喜欢 SnowLuma?点个 Star 支持一下

-

- 开源不易,你的 ⭐ 是我们持续维护的最大动力。 +

+ {/* brand hero */} + + + +
+
+ SnowLuma +
+
+ SnowLuma + + v{__APP_VERSION__} + +
+

Next Remote Protocol Framework · 下一代远程协议框架

+ +

+ 以轻量注入驱动 QQ NT,对外提供标准 OneBot v11 接口,让机器人一次部署、长期稳定运行。

- -
- - {/* secondary links */} -
- 仓库 - 发行版 - 反馈问题 -
-
-
+
+ 仓库 + 发行版 + 反馈问题 +
+ + +
); }