fix(web): jump to primary stacked asset from memory (#26978)

This commit is contained in:
Michel Heusschen
2026-03-17 12:39:39 +01:00
committed by GitHub
parent ac6938a629
commit 9b0b2bfcf2
@@ -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 -->