Add login button to 'No Session' toast notifications
Add 'Iniciar Sesión' button to toasts when session is not active. Clicking the button reloads the page, triggering Authentik redirect to login flow. Also increased toast timeout from 5s to 10s to give users more time to see and click the login button.
This commit is contained in:
@@ -82,7 +82,14 @@ export const useAuthentik = () => {
|
||||
description: 'No hay sesión activa en Authentik',
|
||||
color: 'warning',
|
||||
icon: 'i-heroicons-exclamation-triangle',
|
||||
timeout: 5000
|
||||
timeout: 10000,
|
||||
actions: [{
|
||||
label: 'Iniciar Sesión',
|
||||
click: () => {
|
||||
// Recargar la página forzará a Authentik a redirigir al login
|
||||
window.location.reload()
|
||||
}
|
||||
}]
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -100,7 +107,14 @@ export const useAuthentik = () => {
|
||||
description: 'No hay sesión activa en Authentik',
|
||||
color: 'warning',
|
||||
icon: 'i-heroicons-exclamation-triangle',
|
||||
timeout: 5000
|
||||
timeout: 10000,
|
||||
actions: [{
|
||||
label: 'Iniciar Sesión',
|
||||
click: () => {
|
||||
// Recargar la página forzará a Authentik a redirigir al login
|
||||
window.location.reload()
|
||||
}
|
||||
}]
|
||||
})
|
||||
} else {
|
||||
// Error real de red o servidor
|
||||
|
||||
Reference in New Issue
Block a user