From dbef15ae0a0bd3c0daa90fbf7890ee41cf19e365 Mon Sep 17 00:00:00 2001 From: OpenCode Date: Wed, 3 Jun 2026 04:11:32 +0000 Subject: [PATCH] fix(library): clicking project in rail now filters assets to that project instead of navigating away --- services/web-ui/public/app.jsx | 2 +- services/web-ui/public/screens-library.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web-ui/public/app.jsx b/services/web-ui/public/app.jsx index fe67838..f5b05a2 100644 --- a/services/web-ui/public/app.jsx +++ b/services/web-ui/public/app.jsx @@ -123,7 +123,7 @@ function App() { switch (effectiveRoute) { case 'home': content = ; break; case 'dashboard': content = ; break; - case 'library': content = setOpenProject(null)} />; break; + case 'library': content = setOpenProject(null)} onOpenProject={openProjectFromAnywhere} />; break; case 'projects': content = ; break; case 'upload': content = ; break; case 'recorders': content = setShowNewRecorder(true)} />; break; diff --git a/services/web-ui/public/screens-library.jsx b/services/web-ui/public/screens-library.jsx index d56737c..a747c69 100644 --- a/services/web-ui/public/screens-library.jsx +++ b/services/web-ui/public/screens-library.jsx @@ -3,7 +3,7 @@ function buildBinTree(f){const m={};f.forEach(b=>{m[b.id]={...b,children:[]};});const r=[];f.forEach(b=>{if(b.parent_id&&m[b.parent_id])m[b.parent_id].children.push(m[b.id]);else r.push(m[b.id]);});return r;} function collectDescendantIds(id,f){const s=new Set([id]);let c=true;while(c){c=false;f.forEach(b=>{if(b.parent_id&&s.has(b.parent_id)&&!s.has(b.id)){s.add(b.id);c=true;}});}return s;} -function Library({ navigate, onOpenAsset, openProject, onClearProject }) { +function Library({ navigate, onOpenAsset, openProject, onClearProject, onOpenProject }) { const PROJECTS = window.ZAMPP_DATA?.PROJECTS || []; const [bins, setBins] = React.useState(window.ZAMPP_DATA?.BINS || []); const BINS = bins; // legacy local name; keep so the rest of the function reads unchanged @@ -327,7 +327,7 @@ function Library({ navigate, onOpenAsset, openProject, onClearProject }) { {PROJECTS.slice(0, 8).map(function(p) { return (
{p.name}