From 6b0f9ec46cb5340932add131949c5952395aec7d Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 16 Dec 2024 08:42:40 -0600 Subject: [PATCH 01/12] chore(mobile): post release tasks (#14656) --- mobile/ios/Runner.xcodeproj/project.pbxproj | 6 +++--- mobile/ios/Runner/Info.plist | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mobile/ios/Runner.xcodeproj/project.pbxproj b/mobile/ios/Runner.xcodeproj/project.pbxproj index 49ac6c4cff..613a8fdf10 100644 --- a/mobile/ios/Runner.xcodeproj/project.pbxproj +++ b/mobile/ios/Runner.xcodeproj/project.pbxproj @@ -403,7 +403,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 184; + CURRENT_PROJECT_VERSION = 185; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -546,7 +546,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 184; + CURRENT_PROJECT_VERSION = 185; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -575,7 +575,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 184; + CURRENT_PROJECT_VERSION = 185; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; diff --git a/mobile/ios/Runner/Info.plist b/mobile/ios/Runner/Info.plist index 28d21e266e..2a74f88485 100644 --- a/mobile/ios/Runner/Info.plist +++ b/mobile/ios/Runner/Info.plist @@ -58,11 +58,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.122.2 + 1.122.3 CFBundleSignature ???? CFBundleVersion - 184 + 185 FLTEnableImpeller ITSAppUsesNonExemptEncryption From 8945a5d862254bae244a52fa0edf04be5daf596c Mon Sep 17 00:00:00 2001 From: martin <74269598+martabal@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:45:01 +0100 Subject: [PATCH 02/12] fix: reduce the number of API requests when changing route (#14666) * fix: reduce the number of API requests when changing route * fix: reset `userInteraction` after sign out --- .../components/forms/create-user-form.svelte | 6 +++-- .../components/forms/edit-user-form.svelte | 5 ++-- .../navigation-bar/navigation-bar.svelte | 9 ++++--- .../side-bar/recent-albums.svelte | 6 +++++ .../side-bar/server-status.svelte | 9 ++++++- .../side-bar/storage-space.svelte | 13 ++++++---- web/src/lib/stores/server-info.store.ts | 4 --- web/src/lib/stores/user.svelte.ts | 26 +++++++++++++++++++ web/src/lib/utils/auth.ts | 5 ++-- 9 files changed, 63 insertions(+), 20 deletions(-) delete mode 100644 web/src/lib/stores/server-info.store.ts create mode 100644 web/src/lib/stores/user.svelte.ts 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 @@