增加企微旧包刷新护栏(07-27-yang-jun-reimbursement-readiness)
这个提交包含在:
@@ -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>
|
||||
);
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户