diff --git a/src/client/routes/__root.tsx b/src/client/routes/__root.tsx index 53af93e..06793b8 100644 --- a/src/client/routes/__root.tsx +++ b/src/client/routes/__root.tsx @@ -10,8 +10,10 @@ import { import { useState } from "react"; import "../app.css"; import { CandidateForm } from "../components/CandidateForm"; +import { CatalogSearchOverlay } from "../components/CatalogSearchOverlay"; import { ConfirmDialog } from "../components/ConfirmDialog"; import { ExternalLinkDialog } from "../components/ExternalLinkDialog"; +import { FabMenu } from "../components/FabMenu"; import { ItemForm } from "../components/ItemForm"; import { OnboardingWizard } from "../components/OnboardingWizard"; import { SlideOutPanel } from "../components/SlideOutPanel"; @@ -80,7 +82,6 @@ function RootLayout() { // Item panel state const panelMode = useUIStore((s) => s.panelMode); const editingItemId = useUIStore((s) => s.editingItemId); - const openAddPanel = useUIStore((s) => s.openAddPanel); const closePanel = useUIStore((s) => s.closePanel); // Candidate panel state @@ -144,16 +145,6 @@ function RootLayout() { ? { linkTo: "/" } : { linkTo: "/" }; - // FAB visibility: only show on /collection route when gear tab is active - const collectionSearch = matchRoute({ to: "/collection" }) as - | { tab?: string } - | false; - const showFab = - isCollection && - (!collectionSearch || - !(collectionSearch as Record).tab || - (collectionSearch as Record).tab === "gear"); - // Show loading while checking auth if (authLoading) { return ( @@ -168,6 +159,10 @@ function RootLayout() { const isPublicRoute = location.pathname.startsWith("/users/") || location.pathname === "/login"; + // FAB visibility: show on all authenticated, non-public routes + const isSetupsPage = !!matchRoute({ to: "/setups", fuzzy: true }); + const showFab = isAuthenticated && !isPublicRoute; + if (!isAuthenticated && !isPublicRoute) { window.location.href = "/login"; return ( @@ -253,29 +248,11 @@ function RootLayout() { /> )} - {/* Floating Add Button - only on collection gear tab */} - {showFab && isAuthenticated && ( - - )} + {/* Floating Action Button */} + {showFab && } + + {/* Catalog Search Overlay */} + {/* Onboarding Wizard */} {showWizard && (