logout
This commit is contained in:
parent
6024d0125e
commit
dcdf8fb6a0
@ -55,6 +55,10 @@ export function LoginForm({ onRegister }: { onRegister?: () => void }): VNode {
|
||||
notifyError(title, description, debug)
|
||||
}
|
||||
|
||||
async function doLogout() {
|
||||
backend.logOut()
|
||||
}
|
||||
|
||||
async function doLogin() {
|
||||
if (!username || !password) return;
|
||||
setBusy({})
|
||||
@ -198,7 +202,7 @@ export function LoginForm({ onRegister }: { onRegister?: () => void }): VNode {
|
||||
class="rounded-md bg-white-600 px-3 py-1.5 text-sm font-semibold leading-6 text-black shadow-sm hover:bg-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-600"
|
||||
onClick={(e) => {
|
||||
e.preventDefault()
|
||||
doLogin()
|
||||
doLogout()
|
||||
}}
|
||||
>
|
||||
<i18n.Translate>Cancel</i18n.Translate>
|
||||
|
Loading…
Reference in New Issue
Block a user