diff --git a/app/templates/_header.html b/app/templates/_header.html index a319a40..24c982f 100644 --- a/app/templates/_header.html +++ b/app/templates/_header.html @@ -36,7 +36,8 @@
{% if not hide_hamburger %} @@ -963,6 +969,7 @@ window.appState = this; this.loadSidebarConfig(); this.loadAgents(); + document.addEventListener('fd-toggle-sidebar', () => this.toggleSidebar()); }, agentList: [], loadAgents() { @@ -980,6 +987,7 @@ else { document.dispatchEvent(new CustomEvent('fd-agent-toggle')); } }, sidebarCollapsed: false, + sidebarPeek: false, mobileSidebarOpen: false, showInvite: true, // -- Toast notifications -- @@ -1325,7 +1333,7 @@ navigateTo(url) { this.mobileSidebarOpen = false; - this.sidebarCollapsed = true; + this.sidebarPeek = false; // Preserve workspace context when navigating to library/trash if ((url === '/library' || url === '/trash') && this.workspaceKey && this.workspaceKey.includes('/')) { const parts = this.workspaceKey.split('/'); @@ -1335,6 +1343,11 @@ else window.location.href = url; }, + toggleSidebar() { + this.sidebarPeek = false; + this.sidebarCollapsed = !this.sidebarCollapsed; + }, + showContextMenu(event, pageId, pageName) { var x = event.clientX, y = event.clientY; // Prevent menu from overflowing right edge @@ -1842,7 +1855,7 @@ } }); - +