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

@@ -344,11 +344,17 @@ export function FolderTitleBar() {
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={toggleAuxPanel}>
<DropdownMenuItem
onClick={toggleAuxPanel}
disabled={!activeFolder}
>
<PanelRight className="h-3.5 w-3.5" />
{tTitleBar("toggleAuxPanel")}
</DropdownMenuItem>
<DropdownMenuItem onClick={() => toggleTerminal()}>
<DropdownMenuItem
onClick={() => toggleTerminal()}
disabled={!activeFolder}
>
<SquareTerminal className="h-3.5 w-3.5" />
{tTitleBar("toggleTerminal")}
</DropdownMenuItem>
@@ -370,6 +376,7 @@ export function FolderTitleBar() {
size="icon"
className={`h-6 w-6 hover:text-foreground/80 ${terminalOpen ? "bg-accent" : ""}`}
onClick={() => toggleTerminal()}
disabled={!activeFolder}
title={tTitleBar("withShortcut", {
label: tTitleBar("toggleTerminal"),
shortcut: formatShortcutLabel(
@@ -385,6 +392,7 @@ export function FolderTitleBar() {
size="icon"
className={`h-6 w-6 hover:text-foreground/80 ${auxPanelOpen ? "bg-accent" : ""}`}
onClick={toggleAuxPanel}
disabled={!activeFolder}
title={tTitleBar("withShortcut", {
label: tTitleBar("toggleAuxPanel"),
shortcut: formatShortcutLabel(