mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): asset navigation (#17104)
This commit is contained in:
parent
90f21d9047
commit
ae447542a4
2 changed files with 47 additions and 10 deletions
|
|
@ -313,6 +313,10 @@
|
|||
if (onNext) {
|
||||
asset = await onNext();
|
||||
} else {
|
||||
if (currentViewAssetIndex >= assets.length - 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
currentViewAssetIndex = currentViewAssetIndex + 1;
|
||||
asset = currentViewAssetIndex < assets.length ? assets[currentViewAssetIndex] : undefined;
|
||||
}
|
||||
|
|
@ -359,6 +363,10 @@
|
|||
if (onPrevious) {
|
||||
asset = await onPrevious();
|
||||
} else {
|
||||
if (currentViewAssetIndex <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
currentViewAssetIndex = currentViewAssetIndex - 1;
|
||||
asset = currentViewAssetIndex >= 0 ? assets[currentViewAssetIndex] : undefined;
|
||||
}
|
||||
|
|
@ -461,7 +469,7 @@
|
|||
style:height={assetLayouts.containerHeight + 'px'}
|
||||
style:width={assetLayouts.containerWidth - 1 + 'px'}
|
||||
>
|
||||
{#each assetLayouts.assetLayout as layout (layout.asset.id)}
|
||||
{#each assetLayouts.assetLayout as layout, index (layout.asset.id + '-' + index)}
|
||||
{@const asset = layout.asset}
|
||||
|
||||
{#if layout.display}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue