mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(web): backwards asset navigation in GalleryViewer (#10132)
* fix(web): backwards asset navigation in GalleryViewer * fix ctrl/cmd click --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
36bdbf93a7
commit
b8e6ae65b1
4 changed files with 31 additions and 33 deletions
|
|
@ -80,15 +80,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
const assetClickHandler = (asset: AssetResponseDto, assetsInDateGroup: AssetResponseDto[], groupTitle: string) => {
|
||||
if (isSelectionMode || $isMultiSelectState) {
|
||||
assetSelectHandler(asset, assetsInDateGroup, groupTitle);
|
||||
return;
|
||||
}
|
||||
|
||||
assetViewingStore.setAsset(asset);
|
||||
};
|
||||
|
||||
const handleSelectGroup = (title: string, assets: AssetResponseDto[]) => dispatch('select', { title, assets });
|
||||
|
||||
const assetSelectHandler = (asset: AssetResponseDto, assetsInDateGroup: AssetResponseDto[], groupTitle: string) => {
|
||||
|
|
@ -174,12 +165,19 @@
|
|||
{showArchiveIcon}
|
||||
{asset}
|
||||
{groupIndex}
|
||||
onClick={() => assetClickHandler(asset, groupAssets, groupTitle)}
|
||||
onClick={(asset, event) => {
|
||||
if (isSelectionMode || $isMultiSelectState) {
|
||||
event.preventDefault();
|
||||
assetSelectHandler(asset, groupAssets, groupTitle);
|
||||
return;
|
||||
}
|
||||
|
||||
assetViewingStore.setAsset(asset);
|
||||
}}
|
||||
on:select={() => assetSelectHandler(asset, groupAssets, groupTitle)}
|
||||
on:mouse-event={() => assetMouseEventHandler(groupTitle, asset)}
|
||||
selected={$selectedAssets.has(asset) || $assetStore.albumAssets.has(asset.id)}
|
||||
selectionCandidate={$assetSelectionCandidates.has(asset)}
|
||||
isMultiSelectState={$isMultiSelectState || isSelectionMode}
|
||||
disabled={$assetStore.albumAssets.has(asset.id)}
|
||||
thumbnailWidth={box.width}
|
||||
thumbnailHeight={box.height}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue