增加企微旧包刷新护栏(07-27-yang-jun-reimbursement-readiness)
ci-e2e / e2e (push) Canceled after 0s
ci-minimal / check-minimal (push) Canceled after 0s

这个提交包含在:
2026-07-31 17:40:25 +08:00
父节点 39c3e808a3
当前提交 e123d50f86
共修改 9 个文件,包含 308 行新增和 1 行删除
@@ -0,0 +1,29 @@
import { Button } from "../ui/button";
import { usePwaUpdatePrompt } from "../../hooks/usePwaUpdatePrompt";
export function AppPwaUpdateNotice() {
const { updateReady, applyUpdate } = usePwaUpdatePrompt();
if (!updateReady) {
return null;
}
return (
<div
aria-label="系统更新"
className="mb-4 flex flex-col gap-3 rounded-xl border border-primary/20 bg-white px-4 py-3 text-sm text-slate-700 shadow-sm sm:flex-row sm:items-center sm:justify-between"
data-testid="app-pwa-update-notice"
role="region"
>
<div aria-live="polite">
<div className="font-semibold text-slate-900">发现新版本</div>
<div className="mt-1 leading-6">刷新后即可使用最新功能,当前页面不会自动重载。</div>
</div>
<div className="flex shrink-0 gap-2">
<Button className="min-w-24" type="button" onClick={applyUpdate}>
点击刷新
</Button>
</div>
</div>
);
}