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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user