fix(web): use dashboard icon for workspace entry

This commit is contained in:
2026-07-22 15:50:16 +08:00
parent e391d9dc2f
commit 74775ed64f
4 changed files with 11 additions and 11 deletions

View File

@@ -36,7 +36,7 @@ if (!html.includes('<title>森林AI</title>')) failures.push('document title mus
if (!html.includes('href="/senlinai-icon.svg"')) failures.push('favicon must use /senlinai-icon.svg')
if (!existsSync('public/senlinai-icon.svg')) failures.push('missing public/senlinai-icon.svg')
for (const file of ['src/pages/login.tsx', 'src/pages/projects/project-topbar.tsx', 'src/pages/projects/project-rail.tsx']) {
for (const file of ['src/pages/login.tsx', 'src/pages/projects/project-topbar.tsx']) {
const source = readFileSync(file, 'utf8')
if (!source.includes('/senlinai-icon.svg')) failures.push(`${file} must use the brand icon`)
}
@@ -51,6 +51,9 @@ const projectRailSource = readFileSync('src/pages/projects/project-rail.tsx', 'u
if (!projectRailSource.includes('projectNameLabel(project.name)')) {
failures.push('project rail labels must derive from the project name')
}
if (!projectRailSource.includes('icon={<IconDashboard />}') || projectRailSource.includes('rail-brand-icon')) {
failures.push('workspace rail entry must use the dashboard icon instead of the brand logo')
}
const apiFiles = ['client.ts', 'projects.ts', 'mappers.tsx', 'search.ts', 'inbox.ts', 'ai.ts'].map((name) => `src/api/${name}`)
const apiSource = apiFiles.map((file) => readFileSync(file, 'utf8')).join('\n')