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:
@@ -19,6 +19,7 @@ import { useTabContext } from "@/contexts/tab-context"
|
||||
import { useTerminalContext } from "@/contexts/terminal-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 {
|
||||
createFileTreeEntry,
|
||||
@@ -2098,6 +2099,10 @@ export function FileTreeTab() {
|
||||
workspaceState.seq,
|
||||
])
|
||||
|
||||
if (!folder) {
|
||||
return <AuxPanelNoFolderEmpty />
|
||||
}
|
||||
|
||||
if (loading && nodes.length === 0) {
|
||||
return (
|
||||
<div className="p-3 space-y-2">
|
||||
|
||||
Reference in New Issue
Block a user