mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
fix(web): reset select all button state on escape press (#13600)
* factor out cancel multiselect state logic to utils * use cancel multiselct helper in album page * use cancel multiselct helper in album-viewer component * use cancel multiselct helper in asset-grid component * remove unused to fix lint
This commit is contained in:
parent
ee0130a58b
commit
45517ab7ae
5 changed files with 14 additions and 17 deletions
web/src/lib/components/photos-page
|
@ -5,19 +5,13 @@
|
|||
import { AppRoute, AssetAction } from '$lib/constants';
|
||||
import type { AssetInteractionStore } from '$lib/stores/asset-interaction.store';
|
||||
import { assetViewingStore } from '$lib/stores/asset-viewing.store';
|
||||
import {
|
||||
AssetBucket,
|
||||
AssetStore,
|
||||
isSelectingAllAssets,
|
||||
type BucketListener,
|
||||
type ViewportXY,
|
||||
} from '$lib/stores/assets.store';
|
||||
import { AssetBucket, AssetStore, type BucketListener, type ViewportXY } from '$lib/stores/assets.store';
|
||||
import { locale, showDeleteModal } from '$lib/stores/preferences.store';
|
||||
import { isSearchEnabled } from '$lib/stores/search.store';
|
||||
import { featureFlags } from '$lib/stores/server-config.store';
|
||||
import { handlePromiseError } from '$lib/utils';
|
||||
import { deleteAssets } from '$lib/utils/actions';
|
||||
import { archiveAssets, selectAllAssets, stackAssets } from '$lib/utils/asset-utils';
|
||||
import { archiveAssets, cancelMultiselect, selectAllAssets, stackAssets } from '$lib/utils/asset-utils';
|
||||
import { navigate } from '$lib/utils/navigation';
|
||||
import {
|
||||
formatGroupTitle,
|
||||
|
@ -589,8 +583,7 @@
|
|||
let shiftKeyIsDown = false;
|
||||
|
||||
const deselectAllAssets = () => {
|
||||
$isSelectingAllAssets = false;
|
||||
assetInteractionStore.clearMultiselect();
|
||||
cancelMultiselect(assetInteractionStore);
|
||||
};
|
||||
|
||||
const onKeyDown = (event: KeyboardEvent) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue