全新UI语言

This commit is contained in:
2026-07-11 23:37:48 +08:00
parent 4dde861c99
commit 386a28709f
19 changed files with 1032 additions and 1931 deletions
+13 -27
View File
@@ -10,36 +10,22 @@ export const dynamic = "force-dynamic";
export default async function SettingsPage() {
const caregiver = await requireCaregiverSession("/settings");
const overview = await getCaregiverSettingsOverview(caregiver.id);
const name = getCaregiverDisplayName(caregiver);
return (
<PanelShell
currentPath="/settings"
title="设置"
description="PWA 桌面版安装,安装后即可接收实时消息推送。"
caregiverLabel={getCaregiverDisplayName(caregiver)}
>
<section className="grid gap-4 md:grid-cols-2 xl:grid-cols-4">
<div className="rounded-[28px] border border-white/80 bg-white/88 p-5 shadow-[0_20px_50px_rgba(115,76,42,0.10)]">
<p className="text-sm text-[var(--muted)]">已连接设备</p>
<p className="mt-3 font-[family-name:var(--font-display)] text-4xl text-[var(--ink)]">
{overview.deviceCount}
</p>
</div>
<div className="rounded-[28px] border border-white/80 bg-white/88 p-5 shadow-[0_20px_50px_rgba(115,76,42,0.10)]">
<p className="text-sm text-[var(--muted)]">已开启提醒的设备</p>
<p className="mt-3 font-[family-name:var(--font-display)] text-4xl text-[var(--ink)]">
{overview.pushSubscriptionCount}
</p>
</div>
<PanelShell currentPath="/settings" title="我的" caregiverLabel={name}>
<section className="card card-pad" style={{ display: "flex", alignItems: "center", gap: 12 }}>
<span className="avatar" style={{ width: 44, height: 44, fontSize: 17 }}>{name.slice(-1)}</span>
<span className="row-main"><strong style={{ display: "block", fontSize: 15 }}>{name}</strong><span className="row-meta">已绑定 {overview.deviceCount} 台设备 · {overview.pushSubscriptionCount} 台设备已开启提醒</span></span>
</section>
<section className="grid gap-6 xl:grid-cols-2">
<PwaControls />
<PushTestPanel
initialSubscriptionCount={overview.pushSubscriptionCount}
deviceCount={overview.deviceCount}
/>
</section>
<div className="settings-controls"><PwaControls /></div>
<div className="settings-controls"><PushTestPanel initialSubscriptionCount={overview.pushSubscriptionCount} deviceCount={overview.deviceCount} /></div>
<form action="/api/account/logout" method="post" className="card">
<button type="submit" className="list-row" style={{ justifyContent: "center", color: "var(--danger)", fontWeight: 500 }}>退出登录</button>
</form>
<p className="muted-note" style={{ textAlign: "center" }}>安智伴 · AI 数字人陪护 · 家属端 v2</p>
</PanelShell>
);
}
}