fix(frontend): style the paywall header and guard undefined class names
The onboarding paywall wrote `dialog-header`, a class no stylesheet defines, so its close button stacked under the title instead of sitting beside it. The session-delete confirm buttons had the same problem, and a `message-entry` wrapper added in August had quietly killed the `.message + .message` spacing rule in the main chat. Fixes all three against the patterns already in the codebase, then adds a contract test so the next undefined class fails instead of shipping: it scopes itself to our own class families so Tailwind utilities stay out, strips CSS comments before deciding what counts as defined, and carries an allowlist of the fifteen deliberate no-op modifiers that must shrink rather than grow. Also collapses the paywall's duplicate display heading into the intro sentence, leaving one heading in the dialog. BUG-434, BUG-435, BUG-436. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
This commit is contained in:
@@ -84,18 +84,15 @@ export function OnboardingRedeemPaywall({
|
||||
else keepFocusWithin(event.nativeEvent, event.currentTarget);
|
||||
}}
|
||||
>
|
||||
<div className="dialog-header">
|
||||
<header className="account-modal-header">
|
||||
<h2 id="onboarding-paywall-title">解锁完整咨询</h2>
|
||||
<button className="dialog-close" aria-label="关闭" type="button" onClick={close} disabled={pending}>
|
||||
<X aria-hidden="true" />
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
<div className="paywall-intro">
|
||||
<span className="paywall-mark" aria-hidden="true"><Gift /></span>
|
||||
<div>
|
||||
<b>入门问题已经准备好</b>
|
||||
<p>填写兑换码,解锁后续咨询、生时校正与完整解读。</p>
|
||||
</div>
|
||||
<p><b>入门问题已经准备好。</b>填写兑换码,解锁后续咨询、生时校正与完整解读。</p>
|
||||
</div>
|
||||
<div className="redeem-balance">
|
||||
<span>当前可用点数</span>
|
||||
|
||||
Reference in New Issue
Block a user