mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-07 19:59:07 +00:00
feat(web): improve /auth pages (#1969)
* feat(web): improve /auth pages * invalidate load functions after login * handle login server errors more graceful * add loading state to oauth button
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import { fade } from 'svelte/transition';
|
||||
|
||||
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';
|
||||
import type { PageData } from './$types';
|
||||
|
||||
export let data: PageData;
|
||||
</script>
|
||||
|
||||
<section
|
||||
class="min-h-screen w-screen flex place-items-center place-content-center p-4"
|
||||
transition:fade={{ duration: 100 }}
|
||||
>
|
||||
<FullscreenContainer title={data.meta.title} showMessage={!!loginPageMessage}>
|
||||
<p slot="message">
|
||||
{@html loginPageMessage}
|
||||
</p>
|
||||
|
||||
<LoginForm
|
||||
on:success={() => goto('/photos')}
|
||||
on:first-login={() => goto('/auth/change-password')}
|
||||
authConfig={data.authConfig}
|
||||
on:success={() => goto(AppRoute.PHOTOS, { invalidateAll: true })}
|
||||
on:first-login={() => goto(AppRoute.AUTH_CHANGE_PASSWORD)}
|
||||
/>
|
||||
</section>
|
||||
</FullscreenContainer>
|
||||
|
||||
Reference in New Issue
Block a user