diff --git a/app/main.py b/app/main.py index b27680f..60c73fd 100644 --- a/app/main.py +++ b/app/main.py @@ -39,7 +39,7 @@ async def lifespan(_app: FastAPI): app = FastAPI( title="FlowDeck", - version="2.4.4", + version="2.4.5", docs_url="/docs" if settings.log_level == "DEBUG" else None, redoc_url=None, lifespan=lifespan, diff --git a/app/templates/local_workspace.html b/app/templates/local_workspace.html index 8249c9e..0c1e614 100644 --- a/app/templates/local_workspace.html +++ b/app/templates/local_workspace.html @@ -341,7 +341,7 @@ @dragleave="onDragLeave($event)" @drop.prevent="onDrop($event)" @keydown="onKeydown($event)" - @contextmenu.prevent="onContextMenu($event)" + @contextmenu.prevent="if(window._wsData) window._wsData.onContextMenu($event)" @click.self="ctxMenu.visible = false" tabindex="0" x-ref="layout"> @@ -1005,6 +1005,8 @@ document.addEventListener('alpine:init', function() { async init() { try { + // Expose globally for event handlers (BEFORE await) + window._wsData = this; var url = '/api/local-workspace/tree'; if (this.currentFolder && this.currentFolder > 0) { url += '?folder=' + this.currentFolder;