Enhance UI components and improve user notifications

- Updated App.vue to include a toast notification system for new messages, enhancing user engagement.
- Modified SplashScreen.vue to streamline the intro text display with improved typing effects.
- Added Montserrat font styles in style.css for better typography across the application.
- Improved controller navigation in useControllerNav.ts to support enhanced focus management and sound feedback.
- Updated routing logic in index.ts to redirect authenticated users from the login page to the home page.
- Enhanced the Login.vue view with transition effects for a smoother user experience during login and setup processes.
This commit is contained in:
Dorian
2026-02-17 19:19:54 +00:00
parent 1073d9fd2c
commit 1b05b5b8f1
24 changed files with 2038 additions and 470 deletions
+18 -2
View File
@@ -1,4 +1,5 @@
import { createRouter, createWebHistory } from 'vue-router'
import { nextTick } from 'vue'
import { useAppStore } from '../stores/app'
const router = createRouter({
@@ -55,6 +56,7 @@ const router = createRouter({
},
],
},
{ path: '/dashboard/', redirect: '/dashboard' },
{
path: '/dashboard',
component: () => import('../views/Dashboard.vue'),
@@ -133,9 +135,9 @@ router.beforeEach(async (to, _from, next) => {
// Allow all public routes (login, onboarding) without auth check
if (isPublic) {
// If already authenticated and trying to access login, redirect to dashboard
// If already authenticated and trying to access login, redirect to home
if (to.path === '/login' && store.isAuthenticated) {
next('/dashboard')
next({ name: 'home' })
return
}
next()
@@ -169,5 +171,19 @@ router.beforeEach(async (to, _from, next) => {
next()
})
// Focus Home nav item for gamepad when landing on dashboard home (e.g. after login)
router.afterEach((to) => {
if (to.path === '/dashboard' || to.path === '/dashboard/') {
nextTick(() => {
setTimeout(() => {
const homeLink = document.querySelector<HTMLAnchorElement>(
'[data-controller-zone="sidebar"] a[href="/dashboard"], [data-controller-zone="sidebar"] a[href="/dashboard/"]'
)
if (homeLink) homeLink.focus()
}, 150)
})
}
})
export default router