2022-08-24 21:10:48 -07:00
|
|
|
<script lang="ts">
|
2023-07-01 00:50:47 -04:00
|
|
|
import { goto } from '$app/navigation';
|
|
|
|
|
import ChangePasswordForm from '$lib/components/forms/change-password-form.svelte';
|
|
|
|
|
import FullscreenContainer from '$lib/components/shared-components/fullscreen-container.svelte';
|
|
|
|
|
import { AppRoute } from '$lib/constants';
|
2024-02-27 08:37:37 -08:00
|
|
|
import { resetSavedUser, user } from '$lib/stores/user.store';
|
|
|
|
|
import { logout } from '@immich/sdk';
|
2023-07-01 00:50:47 -04:00
|
|
|
import type { PageData } from './$types';
|
2022-08-24 21:10:48 -07:00
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
export let data: PageData;
|
2024-02-27 08:37:37 -08:00
|
|
|
|
|
|
|
|
const onSuccess = async () => {
|
|
|
|
|
await goto(AppRoute.AUTH_LOGIN);
|
|
|
|
|
resetSavedUser();
|
|
|
|
|
await logout();
|
|
|
|
|
};
|
2022-08-24 21:10:48 -07:00
|
|
|
</script>
|
|
|
|
|
|
2023-03-15 22:38:29 +01:00
|
|
|
<FullscreenContainer title={data.meta.title}>
|
2023-07-01 00:50:47 -04:00
|
|
|
<p slot="message">
|
2023-12-12 17:35:28 +01:00
|
|
|
Hi {$user.name} ({$user.email}),
|
2023-07-01 00:50:47 -04:00
|
|
|
<br />
|
|
|
|
|
<br />
|
|
|
|
|
This is either the first time you are signing into the system or a request has been made to change your password. Please
|
|
|
|
|
enter the new password below.
|
|
|
|
|
</p>
|
2023-03-15 22:38:29 +01:00
|
|
|
|
2024-02-27 08:37:37 -08:00
|
|
|
<ChangePasswordForm user={$user} on:success={onSuccess} />
|
2023-03-15 22:38:29 +01:00
|
|
|
</FullscreenContainer>
|