fix(ui): Улучшил точность активного состояния навигации и удалил кнопочку добавления пользователей

This commit is contained in:
2026-05-14 05:45:14 +03:00
parent 69c726fdc9
commit dab161ef18
3 changed files with 4 additions and 5 deletions
@@ -30,8 +30,8 @@ const navItems = computed(() => {
})
function isActive(to: string) {
if (to === '/') return route.path === '/'
return route.path.startsWith(to) && to !== '/'
if (to === '/' || to === '/teacher' || to === '/admin') return route.path === to
return route.path.startsWith(to)
}
</script>
@@ -33,8 +33,8 @@ const visible = computed(() =>
)
function isActive(to: string) {
if (to === '/') return route.path === '/'
return route.path.startsWith(to) && to !== '/'
if (to === '/' || to === '/teacher' || to === '/admin') return route.path === to
return route.path.startsWith(to)
}
</script>
@@ -90,7 +90,6 @@ onMounted(fetchUsers)
<div class="admin-users page-content">
<div class="header">
<h1 class="page-title">Пользователи</h1>
<button class="btn-primary">Добавить пользователя</button>
</div>
<GlassCard>