feat: remove Canvas inspiration entry

This commit is contained in:
inman
2026-09-07 10:06:38 +08:00
parent f8eee430f4
commit b22559a596
11 changed files with 126 additions and 98 deletions

View File

@@ -36,7 +36,6 @@ const ProjectConfiguration = lazy(() => import('./pages/ProjectConfiguration').t
const Plugins = lazy(() => import('./pages/Plugins').then(({ Plugins: component }) => ({ default: component })));
const Workbench = lazy(() => import('./pages/Workbench').then(({ Workbench: component }) => ({ default: component })));
const ImageCanvas = lazy(() => import('./pages/ImageCanvas').then(({ ImageCanvas: component }) => ({ default: component })));
const ImagePromptMuseum = lazy(() => import('./pages/ImagePromptMuseum').then(({ ImagePromptMuseum: component }) => ({ default: component })));
const AiHardware = lazy(() => import('./pages/AiHardware').then(({ AiHardware: component }) => ({ default: component })));
const Settings = lazy(() => import('./pages/Settings').then(({ Settings: component }) => ({ default: component })));
const Setup = lazy(() => import('./pages/Setup').then(({ Setup: component }) => ({ default: component })));
@@ -452,7 +451,7 @@ function App() {
<Route path="/chat" element={<ProjectChatRoute />} />
<Route path="/deliverables" element={<PreviewScene />} />
<Route path="/image-canvas" element={<ImageCanvas />} />
<Route path="/image-prompts" element={<ImagePromptMuseum />} />
<Route path="/image-prompts/*" element={<Navigate to="/image-canvas" replace />} />
<Route path="/ai-hardware" element={<AiHardware />} />
<Route path="/workbench/:projectId" element={<Workbench />} />
<Route path="/models" element={<Models />} />

View File

@@ -1,7 +1,6 @@
import { useEffect, useMemo, useState } from 'react';
import {
FolderKanban,
Lightbulb,
Loader2,
Pencil,
Plus,
@@ -157,15 +156,6 @@ export function ImageWorkspaceSidebar({ sidebarCollapsed }: ImageWorkspaceSideba
>
<Plus className="h-4 w-4" />
</Button>
<Button
type="button"
variant="ghost"
size="icon"
aria-label="获取设计灵感"
onClick={() => navigate('/image-prompts')}
>
<Lightbulb className="h-4 w-4" />
</Button>
</div>
);
}
@@ -181,14 +171,6 @@ export function ImageWorkspaceSidebar({ sidebarCollapsed }: ImageWorkspaceSideba
<Plus className="h-4 w-4 text-brand" />
新建设计项目
</button>
<button
type="button"
className="motion-press flex min-h-9 w-full items-center gap-2 rounded-xl px-2.5 text-left text-sm text-muted-foreground transition-colors hover:bg-surface-subtle hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30"
onClick={() => navigate('/image-prompts')}
>
<Lightbulb className="h-4 w-4" />
获取灵感
</button>
</div>
<div className="mb-2 mt-5 flex items-center justify-between px-2">

View File

@@ -35,7 +35,6 @@ export function MainLayout() {
const activeModule = getAiModuleForPath(location.pathname);
const isProgrammingModule = activeModule === 'programming';
const isPaintingModule = activeModule === 'painting';
const isPromptMuseum = location.pathname === '/image-prompts' || location.pathname.startsWith('/image-prompts/');
const isChatWorkspace = location.pathname === '/chat';
const isInitializationSafeRoute = location.pathname === '/project-config'
|| location.pathname === '/plugins'
@@ -95,8 +94,7 @@ export function MainLayout() {
<TitleBar
integrated
workspaceLayout={isChatWorkspace}
overlay={isPaintingModule && !isPromptMuseum}
pageTitle={isPromptMuseum ? '获取灵感' : undefined}
overlay={isPaintingModule}
sidebarPeekOpen={sidebarPeekOpen}
onSidebarPeekChange={handleSidebarPeekChange}
/>

View File

@@ -185,7 +185,6 @@ export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSi
const isProgrammingModule = activeModule === 'programming';
const isPaintingModule = activeModule === 'painting';
const isRobotModule = activeModule === 'robot';
const isPromptMuseum = location.pathname === '/image-prompts' || location.pathname.startsWith('/image-prompts/');
const projectConfigPath = '/project-config';
const visibleProjects = projects;
const selectedProjectFolderName = getFolderName(newProjectSelectedPath);
@@ -557,7 +556,7 @@ export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSi
<div
className={cn(
'bg-transparent px-3 text-foreground',
isPaintingModule && !isPromptMuseum && !sidebarCollapsed ? 'pb-2 pt-10' : 'py-2',
isPaintingModule && !sidebarCollapsed ? 'pb-2 pt-10' : 'py-2',
sidebarCollapsed && 'px-2',
)}
>