Refactor Indeehub integration and enhance deployment documentation

- Updated Indeehub references throughout the codebase, changing the name from "IndeedHub" to "Indeehub" for consistency.
- Implemented a virtual app structure for Indeehub, allowing it to open an external URL without requiring a container.
- Enhanced deployment scripts and documentation to clarify SSH access and password management for Indeehub.
- Improved error handling and retry logic in various components to ensure better user experience during onboarding and app interactions.
- Updated CSS for visual enhancements and added new buttons for improved navigation in the AppLauncherOverlay.
This commit is contained in:
Dorian
2026-03-01 17:53:18 +00:00
parent 2c15311ab6
commit 7a05e11834
34 changed files with 877 additions and 163 deletions
+24 -9
View File
@@ -134,8 +134,18 @@ 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 home
// If authenticated and visiting /login, validate session first
if (to.path === '/login' && store.isAuthenticated) {
if (store.needsSessionValidation()) {
const valid = await store.checkSession()
if (valid) {
next({ name: 'home' })
return
}
// Session invalid, allow login page
next()
return
}
next({ name: 'home' })
return
}
@@ -143,30 +153,35 @@ router.beforeEach(async (to, _from, next) => {
return
}
// Protected routes require authentication
// Check session if not already authenticated
// Protected routes: validate session if stale auth from localStorage
if (store.needsSessionValidation()) {
const valid = await store.checkSession()
if (!valid) {
next('/login')
return
}
next()
return
}
// Not authenticated at all
if (!store.isAuthenticated) {
const hasSession = await store.checkSession()
if (hasSession) {
next()
return
}
// No valid session - redirect to login
next('/login')
return
}
// User is already authenticated (from localStorage on page load)
// Make sure WebSocket is connected
// Validated and authenticated - ensure WebSocket is connected
if (!store.isConnected && !store.isReconnecting) {
console.log('[Router] User authenticated but WebSocket not connected, connecting...')
store.connectWebSocket().catch((err) => {
console.warn('[Router] WebSocket connection failed:', err)
})
}
// Authenticated user accessing protected route
next()
})