elearning/Frontend-Learner/components/common/AppSidebar.vue

80 lines
1.7 KiB
Vue

<script setup lang="ts">
/**
* @file AppSidebar.vue
* @description Sidebar navigation for the authenticated dashboard.
* Uses Quasar QList for structure.
*/
const { t } = useI18n()
const navItems = computed(() => [
{
to: "/dashboard",
label: t('sidebar.overview'),
icon: "dashboard", // Using Material Icons names where possible or SVG paths
isSvg: false
},
{
to: "/dashboard/my-courses",
label: t('sidebar.myCourses'),
icon: "school",
isSvg: false
},
{
to: "/browse/discovery",
label: t('sidebar.browseCourses'),
icon: "explore",
isSvg: false
},
{
to: "/dashboard/announcements",
label: t('sidebar.announcements'),
icon: "campaign",
isSvg: false
},
{
to: "/dashboard/profile",
label: t('sidebar.profile'),
icon: "person",
isSvg: false
},
]);
</script>
<template>
<div class="flex flex-col h-full bg-white">
<!-- Branding Area (Optional if not in Header) -->
<q-list padding class="text-slate-600 flex-grow">
<q-item
v-for="item in navItems"
:key="item.to"
:to="item.to"
clickable
v-ripple
active-class="text-primary bg-blue-50 font-bold"
class="rounded-r-full mr-2"
>
<q-item-section avatar>
<q-icon :name="item.icon" />
</q-item-section>
<q-item-section>
<q-item-label>{{ item.label }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
<!-- Footer / Version -->
<div class="mt-auto p-4 text-xs text-center opacity-50 pb-8">
<p>e-Learning v0.1.0</p>
<p>&copy; 2026</p>
</div>
</div>
</template>
<style scoped>
/* Custom styles if needed */
</style>