Initial commit: admin dashboard for GameNo.
Vue 3 + Vite dashboard with PrimeVue, i18n, and API integration for institution management.
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<!-- /src/components/layout/AppSidebar.vue -->
|
||||
<template>
|
||||
<div class="app-sidebar p-3 surface-card border-left-1 border-color flex flex-column h-full">
|
||||
<div class="logo flex align-items-center gap-3 px-2 py-3 mb-3 border-bottom-1 border-color">
|
||||
<i class="pi pi-graduation-cap text-primary text-3xl"></i>
|
||||
<span class="font-bold text-xl text-color">گام نو</span>
|
||||
</div>
|
||||
|
||||
<div class="menu-list flex-grow-1 overflow-y-auto">
|
||||
<router-link
|
||||
v-for="item in menuItems"
|
||||
:key="item.to"
|
||||
:to="item.to"
|
||||
class="menu-item flex align-items-center gap-3 px-3 py-2 border-round text-color mb-1 transition-colors"
|
||||
:class="{ 'active-item': isMenuActive(item.to) }"
|
||||
>
|
||||
<i :class="item.icon" class="text-lg"></i>
|
||||
<span class="font-medium text-sm">{{ item.label }}</span>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const menuItems = [
|
||||
{ label: 'داشبورد اصلی', icon: 'pi pi-home', to: '/' },
|
||||
{ label: 'مدیریت کاربران', icon: 'pi pi-users', to: '/users' },
|
||||
{ label: 'مدیریت اساتید', icon: 'pi pi-id-card', to: '/professors' },
|
||||
{ label: 'دورههای آموزشی', icon: 'pi pi-book', to: '/courses' },
|
||||
{ label: 'کلاسها', icon: 'pi pi-desktop', to: '/classes' },
|
||||
{ label: 'جلسات آموزشی', icon: 'pi pi-calendar', to: '/sessions' },
|
||||
{ label: 'امور مالی و پرداختها', icon: 'pi pi-wallet', to: '/payments' },
|
||||
{ label: 'اطلاعیهها', icon: 'pi pi-bell', to: '/notifications' },
|
||||
{ label: 'درخواستهای تماس', icon: 'pi pi-comments', to: '/contact-inquiries' },
|
||||
{ label: 'گزارش فعالیتها', icon: 'pi pi-history', to: '/logs' },
|
||||
{ label: 'نقشها و دسترسیها', icon: 'pi pi-shield', to: '/roles' }
|
||||
];
|
||||
|
||||
function isMenuActive(to) {
|
||||
if (to === '/') {
|
||||
return route.path === '/';
|
||||
}
|
||||
return route.path === to || route.path.startsWith(`${to}/`);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-sidebar {
|
||||
width: 240px;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.menu-item {
|
||||
color: var(--text-secondary);
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
&.active-item {
|
||||
background-color: var(--primary-color-light);
|
||||
color: var(--primary-color);
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user