fix(web): reset select all button state on escape press ()

* 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:
Darrel 2024-10-21 02:11:00 +08:00 committed by GitHub
parent ee0130a58b
commit 45517ab7ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 17 deletions
web/src/lib/utils

View file

@ -467,6 +467,11 @@ export const selectAllAssets = async (assetStore: AssetStore, assetInteractionSt
}
};
export const cancelMultiselect = (assetInteractionStore: AssetInteractionStore) => {
isSelectingAllAssets.set(false);
assetInteractionStore.clearMultiselect();
};
export const toggleArchive = async (asset: AssetResponseDto) => {
const $t = get(t);
try {