feat(qa-ops): 重做四页布局与周报草稿导出
build / build (push) Successful in 1m3s

This commit is contained in:
姚章浩
2026-10-18 20:00:38 +08:00
parent 3e7fcce0b1
commit 93aabc8a81
18 changed files with 1037 additions and 157 deletions
+2 -3
View File
@@ -9,7 +9,6 @@ interface ViewProps {
submitting: boolean
onSync: () => void
}
const stamp = (v: string) => new Date(v).toLocaleString('zh-CN', { hour12: false })
export function QAMirrorSyncView(p: ViewProps) {
const s = p.status
const active = mirrorSyncActive(s)
@@ -17,7 +16,7 @@ export function QAMirrorSyncView(p: ViewProps) {
<section className="qa-mirror-sync" aria-label="问答本地数据库与同步状态">
<div className="qa-mirror-sync-line">
<strong>本地数据库</strong>
<span>每 5 分钟后台同步 · 查询不请求远端</span>
{s?.ready ? <span>已同步 {s.records} 条</span> : null}
<button type="button" onClick={p.onSync} disabled={p.submitting || !s?.worker_ready || active}>
{p.submitting ? '正在入队…' : active ? '后台同步中…' : '立即同步'}
@@ -30,7 +29,7 @@ export function QAMirrorSyncView(p: ViewProps) {
? '源端权限校验未通过,本地读取已阻断;修复授权后可重新同步。'
: !s.ready
? '首次同步尚未完成,暂不把未同步数据视为空结果。'
: `最近成功同步:${stamp(s.last_success_at!)};页面基于该本地副本,不承诺实时源快照。`}
: ''}
{s?.job && active ? (
<span>
{' '}