mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
perf(web): optimize response sizes for initial page load (#7594)
This commit is contained in:
parent
ba12d92af3
commit
f88343019d
2 changed files with 14 additions and 13 deletions
|
@ -14,7 +14,6 @@
|
||||||
import type { AlbumResponseDto, AssetResponseDto } from '@immich/sdk';
|
import type { AlbumResponseDto, AssetResponseDto } from '@immich/sdk';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
import { createEventDispatcher, onDestroy, onMount } from 'svelte';
|
import { createEventDispatcher, onDestroy, onMount } from 'svelte';
|
||||||
import AssetViewer from '../asset-viewer/asset-viewer.svelte';
|
|
||||||
import IntersectionObserver from '../asset-viewer/intersection-observer.svelte';
|
import IntersectionObserver from '../asset-viewer/intersection-observer.svelte';
|
||||||
import Portal from '../shared-components/portal/portal.svelte';
|
import Portal from '../shared-components/portal/portal.svelte';
|
||||||
import Scrollbar from '../shared-components/scrollbar/scrollbar.svelte';
|
import Scrollbar from '../shared-components/scrollbar/scrollbar.svelte';
|
||||||
|
@ -451,17 +450,19 @@
|
||||||
|
|
||||||
<Portal target="body">
|
<Portal target="body">
|
||||||
{#if $showAssetViewer}
|
{#if $showAssetViewer}
|
||||||
<AssetViewer
|
{#await import('../asset-viewer/asset-viewer.svelte') then AssetViewer}
|
||||||
{withStacked}
|
<AssetViewer.default
|
||||||
{assetStore}
|
{withStacked}
|
||||||
asset={$viewingAsset}
|
{assetStore}
|
||||||
{isShared}
|
asset={$viewingAsset}
|
||||||
{album}
|
{isShared}
|
||||||
on:previous={handlePrevious}
|
{album}
|
||||||
on:next={handleNext}
|
on:previous={handlePrevious}
|
||||||
on:close={handleClose}
|
on:next={handleNext}
|
||||||
on:action={({ detail: action }) => handleAction(action.type, action.asset)}
|
on:close={handleClose}
|
||||||
/>
|
on:action={({ detail: action }) => handleAction(action.type, action.asset)}
|
||||||
|
/>
|
||||||
|
{/await}
|
||||||
{/if}
|
{/if}
|
||||||
</Portal>
|
</Portal>
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
class="h-full w-full rounded-xl object-cover"
|
class="h-full w-full rounded-xl object-cover"
|
||||||
src={getAssetThumbnailUrl(memory.assets[0].id, ThumbnailFormat.Jpeg)}
|
src={getAssetThumbnailUrl(memory.assets[0].id, ThumbnailFormat.Webp)}
|
||||||
alt={`Memory Lane ${getAltText(memory.assets[0])}`}
|
alt={`Memory Lane ${getAltText(memory.assets[0])}`}
|
||||||
draggable="false"
|
draggable="false"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue