diff --git a/src/forum-app/App.vue b/src/forum-app/App.vue index 8c7f8ba..c8c1abb 100644 --- a/src/forum-app/App.vue +++ b/src/forum-app/App.vue @@ -7,7 +7,9 @@ import { useTheme } from '@/components/theme-provider' import { toast } from 'vue-sonner' import { useAuth } from '@/composables/useAuthService' import { Button } from '@/components/ui/button' -import { LogIn } from 'lucide-vue-next' +import { + LogIn, Newspaper, Hash, SquarePen, Search, Bell, +} from 'lucide-vue-next' const route = useRoute() const router = useRouter() @@ -17,8 +19,39 @@ const { isAuthenticated } = useAuth() const showLoginDialog = ref(false) +interface Tab { + name: string + icon: any + path?: string + comingSoon?: { issue: number; label: string } +} + +const bottomTabs: Tab[] = [ + { name: 'Posts', icon: Newspaper, path: '/forum' }, + { name: 'Spaces', icon: Hash, comingSoon: { issue: 31, label: 'Spaces' } }, + { name: 'Submit', icon: SquarePen, path: '/submit' }, + { name: 'Search', icon: Search, comingSoon: { issue: 15, label: 'Search' } }, + { name: 'Alerts', icon: Bell, comingSoon: { issue: 32, label: 'Notifications' } }, +] + const isLoginPage = computed(() => route.path === '/login') +function isActiveTab(tab: Tab): boolean { + if (!tab.path) return false + if (tab.path === '/forum') return route.path === '/forum' || route.path.startsWith('/submission/') + return route.path.startsWith(tab.path) +} + +function onTabClick(tab: Tab) { + if (tab.path) { + router.push(tab.path) + } else if (tab.comingSoon) { + toast.info(`${tab.comingSoon.label} — coming soon`, { + description: `Tracked on issue #${tab.comingSoon.issue}`, + }) + } +} + async function handleLoginSuccess() { showLoginDialog.value = false toast.success('Welcome!') @@ -36,9 +69,33 @@ async function handleLoginSuccess() { -
+
+ +