improve recent logout information
This commit is contained in:
parent
7e97b8eeca
commit
bcfcf264f6
3 changed files with 22 additions and 13 deletions
|
|
@ -89,7 +89,8 @@ const t = useTranslations(lang)
|
|||
const error = e.getActualType()
|
||||
|
||||
if (error.status === 401) {
|
||||
auth.recentLogout = auth.authenticated // set recentLogout true, if user was logged in before
|
||||
if (!auth.recentLogout)
|
||||
auth.recentLogout = auth.authenticated // set recentLogout true, if user was logged in before
|
||||
auth.authenticated = false
|
||||
auth.authorized = false
|
||||
auth.until = null
|
||||
|
|
@ -237,6 +238,20 @@ const t = useTranslations(lang)
|
|||
</script>
|
||||
</Fragment>
|
||||
<div class="grid place-items-center grid-cols-1 gap-4 max-w-xl mx-auto" id="list">
|
||||
<Alert
|
||||
classList="hidden"
|
||||
id="alert-loggedout"
|
||||
color="warning"
|
||||
title={t("loggedOut.title")}
|
||||
description={t("loggedOut.description")}
|
||||
>
|
||||
<div class="flex justify-end">
|
||||
<a href="/auth/login" class="btn btn-sm btn-warning">
|
||||
<LogIn/>
|
||||
{t("login")}
|
||||
</a>
|
||||
</div>
|
||||
</Alert>
|
||||
<Alert
|
||||
classList="hidden"
|
||||
id="alert-unauthenticated"
|
||||
|
|
@ -259,13 +274,6 @@ const t = useTranslations(lang)
|
|||
<Lock class="size-7"/>
|
||||
</Fragment>
|
||||
</Alert>
|
||||
<Alert
|
||||
classList="hidden"
|
||||
id="alert-loggedout"
|
||||
color="warning"
|
||||
title={t("loggedOut.title")}
|
||||
description={t("loggedOut.description")}
|
||||
/>
|
||||
<Alert
|
||||
classList="hidden"
|
||||
id="alert-serverError"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue