feat: add profile, class unenroll, notify toggles, and keep sidebar width
Give admins a profile password page, class removal, and SMS/email/bot checkboxes, and stop the sidebar from shrinking on edit pages.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<!-- /src/components/common/NotifyChannelsField.vue -->
|
||||
<template>
|
||||
<fieldset class="notify-channels m-0 p-3 border-1 border-color border-round">
|
||||
<legend class="font-semibold text-sm px-2">ارسال اطلاعرسانی</legend>
|
||||
<div class="flex flex-column sm:flex-row flex-wrap gap-3">
|
||||
<div class="flex align-items-center gap-2">
|
||||
<Checkbox v-model="notify.sms" binary inputId="notify-sms" />
|
||||
<label for="notify-sms" class="text-sm cursor-pointer">ارسال پیامک</label>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2">
|
||||
<Checkbox v-model="notify.email" binary inputId="notify-email" />
|
||||
<label for="notify-email" class="text-sm cursor-pointer">ارسال ایمیل</label>
|
||||
</div>
|
||||
<div class="flex align-items-center gap-2">
|
||||
<Checkbox v-model="notify.bot" binary inputId="notify-bot" />
|
||||
<label for="notify-bot" class="text-sm cursor-pointer">ارسال پیام ربات</label>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-xs text-muted m-0 mt-2 line-height-3">
|
||||
پیامک در صورت فعال بودن ارسال میشود. ارسال ایمیل و پیام ربات هنوز پیادهسازی نشده است.
|
||||
</p>
|
||||
</fieldset>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Checkbox from 'primevue/checkbox';
|
||||
|
||||
defineProps({
|
||||
notify: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.notify-channels {
|
||||
background: var(--surface-ground, transparent);
|
||||
}
|
||||
|
||||
.notify-channels legend {
|
||||
color: var(--text-color);
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<!-- /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="app-sidebar p-3 surface-card border-left-1 border-color flex flex-column h-full flex-shrink-0">
|
||||
<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>
|
||||
@@ -62,11 +62,16 @@ function isMenuActive(to) {
|
||||
<style lang="scss" scoped>
|
||||
.app-sidebar {
|
||||
width: 240px;
|
||||
min-width: 240px;
|
||||
max-width: 240px;
|
||||
flex-shrink: 0;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.menu-item {
|
||||
color: var(--text-secondary);
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
color: var(--text-primary);
|
||||
@@ -76,5 +81,8 @@ function isMenuActive(to) {
|
||||
color: var(--primary-color);
|
||||
font-weight: 700;
|
||||
}
|
||||
span {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -122,10 +122,7 @@ const menuItems = ref([
|
||||
label: t('app.profile'),
|
||||
icon: 'pi pi-user',
|
||||
command: () => {
|
||||
const id = authStore.user?._id || authStore.user?.id;
|
||||
if (id) {
|
||||
router.push(`/users/edit/${id}`);
|
||||
}
|
||||
router.push('/profile');
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user