From 555bc6ff5614a672d82ff5c103f92da04b86bb93 Mon Sep 17 00:00:00 2001 From: hermes Date: Mon, 26 Oct 2026 16:18:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(qa):=20=E7=A1=AE=E8=AE=A4=E5=91=A8?= =?UTF-8?q?=E6=8A=A5=E6=97=B6=E8=87=AA=E5=8A=A8=E9=99=84=E4=B8=8A=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E7=9C=8B=E6=9D=BF=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 看板图只能由浏览器渲染,改为确认动作内自动生成并上传,不再要求另点按钮;只在已附图时提供重新生成。 --- web/src/QAWeeklyMail.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/web/src/QAWeeklyMail.tsx b/web/src/QAWeeklyMail.tsx index cc7357d..2078505 100644 --- a/web/src/QAWeeklyMail.tsx +++ b/web/src/QAWeeklyMail.tsx @@ -63,6 +63,13 @@ export function QAWeeklyMail({ week, busy }: { week: string; busy: boolean }) { setConfirmation(next) setNotice(confirm ? '已确认本周周报;到设定时间会自动发送,正文改动后需重新确认' : '已取消确认,不会自动发送') setSends(await fetchWeeklyMailSends(week)) + // The chart can only be rendered by the browser, so it is generated and attached + // the moment the operator confirms — no separate step for the common path. + if (confirm && next?.current) { + setNotice('已确认本周周报;正在生成并附上统计看板图片…') + setAttaching(true) + setCapture(true) + } } catch (reason) { setError(reason instanceof Error ? reason.message : '确认失败') } finally { @@ -135,9 +142,11 @@ export function QAWeeklyMail({ week, busy }: { week: string; busy: boolean }) { - + {confirmation?.has_image && !stale ? ( + + ) : null}