fix(canvas): restore left project sidebar

This commit is contained in:
inman
2026-09-07 14:31:43 +08:00
parent 918f8f80dc
commit b95f1b4df5
8 changed files with 116 additions and 62 deletions

View File

@@ -151,11 +151,17 @@ function getCoarsePointLabel(balance: WorksTokenPointBalance | null): string {
type SidebarProps = {
workspaceLayout?: boolean;
hideOnCompact?: boolean;
sidebarPeekOpen?: boolean;
onSidebarPeekChange?: (open: boolean, source: SidebarPeekSource) => void;
};
export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSidebarPeekChange }: SidebarProps = {}) {
export function Sidebar({
workspaceLayout = false,
hideOnCompact = false,
sidebarPeekOpen = false,
onSidebarPeekChange,
}: SidebarProps = {}) {
const { t } = useTranslation('common');
const sidebarPinnedCollapsed = useSettingsStore((state) => state.sidebarCollapsed);
const sidebarCollapsed = sidebarPinnedCollapsed && !sidebarPeekOpen;
@@ -544,6 +550,7 @@ export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSi
// full window height without reflowing the page underneath it.
sidebarPinnedCollapsed && 'fixed inset-y-0 left-0 z-[350]',
sidebarPeekPreview && 'sidebar-peek-surface pt-10 shadow-float',
hideOnCompact && 'hidden lg:flex',
)}
>
<div