From 61d02d522b90f70d1ce5c3027e5aaf33cf8b394a Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Fri, 22 May 2026 23:53:19 -0400 Subject: [PATCH] feat(web-ui): pass search-select handlers from App to Topbar Wires onOpenAsset and onOpenProject through Topbar so that selecting an asset/project from the global search opens the asset detail or navigates to the project view. Adds openProjectFromAnywhere helper. --- services/web-ui/public/app.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/services/web-ui/public/app.jsx b/services/web-ui/public/app.jsx index 09a861b..d1af2db 100644 --- a/services/web-ui/public/app.jsx +++ b/services/web-ui/public/app.jsx @@ -24,6 +24,7 @@ function App() { }, []); const navigate = (id) => { setOpenAsset(null); setRoute(id); }; + const openProjectFromAnywhere = (p) => { setOpenAsset(null); setOpenProject(p); setRoute('library'); }; const crumbs = React.useMemo(() => { if (openAsset) return [ @@ -67,7 +68,7 @@ function App() { switch (route) { case 'home': content = ; break; case 'library': content = ; break; - case 'projects': content = { setOpenProject(p); setRoute('library'); }} />; break; + case 'projects': content = ; break; case 'upload': content = ; break; case 'recorders': content = setShowNewRecorder(true)} />; break; case 'schedule': content = ; break; @@ -88,7 +89,14 @@ function App() {
- {!openAsset && } + {!openAsset && ( + + )} {content}
{showNewRecorder && setShowNewRecorder(false)} />}