diff --git a/frontend/src/components/Sidebar/AppSidebar.vue b/frontend/src/components/Sidebar/AppSidebar.vue index 4e2ffbc6..44f1b435 100644 --- a/frontend/src/components/Sidebar/AppSidebar.vue +++ b/frontend/src/components/Sidebar/AppSidebar.vue @@ -593,7 +593,7 @@ const addEnlightCustomItems = () => { const roles = userResource.data?.roles || [] const customItems = [] - // LeaderBoard — для всех авторизованных + // LeaderBoard — Vue-маршрут, для всех авторизованных if (user) { customItems.push({ label: __('Leader Board'), @@ -603,7 +603,7 @@ const addEnlightCustomItems = () => { }) } - // My Points — для студентов и школьников + // My Points — Vue-маршрут, для студентов и школьников if (roles.includes('LMS Student') || roles.includes('LMS Schoolchild')) { customItems.push({ label: __('My points'), @@ -613,41 +613,7 @@ const addEnlightCustomItems = () => { }) } - // ChatGPT — роль-зависимая ссылка - let chatURL = '' - let chatLabel = '' - if (roles.includes('LMS Schoolchild')) { - chatURL = 'chatgpt-schoolchild' - chatLabel = __('ChatGPT for Schoolers') - } else if (roles.includes('LMS Student')) { - chatURL = 'chatgpt-schoolchild' - chatLabel = __('ChatGPT for Students') - } else if (roles.includes('Course Creator')) { - chatURL = 'ai-teachers' - chatLabel = __('ChatGPT for Teachers') - } - if (chatURL) { - customItems.push({ - label: chatLabel, - icon: 'Cpu', - to: chatURL, - external: true, - activeFor: [], - }) - } - - // My Child — для родителей - if (roles.includes('Parent')) { - customItems.push({ - label: __('My Child'), - icon: 'User', - to: 'my-child', - activeFor: [], - external: true, - }) - } - - // Profile — роль-зависимый профиль + // Profile — Vue-маршруты, роль-зависимый профиль if (roles.includes('LMS Student')) { customItems.push({ label: __('Student Profile'), @@ -678,6 +644,9 @@ const addEnlightCustomItems = () => { }) } + // Внешние страницы (ChatGPT, My Child и др.) управляются + // через "More +" в боковой панели, не хардкодятся здесь. + if (customItems.length > 0) { sidebarLinks.value.push({ label: 'Enlight',