merge: retire Canvas inspiration entry
# Conflicts: # README.md # src/components/layout/MainLayout.tsx # src/components/layout/Sidebar.tsx # tests/e2e/image-workspace-v2.spec.ts # tests/unit/app-module-provider-gate.test.tsx # tests/unit/title-bar.test.tsx
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -26,7 +26,6 @@ export function MainLayout() {
|
||||
});
|
||||
const activeModule = getAiModuleForPath(location.pathname);
|
||||
const isPaintingModule = activeModule === 'painting';
|
||||
const isPromptMuseum = location.pathname === '/image-prompts' || location.pathname.startsWith('/image-prompts/');
|
||||
const isCanvasWorkspace = location.pathname === '/image-canvas';
|
||||
const isChatWorkspace = location.pathname === '/chat';
|
||||
|
||||
@@ -79,9 +78,8 @@ export function MainLayout() {
|
||||
<TitleBar
|
||||
integrated
|
||||
workspaceLayout={isChatWorkspace}
|
||||
overlay={isPaintingModule && !isPromptMuseum}
|
||||
overlay={isPaintingModule}
|
||||
showSidebarControls={!isCanvasWorkspace}
|
||||
pageTitle={isPromptMuseum ? '获取灵感' : undefined}
|
||||
sidebarPeekOpen={sidebarPeekOpen}
|
||||
onSidebarPeekChange={handleSidebarPeekChange}
|
||||
/>
|
||||
|
||||
@@ -181,7 +181,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 visibleProjects = projects;
|
||||
const selectedProjectFolderName = getFolderName(newProjectSelectedPath);
|
||||
const accountName = userProfile?.displayName?.trim() || getAuthUserDisplayName(authUser) || '未登录用户';
|
||||
@@ -549,7 +548,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',
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user