From c524e4573e85bc5b0aa37c2ecb03e8004cef08f4 Mon Sep 17 00:00:00 2001 From: kdletters Date: Thu, 16 Jul 2026 14:23:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=B8=E6=88=8F=E5=88=9B?= =?UTF-8?q?=E4=BD=9C=E9=A1=B5=E5=A4=B4=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 恢复 Tailwind Preflight 后的页头操作按钮边框与间距 补充页头按钮样式与禁用态回归测试 --- apps/ai-game-creator-shell/src/styles.css | 6 ++++++ .../tests/appSurface.test.ts | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/apps/ai-game-creator-shell/src/styles.css b/apps/ai-game-creator-shell/src/styles.css index b6478a1b1..f826e231b 100644 --- a/apps/ai-game-creator-shell/src/styles.css +++ b/apps/ai-game-creator-shell/src/styles.css @@ -561,6 +561,7 @@ textarea { } .launcher-page-actions button, +.launcher-page .launcher-project-list-actions button, .launcher-project-table article > button, .launcher-empty-projects button { height: 32px; @@ -572,6 +573,11 @@ textarea { font-size: 12px; } +.launcher-page .launcher-project-list-actions button:disabled { + cursor: not-allowed; + opacity: 0.55; +} + .launcher-page-actions button:last-child { border-color: #111827; background: #111827; diff --git a/apps/ai-game-creator-shell/tests/appSurface.test.ts b/apps/ai-game-creator-shell/tests/appSurface.test.ts index 15f10de1a..dc2d3a62c 100644 --- a/apps/ai-game-creator-shell/tests/appSurface.test.ts +++ b/apps/ai-game-creator-shell/tests/appSurface.test.ts @@ -13642,6 +13642,23 @@ describe('AI 游戏创作 App 界面边界', () => { expect(styles).toMatch(/\.message\s*\{[^}]*overflow-wrap:\s*anywhere/s); }); + it('keeps launcher page header actions styled after Tailwind preflight', () => { + const styles = readFileSync( + resolve(process.cwd(), 'apps/ai-game-creator-shell/src/styles.css'), + 'utf8', + ); + const headerActionRule = styles.match( + /\.launcher-page \.launcher-project-list-actions button,[^{]*\{([^}]*)\}/s, + ); + + expect(headerActionRule?.[1]).toContain('padding: 0 12px;'); + expect(headerActionRule?.[1]).toContain('border: 1px solid #d8dde5;'); + expect(headerActionRule?.[1]).toContain('background: #fff;'); + expect(styles).toMatch( + /\.launcher-page \.launcher-project-list-actions button:disabled\s*\{[^}]*cursor:\s*not-allowed;[^}]*opacity:\s*0\.55;/s, + ); + }); + it('shows developer panels only in dev mode', () => { renderAppAt('/?dev');