From 2e4ccad8945712228f1bfe285e3c39e1fe98212a Mon Sep 17 00:00:00 2001 From: Sergey Karmanov Date: Mon, 18 May 2026 03:41:49 +0300 Subject: [PATCH] =?UTF-8?q?refactor:=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D1=91=D1=81=20=D0=B4=D0=BE=D1=81=D1=82=D0=B8=D0=B6=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B2=20=D0=BF=D1=80=D0=BE=D1=84=D0=B8=D0=BB?= =?UTF-8?q?=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/layout/AppSidebar.vue | 1 - frontend/src/router/index.ts | 1 - .../src/views/student/AchievementsView.vue | 67 ------------------- frontend/src/views/student/ProfileView.vue | 50 +++++++++++--- 4 files changed, 40 insertions(+), 79 deletions(-) delete mode 100644 frontend/src/views/student/AchievementsView.vue diff --git a/frontend/src/components/layout/AppSidebar.vue b/frontend/src/components/layout/AppSidebar.vue index bf69b41..60636ba 100644 --- a/frontend/src/components/layout/AppSidebar.vue +++ b/frontend/src/components/layout/AppSidebar.vue @@ -13,7 +13,6 @@ const navItems: NavItem[] = [ { label: 'Главная', icon: 'home', to: '/', roles: ['student'] }, { label: 'Каталог', icon: 'books', to: '/catalog', roles: ['student'] }, { label: 'Мои записи', icon: 'clipboard-list', to: '/my-lectures', roles: ['student'] }, - { label: 'Достижения', icon: 'trophy', to: '/achievements', roles: ['student'] }, { label: 'Профиль', icon: 'user', to: '/profile', roles: ['student'] }, // Teacher { label: 'Дашборд', icon: 'chart-bar', to: '/teacher', roles: ['teacher'] }, diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 88c551c..ea9b5b5 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -19,7 +19,6 @@ const router = createRouter({ { path: '/my-lectures', name: 'my-lectures', component: () => import('@/views/student/MyLecturesView.vue'), meta: { role: 'student' } }, { path: '/review/:id', name: 'review-form', component: () => import('@/views/student/ReviewFormView.vue'), meta: { role: 'student' } }, { path: '/profile', name: 'profile', component: () => import('@/views/student/ProfileView.vue') }, - { path: '/achievements', name: 'achievements', component: () => import('@/views/student/AchievementsView.vue'), meta: { role: 'student' } }, { path: '/notifications', name: 'notifications', component: () => import('@/views/student/NotificationsView.vue') }, // Teacher diff --git a/frontend/src/views/student/AchievementsView.vue b/frontend/src/views/student/AchievementsView.vue deleted file mode 100644 index d733108..0000000 --- a/frontend/src/views/student/AchievementsView.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - - - diff --git a/frontend/src/views/student/ProfileView.vue b/frontend/src/views/student/ProfileView.vue index a580777..1c4ceab 100644 --- a/frontend/src/views/student/ProfileView.vue +++ b/frontend/src/views/student/ProfileView.vue @@ -41,6 +41,8 @@ const levelProgressLabel = computed(() => const levelProgressText = computed(() => hasNextLevel.value ? `${levelProgress.value} / ${levelProgressMax.value} XP` : `${userXp.value} XP` ) +const unlockedAchievements = computed(() => userStore.achievements.filter(a => a.unlocked)) +const lockedAchievements = computed(() => userStore.achievements.filter(a => !a.unlocked)) const interestTags = ref([ { label: '#ML', active: true }, { label: '#ИИ', active: true }, @@ -105,25 +107,52 @@ onMounted(() => { Email уведомления -
Достижения
+ + + + +
Достижения
+ +
+

Полученные достижения

-
+
- -
+
+ +
+

Заблокированные

+ +
+ +
+
+
@@ -138,7 +167,8 @@ onMounted(() => { .level { margin: 16px 0; } .level-header { display: flex; justify-content: space-between; font-size: 12px; color: var(--color-text-secondary); margin-bottom: 6px; } .tags-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } -.settings { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; } +.settings { display: flex; flex-direction: column; gap: 8px; } .setting { font-size: 13px; color: var(--color-text-secondary); display: flex; gap: 8px; align-items: center; } -.achievements { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; } +.achievements-section { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; } +.achievements-list { display: flex; flex-direction: column; gap: 12px; }