diff --git a/web/src/lib/components/forms/create-user-form.svelte b/web/src/lib/components/forms/create-user-form.svelte index b1599a24b2..7aa1c76ed3 100644 --- a/web/src/lib/components/forms/create-user-form.svelte +++ b/web/src/lib/components/forms/create-user-form.svelte @@ -1,7 +1,7 @@ -{#if shouldShowHelpPanel && aboutInfo} - (shouldShowHelpPanel = false)} info={aboutInfo} /> +{#if shouldShowHelpPanel && info} + (shouldShowHelpPanel = false)} {info} /> {/if}
diff --git a/web/src/lib/components/shared-components/side-bar/recent-albums.svelte b/web/src/lib/components/shared-components/side-bar/recent-albums.svelte index d90d7dec01..b11935d643 100644 --- a/web/src/lib/components/shared-components/side-bar/recent-albums.svelte +++ b/web/src/lib/components/shared-components/side-bar/recent-albums.svelte @@ -4,13 +4,19 @@ import { getAllAlbums, type AlbumResponseDto } from '@immich/sdk'; import { handleError } from '$lib/utils/handle-error'; import { t } from 'svelte-i18n'; + import { userInteraction } from '$lib/stores/user.svelte'; let albums: AlbumResponseDto[] = $state([]); onMount(async () => { + if (userInteraction.recentAlbums) { + albums = userInteraction.recentAlbums; + return; + } try { const allAlbums = await getAllAlbums({}); albums = allAlbums.sort((a, b) => (a.updatedAt > b.updatedAt ? -1 : 1)).slice(0, 3); + userInteraction.recentAlbums = albums; } catch (error) { handleError(error, $t('failed_to_load_assets')); } diff --git a/web/src/lib/components/shared-components/side-bar/server-status.svelte b/web/src/lib/components/shared-components/side-bar/server-status.svelte index 2a0e6a0821..e1d7340c46 100644 --- a/web/src/lib/components/shared-components/side-bar/server-status.svelte +++ b/web/src/lib/components/shared-components/side-bar/server-status.svelte @@ -12,17 +12,24 @@ } from '@immich/sdk'; import Icon from '$lib/components/elements/icon.svelte'; import { mdiAlert } from '@mdi/js'; + import { userInteraction } from '$lib/stores/user.svelte'; const { serverVersion, connected } = websocketStore; let isOpen = $state(false); - let info: ServerAboutResponseDto | undefined = $state(); let versions: ServerVersionHistoryResponseDto[] = $state([]); onMount(async () => { + if (userInteraction.aboutInfo && userInteraction.versions && $serverVersion) { + info = userInteraction.aboutInfo; + versions = userInteraction.versions; + return; + } await requestServerInfo(); [info, versions] = await Promise.all([getAboutInfo(), getVersionHistory()]); + userInteraction.aboutInfo = info; + userInteraction.versions = versions; }); let isMain = $derived(info?.sourceRef === 'main' && info.repository === 'immich-app/immich'); let version = $derived( diff --git a/web/src/lib/components/shared-components/side-bar/storage-space.svelte b/web/src/lib/components/shared-components/side-bar/storage-space.svelte index c0de9378ac..9472397565 100644 --- a/web/src/lib/components/shared-components/side-bar/storage-space.svelte +++ b/web/src/lib/components/shared-components/side-bar/storage-space.svelte @@ -1,18 +1,18 @@ @@ -54,7 +57,7 @@