Fix redirect to login page after password change (#461)
* Fix redirect to login page after password change Copied from the similar fix in #414 * Fix typo in change-password form * Remove misplaced text from user management page
This commit is contained in:
parent
87d2a954a3
commit
2bf6cd9241
3 changed files with 4 additions and 9 deletions
|
@ -8,8 +8,6 @@
|
|||
const dispatch = createEventDispatcher();
|
||||
</script>
|
||||
|
||||
<p class="text-sm">USER LIST</p>
|
||||
|
||||
<table class="text-left w-full my-4">
|
||||
<thead class="border rounded-md mb-2 bg-gray-50 flex text-immich-primary w-full h-12 ">
|
||||
<tr class="flex w-full place-items-center">
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<div class="border bg-white p-4 shadow-sm w-[500px] rounded-md py-8">
|
||||
<div class="flex flex-col place-items-center place-content-center gap-4 px-4">
|
||||
<img class="text-center" src="/immich-logo.svg" height="100" width="100" alt="immich-logo" />
|
||||
<h1 class="text-2xl text-immich-primary font-medium">Chage Password</h1>
|
||||
<h1 class="text-2xl text-immich-primary font-medium">Change Password</h1>
|
||||
|
||||
<p class="text-sm border rounded-md p-4 font-mono text-gray-600">
|
||||
Hi {user.firstName}
|
||||
|
|
|
@ -39,12 +39,9 @@
|
|||
export let user: UserResponseDto;
|
||||
|
||||
const onSuccessHandler = async () => {
|
||||
/** Svelte route fetch */
|
||||
const res = await fetch('/auth/logout', { method: 'POST' });
|
||||
await fetch('auth/logout', { method: 'POST' });
|
||||
|
||||
if (res.status == 200 && res.statusText == 'OK') {
|
||||
goto('/auth/login');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue