Compare commits

...
2 Commits
Author SHA1 Message Date
ginnoir 65d36bab4e fix: drive bottom nav from module registry so all modules appear on mobile
Release / build-and-push (push) Has been cancelled
The bottom nav was hardcoded; the sidebar already read from the module
registry. Converted BottomNav to a server component that calls
getRegistry() using the same pattern as Sidebar, so any module with a
nav field automatically populates both nav surfaces.

Bumps version to 0.4.2.
2026-06-02 01:55:36 -05:00
ginnoir 298e6b868d chore: register migration 0016 in drizzle journal
Release / build-and-push (push) Has been cancelled
2026-06-02 00:27:10 -05:00
3 changed files with 19 additions and 12 deletions
+7
View File
@@ -113,6 +113,13 @@
"when": 1748736000000, "when": 1748736000000,
"tag": "0015_garden_schema", "tag": "0015_garden_schema",
"breakpoints": true "breakpoints": true
},
{
"idx": 16,
"version": "7",
"when": 1748822400000,
"tag": "0016_garden_improvements",
"breakpoints": true
} }
] ]
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "famapp", "name": "famapp",
"version": "0.4.0", "version": "0.4.2",
"private": true, "private": true,
"type": "module", "type": "module",
"packageManager": "pnpm@10.33.3", "packageManager": "pnpm@10.33.3",
+8 -8
View File
@@ -1,19 +1,19 @@
"use client"; import { getRegistry } from "@/modules/_core/registry";
import { NavLink } from "@/components/nav-link"; import { NavLink } from "@/components/nav-link";
const ITEMS: Array<{ href: string; label: string; icon: string }> = [ export async function BottomNav() {
const { modules } = getRegistry();
const moduleNav = modules.flatMap((m) => (m.nav ? [m.nav] : []));
const items = [
{ href: "/", label: "Dashboard", icon: "home" }, { href: "/", label: "Dashboard", icon: "home" },
{ href: "/calendar", label: "Calendar", icon: "calendar" }, ...moduleNav.map((n) => ({ href: n.href, label: n.label, icon: n.icon ?? "circle" })),
{ href: "/lists", label: "Lists", icon: "list" },
{ href: "/notes", label: "Notes", icon: "note" },
{ href: "/settings", label: "Settings", icon: "settings" }, { href: "/settings", label: "Settings", icon: "settings" },
]; ];
export function BottomNav() {
return ( return (
<nav className="bottom-nav" aria-label="Primary navigation"> <nav className="bottom-nav" aria-label="Primary navigation">
{ITEMS.map((it) => ( {items.map((it) => (
<NavLink key={it.href} href={it.href} icon={it.icon} label={it.label} variant="bottom" /> <NavLink key={it.href} href={it.href} icon={it.icon} label={it.label} variant="bottom" />
))} ))}
</nav> </nav>