diff --git a/src/accounting-app/App.vue b/src/accounting-app/App.vue index 8fe3aa8..e5800f2 100644 --- a/src/accounting-app/App.vue +++ b/src/accounting-app/App.vue @@ -1,94 +1,29 @@ diff --git a/src/activities-app/App.vue b/src/activities-app/App.vue index 7214093..b7ff6d6 100644 --- a/src/activities-app/App.vue +++ b/src/activities-app/App.vue @@ -1,84 +1,38 @@ diff --git a/src/chat-app/App.vue b/src/chat-app/App.vue index 6e5a91d..e902645 100644 --- a/src/chat-app/App.vue +++ b/src/chat-app/App.vue @@ -1,47 +1,16 @@ diff --git a/src/components/layout/BottomNav.vue b/src/components/layout/BottomNav.vue index e74b67d..f52ba44 100644 --- a/src/components/layout/BottomNav.vue +++ b/src/components/layout/BottomNav.vue @@ -8,10 +8,16 @@ export interface BottomTab { name: string /** lucide-vue-next icon component. */ icon: Component - /** Router path to push on click. */ - path: string + /** Router path to push on click. Optional — coming-soon entries omit it. */ + path?: string /** Optional unread/cart badge count. Falsy values hide the badge. */ badge?: number | null + /** Click override. When provided, replaces the default router.push(path). + * Consumers use this for coming-soon toasts or auth-gated CTAs. */ + onClick?: () => void + /** Render the entry ghosted (opacity-reduced). Used for coming-soon and + * for auth-required tabs when the user is logged out. */ + disabled?: boolean } interface Props { @@ -28,6 +34,14 @@ interface Props { const props = withDefaults(defineProps(), { loggedOutOpensSheet: false }) const router = useRouter() + +function onTabClick(tab: BottomTab) { + if (tab.onClick) { + tab.onClick() + return + } + if (tab.path) router.push(tab.path) +}