mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 09:15:35 +03: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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user