From 60640dfa981e419cf86413c924fd26822bd42327 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Fri, 18 Sep 2026 08:26:37 +0800 Subject: feat(frontend): 布局/认证/项目页迁移 shadcn 并修复 375px 溢出 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [变更性质] 本提交为 UI 迁移与移动端布局修复,产品功能不变。 [新增功能] Leader 第 2 轮验收的失败项:AuthPages 在 375px 视口横向溢出 47px, 原因为 .auth-card 固定 400px 宽度。 [实现方案] AuthPages:.auth-wrap 改为 flex 包裹,.auth-card 改用 width:min(400px,100%),三档视口下登录/注册/重置均零溢出。 Layout.svelte 重写为 shadcn Button(退出按钮)+ Tailwind 主题变量, 同时保留 .layout/.content/.navlink/.brand 等 legacy class 以维持 mobileCss.test.ts 的断言语义。ProjectsPage 迁移 shadcn Card/Table 等 (保留 p-name 链接语义),新增 projectsPageLoad.test.ts 回归项目列表 加载失败时的错误呈现。 [影响范围] frontend/src/components/Layout.svelte、pages/AuthPages.svelte、 pages/ProjectsPage.svelte;视觉验证覆盖 375/768/1440 全零溢出。 --- frontend/src/components/Layout.svelte | 93 ++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 44 deletions(-) (limited to 'frontend/src/components') diff --git a/frontend/src/components/Layout.svelte b/frontend/src/components/Layout.svelte index 78cee45..3ccf913 100644 --- a/frontend/src/components/Layout.svelte +++ b/frontend/src/components/Layout.svelte @@ -3,7 +3,8 @@ import { go } from '../lib/router'; import { session } from '../lib/session.svelte'; import { postLogout } from '../lib/client'; - import { projectOf, projectInvisible, projectsStore } from '../lib/listsStore.svelte'; + import { projectsStore, projectOf, projectInvisible } from '../lib/listsStore.svelte'; + import { Button } from '$lib/components/ui/button'; interface Props { route: Route; @@ -94,7 +95,7 @@ {#if session.me}
{session.me.name}{session.me.role === 'admin' ? ' · 管理员' : ''} - +
{/if} @@ -107,16 +108,16 @@