From 3d15ec753f93babcc1fa0cf3958f1f164e98fea4 Mon Sep 17 00:00:00 2001 From: soryu Date: Sun, 11 Jan 2026 03:43:10 +0000 Subject: Disable buttons if logged out Also add prod.env for FE config --- makima/frontend/src/components/NavStrip.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'makima/frontend/src/components') diff --git a/makima/frontend/src/components/NavStrip.tsx b/makima/frontend/src/components/NavStrip.tsx index 806f0c5..642e9a3 100644 --- a/makima/frontend/src/components/NavStrip.tsx +++ b/makima/frontend/src/components/NavStrip.tsx @@ -4,14 +4,14 @@ import { RewriteLink } from "./RewriteLink"; interface NavLink { label: string; href: string; - disabled?: boolean; + requiresAuth?: boolean; external?: boolean; } const NAV_LINKS: NavLink[] = [ { label: "Listen", href: "/listen" }, - { label: "Files", href: "/files" }, - { label: "Mesh", href: "/mesh" }, + { label: "Files", href: "/files", requiresAuth: true }, + { label: "Mesh", href: "/mesh", requiresAuth: true }, ]; export function NavStrip() { @@ -22,6 +22,9 @@ export function NavStrip() { window.location.href = "/login"; }; + // Check if user has access (authenticated or auth not configured) + const hasAccess = isAuthenticated || !isAuthConfigured; + return (