feat: move plugin workspace into project settings
This commit is contained in:
@@ -38,6 +38,7 @@ export function MainLayout() {
|
||||
const isPromptMuseum = location.pathname === '/image-prompts' || location.pathname.startsWith('/image-prompts/');
|
||||
const isChatWorkspace = location.pathname === '/chat';
|
||||
const isInitializationSafeRoute = location.pathname === '/project-config'
|
||||
|| location.pathname.startsWith('/project-config/')
|
||||
|| location.pathname === '/plugins'
|
||||
|| !isProgrammingModule;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
FolderKanban,
|
||||
LogOut,
|
||||
Plus,
|
||||
Puzzle,
|
||||
Settings as SettingsIcon,
|
||||
UserCircle2,
|
||||
} from 'lucide-react';
|
||||
@@ -584,23 +583,6 @@ export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSi
|
||||
<Plus className="h-4 w-4 shrink-0 text-brand" />
|
||||
{!sidebarCollapsed && '新建项目'}
|
||||
</button>
|
||||
<div className="mt-3 grid gap-1">
|
||||
<button
|
||||
type="button"
|
||||
data-testid="sidebar-nav-plugins"
|
||||
aria-current={location.pathname === '/plugins' ? 'page' : undefined}
|
||||
aria-label="插件"
|
||||
onClick={() => navigate(activeProject ? '/plugins?scope=project' : '/plugins?scope=all')}
|
||||
className={cn(
|
||||
'motion-press flex min-h-10 w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm font-medium transition-colors duration-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/35',
|
||||
location.pathname === '/plugins' ? 'bg-brand-selected text-foreground' : 'text-foreground hover:bg-surface-subtle',
|
||||
sidebarCollapsed && 'justify-center px-0',
|
||||
)}
|
||||
>
|
||||
<Puzzle className="h-4 w-4 shrink-0 text-brand" />
|
||||
{!sidebarCollapsed ? <span>插件</span> : null}
|
||||
</button>
|
||||
</div>
|
||||
<div className="mt-3">
|
||||
<button
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user