feat(workspace): add no-folder empty states and gate folder-only actions

- Sidebar: replace the "no conversations" placeholder with Open Folder, Clone Repository, and Project Boot buttons when the workspace has no open folders.
- Title bar: disable the terminal and auxiliary-panel toggle buttons while no folder is active.
- Aux panel: show a shared localized "no folder open" prompt in the file tree, git changes, and git log tabs when no folder is active.
- Add auxPanel.noFolderTitle / noFolderHint translations across all ten supported locales.
This commit is contained in:
xintaofei
2026-04-22 10:36:27 +08:00
parent 14fb231dcc
commit c691fb0c07
16 changed files with 158 additions and 12 deletions

View File

@@ -38,6 +38,7 @@ import { useActiveFolder } from "@/contexts/active-folder-context"
import { useTabContext } from "@/contexts/tab-context"
import { useWorkspaceContext } from "@/contexts/workspace-context"
import { useWorkspaceStateStore } from "@/hooks/use-workspace-state-store"
import { AuxPanelNoFolderEmpty } from "@/components/layout/aux-panel-no-folder-empty"
import { WorkspaceDegradedBanner } from "@/components/layout/workspace-degraded-banner"
import {
deleteFileTreeEntry,
@@ -1166,6 +1167,10 @@ export function GitChangesTab() {
]
)
if (!folder) {
return <AuxPanelNoFolderEmpty />
}
if (loading) {
return (
<div className="p-2 space-y-2">