fix(reports): header 「生成报告」 joins the report disabled-button rule (BUG-1078)

The generate button renders in SecondaryPageShell's actions slot, outside the
report roots, so while submitting it still got the global 45% fade. A
report-owned `report-center-generate` class brings it into the disabled rule;
SecondaryPageShell and button.tsx unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
Jesse_Chen
2026-09-28 15:54:53 +08:00
co-authored by Claude Opus 5.5
parent 873fac8a5b
commit 36fae8fabf
6 changed files with 24 additions and 6 deletions
+4 -1
View File
@@ -4014,6 +4014,8 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class
dark = --color-ink #f2f0ea on --color-action-on-dark #8f4a33 (5.77:1),
hover mixes 6% ink in (5.1:1).
- Disabled, any variant: a neutral grey fill with tertiary ink, opacity 1.
「生成报告」 lives in the SecondaryPageShell header, outside these roots,
so it carries its own `.report-center-generate` hook for this rule.
The solid variant is matched as `[class~="bg-primary"]`, not `.bg-primary`:
this sheet does not define Tailwind utilities, and class-name-definition-
contract reads every `.name` here as one of our own class families. */
@@ -4044,7 +4046,8 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class
background: var(--report-button-fill-hover);
}
}
:is(.report-center-message, .report-center-body, .personal-report-state, .personal-report-reader) [data-slot="button"]:disabled {
:is(.report-center-message, .report-center-body, .personal-report-state, .personal-report-reader) [data-slot="button"]:disabled,
.report-center-generate[data-slot="button"]:disabled {
opacity: 1;
border-color: transparent;
background: var(--color-canvas-strong);
@@ -207,7 +207,7 @@ export function GeneratePersonalReportButton({
type="button"
variant="outline"
size="sm"
className="shrink-0 whitespace-nowrap"
className="report-center-generate shrink-0 whitespace-nowrap"
onClick={() => void handleGenerate()}
disabled={submitting}
title="根据已保存的具体出生分钟生成完整报告;未校正会标明方向性参考"