mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
chore(web): ensure goto is awaited for login page (#12087)
* chore(web): ensure goto is await for login page * ensure server config is updated after onboarding is finished
This commit is contained in:
parent
028be6738e
commit
be476d7982
2 changed files with 5 additions and 3 deletions
|
@ -17,9 +17,9 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<LoginForm
|
<LoginForm
|
||||||
onSuccess={() => goto(AppRoute.PHOTOS, { invalidateAll: true })}
|
onSuccess={async () => await goto(AppRoute.PHOTOS, { invalidateAll: true })}
|
||||||
onFirstLogin={() => goto(AppRoute.AUTH_CHANGE_PASSWORD)}
|
onFirstLogin={async () => await goto(AppRoute.AUTH_CHANGE_PASSWORD)}
|
||||||
onOnboarding={() => goto(AppRoute.AUTH_ONBOARDING)}
|
onOnboarding={async () => await goto(AppRoute.AUTH_ONBOARDING)}
|
||||||
/>
|
/>
|
||||||
</FullscreenContainer>
|
</FullscreenContainer>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
import OnboadingStorageTemplate from '$lib/components/onboarding-page/onboarding-storage-template.svelte';
|
import OnboadingStorageTemplate from '$lib/components/onboarding-page/onboarding-storage-template.svelte';
|
||||||
import OnboardingTheme from '$lib/components/onboarding-page/onboarding-theme.svelte';
|
import OnboardingTheme from '$lib/components/onboarding-page/onboarding-theme.svelte';
|
||||||
import { AppRoute, QueryParameter } from '$lib/constants';
|
import { AppRoute, QueryParameter } from '$lib/constants';
|
||||||
|
import { retrieveServerConfig } from '$lib/stores/server-config.store';
|
||||||
import { updateAdminOnboarding } from '@immich/sdk';
|
import { updateAdminOnboarding } from '@immich/sdk';
|
||||||
|
|
||||||
let index = 0;
|
let index = 0;
|
||||||
|
@ -35,6 +36,7 @@
|
||||||
const handleDoneClicked = async () => {
|
const handleDoneClicked = async () => {
|
||||||
if (index >= onboardingSteps.length - 1) {
|
if (index >= onboardingSteps.length - 1) {
|
||||||
await updateAdminOnboarding({ adminOnboardingUpdateDto: { isOnboarded: true } });
|
await updateAdminOnboarding({ adminOnboardingUpdateDto: { isOnboarded: true } });
|
||||||
|
await retrieveServerConfig();
|
||||||
await goto(AppRoute.PHOTOS);
|
await goto(AppRoute.PHOTOS);
|
||||||
} else {
|
} else {
|
||||||
index++;
|
index++;
|
||||||
|
|
Loading…
Reference in a new issue