summaryrefslogtreecommitdiff
path: root/makima/frontend/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'makima/frontend/src/components')
-rw-r--r--makima/frontend/src/components/NavStrip.tsx11
1 files changed, 7 insertions, 4 deletions
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 (
<nav
className="flex items-center gap-2.5 px-3 py-2.5 border-t border-b border-dashed border-[rgba(117,170,252,0.35)] bg-[#0c1729] font-mono uppercase tracking-wide text-[11px]"
@@ -35,7 +38,7 @@ export function NavStrip() {
<RewriteLink
key={link.label}
to={link.href}
- disabled={link.disabled}
+ disabled={link.requiresAuth && !hasAccess}
external={link.external}
>
{link.label}