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 =
- 当前 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 && (
+
+ )}
v{__APP_VERSION__}
+
- Next Remote Protocol Framework · 下一代远程协议框架
-- 以轻量注入驱动 QQ NT,对外提供标准 OneBot v11 接口,让机器人一次部署、长期稳定运行。 -
- - {/* Update status */} -喜欢 SnowLuma?点个 Star 支持一下
-- 开源不易,你的 ⭐ 是我们持续维护的最大动力。 +
+ Next Remote Protocol Framework · 下一代远程协议框架
++ 以轻量注入驱动 QQ NT,对外提供标准 OneBot v11 接口,让机器人一次部署、长期稳定运行。
-喜欢 SnowLuma?给个 Star 支持一下
++ 开源不易,你的 ⭐ 是我们持续维护的最大动力。 +
+