mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +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>
|
||||
|
||||
<LoginForm
|
||||
onSuccess={() => goto(AppRoute.PHOTOS, { invalidateAll: true })}
|
||||
onFirstLogin={() => goto(AppRoute.AUTH_CHANGE_PASSWORD)}
|
||||
onOnboarding={() => goto(AppRoute.AUTH_ONBOARDING)}
|
||||
onSuccess={async () => await goto(AppRoute.PHOTOS, { invalidateAll: true })}
|
||||
onFirstLogin={async () => await goto(AppRoute.AUTH_CHANGE_PASSWORD)}
|
||||
onOnboarding={async () => await goto(AppRoute.AUTH_ONBOARDING)}
|
||||
/>
|
||||
</FullscreenContainer>
|
||||
{/if}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
import OnboadingStorageTemplate from '$lib/components/onboarding-page/onboarding-storage-template.svelte';
|
||||
import OnboardingTheme from '$lib/components/onboarding-page/onboarding-theme.svelte';
|
||||
import { AppRoute, QueryParameter } from '$lib/constants';
|
||||
import { retrieveServerConfig } from '$lib/stores/server-config.store';
|
||||
import { updateAdminOnboarding } from '@immich/sdk';
|
||||
|
||||
let index = 0;
|
||||
|
@ -35,6 +36,7 @@
|
|||
const handleDoneClicked = async () => {
|
||||
if (index >= onboardingSteps.length - 1) {
|
||||
await updateAdminOnboarding({ adminOnboardingUpdateDto: { isOnboarded: true } });
|
||||
await retrieveServerConfig();
|
||||
await goto(AppRoute.PHOTOS);
|
||||
} else {
|
||||
index++;
|
||||
|
|
Loading…
Reference in a new issue