diff --git a/frontend/src/types/user.d.ts b/frontend/src/types/user.d.ts index ddd6cb26..b81806fc 100644 --- a/frontend/src/types/user.d.ts +++ b/frontend/src/types/user.d.ts @@ -63,4 +63,4 @@ interface IRegexp { raw: string; } -type UserTheme = "light" | "dark" | ""; \ No newline at end of file +type UserTheme = "light" | "dark" | ""; diff --git a/frontend/src/utils/auth.ts b/frontend/src/utils/auth.ts index b790990b..2b940cd4 100644 --- a/frontend/src/utils/auth.ts +++ b/frontend/src/utils/auth.ts @@ -24,7 +24,7 @@ export function parseToken(token: string) { const expiresAt = new Date(data.exp! * 1000); authStore.setLogoutTimer( window.setTimeout(() => { - logout('inactivity'); + logout("inactivity"); }, expiresAt.getTime() - Date.now()) ); } @@ -113,16 +113,15 @@ export function logout(reason?: string) { if (noAuth) { window.location.reload(); } else { - if(typeof reason === "string" && reason.trim() !== "") { - router.push({ - path: "/login", - query: { "logout-reason": reason } + if (typeof reason === "string" && reason.trim() !== "") { + router.push({ + path: "/login", + query: { "logout-reason": reason }, }); } else { - router.push({ + router.push({ path: "/login", }); } - } } diff --git a/frontend/src/views/Login.vue b/frontend/src/views/Login.vue index 03e5ea4a..c0e78225 100644 --- a/frontend/src/views/Login.vue +++ b/frontend/src/views/Login.vue @@ -3,7 +3,9 @@
File Browser

{{ name }}

-

{{t(`login.logout_reasons.${reason}`)}}

+

+ {{ t(`login.logout_reasons.${reason}`) }} +

{{ error }}
(createMode.value = !createMode.value); const $showError = inject("$showError")!; -const reason = route.query['logout-reason'] ?? null; +const reason = route.query["logout-reason"] ?? null; const submit = async (event: Event) => { event.preventDefault(); @@ -127,4 +129,4 @@ onMounted(() => { }); }); }); - \ No newline at end of file +