收起空公告栏占位

无公告时启动器主区域不再启用公告布局。

调整账户条和首页输入区域的无公告顶部间距。

补充启动器无公告布局回归测试。
This commit is contained in:
AIGameCreator App
2026-07-08 11:02:32 +08:00
parent 7afc0da5c4
commit 18b834af36
3 changed files with 27 additions and 3 deletions
+7 -1
View File
@@ -2225,7 +2225,13 @@ export function WorkspaceLauncher({
<Settings size={16} aria-hidden="true" />
</button>
</aside>
<section className="launcher-main">
<section
className={
launcherNotifications.length > 0
? 'launcher-main launcher-main-with-promo'
: 'launcher-main'
}
>
{launcherNotifications.length > 0 ? (
<header className="launcher-promo" aria-label="通知">
{launcherNotifications.map((notification) => (
+14 -2
View File
@@ -320,7 +320,7 @@ textarea {
.launcher-account-bar {
position: absolute;
top: 44px;
top: 16px;
right: 22px;
display: flex;
align-items: center;
@@ -328,6 +328,10 @@ textarea {
z-index: 2;
}
.launcher-main-with-promo .launcher-account-bar {
top: 44px;
}
.launcher-account-bar span,
.launcher-account-bar button {
height: 24px;
@@ -366,7 +370,11 @@ textarea {
justify-items: center;
gap: 13px;
min-height: 374px;
padding: 135px 24px 18px;
padding: 103px 24px 18px;
}
.launcher-main-with-promo .launcher-hero {
padding-top: 135px;
}
.launcher-hero-title {
@@ -952,6 +960,10 @@ textarea {
padding: 84px 14px 34px;
}
.launcher-main-with-promo .launcher-hero {
padding-top: 84px;
}
.launcher-hero-title {
flex-direction: column;
gap: 10px;
@@ -686,6 +686,12 @@ describe('AI 游戏创作 App 界面边界', () => {
expect(screen.getByLabelText('项目启动器')).not.toBeNull();
expect(screen.queryByLabelText('通知')).toBeNull();
expect(
screen
.getByLabelText('项目启动器')
.querySelector('.launcher-main')
?.className.includes('launcher-main-with-promo'),
).toBe(false);
expect(screen.queryByLabelText('聊天')).toBeNull();
fireEvent.change(screen.getByLabelText('项目目录'), {
target: { value: '/tmp/authorized-game' },