2022-05-21 02:23:55 -05:00
|
|
|
<script lang="ts">
|
2023-07-01 00:50:47 -04:00
|
|
|
import { goto } from '$app/navigation';
|
|
|
|
|
import LoginForm from '$lib/components/forms/login-form.svelte';
|
|
|
|
|
import FullscreenContainer from '$lib/components/shared-components/fullscreen-container.svelte';
|
|
|
|
|
import { AppRoute } from '$lib/constants';
|
|
|
|
|
import { loginPageMessage } from '$lib/constants';
|
2023-09-01 07:08:42 -04:00
|
|
|
import { featureFlags } from '$lib/stores/feature-flags.store';
|
2023-07-01 00:50:47 -04:00
|
|
|
import type { PageData } from './$types';
|
2023-03-15 22:38:29 +01:00
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
export let data: PageData;
|
2022-05-21 02:23:55 -05:00
|
|
|
</script>
|
|
|
|
|
|
2023-09-01 07:08:42 -04:00
|
|
|
{#if $featureFlags.loaded}
|
|
|
|
|
<FullscreenContainer title={data.meta.title} showMessage={!!loginPageMessage}>
|
|
|
|
|
<p slot="message">
|
|
|
|
|
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
|
|
|
|
{@html loginPageMessage}
|
|
|
|
|
</p>
|
2023-03-15 22:38:29 +01:00
|
|
|
|
2023-09-01 07:08:42 -04:00
|
|
|
<LoginForm
|
|
|
|
|
on:success={() => goto(AppRoute.PHOTOS, { invalidateAll: true })}
|
|
|
|
|
on:first-login={() => goto(AppRoute.AUTH_CHANGE_PASSWORD)}
|
|
|
|
|
/>
|
|
|
|
|
</FullscreenContainer>
|
|
|
|
|
{/if}
|