mirror of
https://github.com/immich-app/immich.git
synced 2025-03-01 15:11:21 +01:00
fix(web): allow deselecting all assets from select bar (#9320)
* fix(web): allow deselecting all assets from select bar * Change deselect logo * select remove --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
5eaf489ecf
commit
6a5bc156a6
2 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
|
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
|
||||||
import type { AssetInteractionStore } from '$lib/stores/asset-interaction.store';
|
import type { AssetInteractionStore } from '$lib/stores/asset-interaction.store';
|
||||||
import { type AssetStore, isSelectingAllAssets } from '$lib/stores/assets.store';
|
import { type AssetStore, isSelectingAllAssets } from '$lib/stores/assets.store';
|
||||||
import { mdiSelectAll, mdiTimerSand } from '@mdi/js';
|
import { mdiSelectAll, mdiSelectRemove } from '@mdi/js';
|
||||||
import { selectAllAssets } from '$lib/utils/asset-utils';
|
import { selectAllAssets } from '$lib/utils/asset-utils';
|
||||||
|
|
||||||
export let assetStore: AssetStore;
|
export let assetStore: AssetStore;
|
||||||
|
@ -14,11 +14,12 @@
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
$isSelectingAllAssets = false;
|
$isSelectingAllAssets = false;
|
||||||
|
assetInteractionStore.clearMultiselect();
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $isSelectingAllAssets}
|
{#if $isSelectingAllAssets}
|
||||||
<CircleIconButton title="Cancel" icon={mdiTimerSand} on:click={handleCancel} />
|
<CircleIconButton title="Unselect all" icon={mdiSelectRemove} on:click={handleCancel} />
|
||||||
{:else}
|
{:else}
|
||||||
<CircleIconButton title="Select all" icon={mdiSelectAll} on:click={handleSelectAll} />
|
<CircleIconButton title="Select all" icon={mdiSelectAll} on:click={handleSelectAll} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -370,7 +370,6 @@ export const selectAllAssets = async (assetStore: AssetStore, assetInteractionSt
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
handleError(error, 'Error selecting all assets');
|
handleError(error, 'Error selecting all assets');
|
||||||
} finally {
|
|
||||||
isSelectingAllAssets.set(false);
|
isSelectingAllAssets.set(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue