mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(web): jump to primary stacked asset from memory (#26978)
This commit is contained in:
@@ -63,8 +63,9 @@
|
|||||||
let playerInitialized = $state(false);
|
let playerInitialized = $state(false);
|
||||||
let paused = $state(false);
|
let paused = $state(false);
|
||||||
let current = $state<MemoryAsset | undefined>(undefined);
|
let current = $state<MemoryAsset | undefined>(undefined);
|
||||||
let currentMemoryAssetFull = $derived.by(async () =>
|
const currentAssetId = $derived(current?.asset.id);
|
||||||
current?.asset ? await getAssetInfo({ ...authManager.params, id: current.asset.id }) : undefined,
|
const currentMemoryAssetFull = $derived.by(async () =>
|
||||||
|
currentAssetId ? await getAssetInfo({ ...authManager.params, id: currentAssetId }) : undefined,
|
||||||
);
|
);
|
||||||
let currentTimelineAssets = $derived(current?.memory.assets ?? []);
|
let currentTimelineAssets = $derived(current?.memory.assets ?? []);
|
||||||
let viewerAssets = $derived([
|
let viewerAssets = $derived([
|
||||||
@@ -550,14 +551,18 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<IconButton
|
{#await currentMemoryAssetFull then asset}
|
||||||
href={Route.photos({ at: current.asset.id })}
|
{#if asset}
|
||||||
icon={mdiImageSearch}
|
<IconButton
|
||||||
aria-label={$t('view_in_timeline')}
|
href={Route.photos({ at: asset.stack?.primaryAssetId ?? asset.id })}
|
||||||
color="secondary"
|
icon={mdiImageSearch}
|
||||||
variant="ghost"
|
aria-label={$t('view_in_timeline')}
|
||||||
shape="round"
|
color="secondary"
|
||||||
/>
|
variant="ghost"
|
||||||
|
shape="round"
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- CONTROL BUTTONS -->
|
<!-- CONTROL BUTTONS -->
|
||||||
|
|||||||
Reference in New Issue
Block a user