隐藏空通知条
启动器通知列表为空时不渲染顶部通知条 移除登录页顶部通知占位背景 补充默认无通知条的启动器测试
This commit is contained in:
@@ -75,6 +75,11 @@ const AGENT_RUN_HISTORY_VISIBLE_STEP = 20;
|
||||
const CONVERSATION_INITIAL_VISIBLE_COUNT = 20;
|
||||
const CONVERSATION_VISIBLE_STEP = 20;
|
||||
const ACCESS_TOKEN_STORAGE_KEY = 'genarrative.auth.access-token.v1';
|
||||
const launcherNotifications: Array<{
|
||||
label: string;
|
||||
detail: string;
|
||||
actionLabel: string;
|
||||
}> = [];
|
||||
type LauncherView = 'home' | 'projects' | 'guide' | 'contact' | 'news';
|
||||
|
||||
interface InitLocalProjectResult {
|
||||
@@ -2074,22 +2079,17 @@ export function WorkspaceLauncher({
|
||||
</button>
|
||||
</aside>
|
||||
<section className="launcher-main">
|
||||
<header className="launcher-promo" aria-label="限时优惠">
|
||||
<span className="launcher-countdown">0</span>
|
||||
<span className="launcher-countdown">1</span>
|
||||
<span>:</span>
|
||||
<span className="launcher-countdown">1</span>
|
||||
<span>9</span>
|
||||
<span>:</span>
|
||||
<span className="launcher-countdown">5</span>
|
||||
<span>3</span>
|
||||
<span>:</span>
|
||||
<span className="launcher-countdown">4</span>
|
||||
<span>6</span>
|
||||
<strong>限时优惠,立享5折</strong>
|
||||
<span>Seedance 2.0 低至 $0.02/秒, Image-2 低至 $0.004/张</span>
|
||||
<button type="button">立即升级</button>
|
||||
</header>
|
||||
{launcherNotifications.length > 0 ? (
|
||||
<header className="launcher-promo" aria-label="通知">
|
||||
{launcherNotifications.map((notification) => (
|
||||
<Fragment key={`${notification.label}:${notification.detail}`}>
|
||||
<strong>{notification.label}</strong>
|
||||
<span>{notification.detail}</span>
|
||||
<button type="button">{notification.actionLabel}</button>
|
||||
</Fragment>
|
||||
))}
|
||||
</header>
|
||||
) : null}
|
||||
|
||||
<div className="launcher-account-bar" aria-label="账户资产">
|
||||
<span>☁ 同时出图放大 +91%</span>
|
||||
|
||||
@@ -23,9 +23,7 @@ textarea {
|
||||
display: grid;
|
||||
min-height: 100vh;
|
||||
padding: 24px;
|
||||
background:
|
||||
linear-gradient(180deg, #dfff4b 0 32px, transparent 32px),
|
||||
#f8fafc;
|
||||
background: #f8fafc;
|
||||
color: #111827;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
@@ -544,6 +544,7 @@ describe('AI 游戏创作 App 界面边界', () => {
|
||||
renderLauncherProjectsAt('/?launcher');
|
||||
|
||||
expect(screen.getByLabelText('项目启动器')).not.toBeNull();
|
||||
expect(screen.queryByLabelText('通知')).toBeNull();
|
||||
expect(screen.queryByLabelText('聊天')).toBeNull();
|
||||
fireEvent.change(screen.getByLabelText('项目目录'), {
|
||||
target: { value: '/tmp/authorized-game' },
|
||||
|
||||
Reference in New Issue
Block a user