Skip to content

Commit

Permalink
fix(web): allow deselecting all assets from select bar (#9320)
Browse files Browse the repository at this point in the history
* fix(web): allow deselecting all assets from select bar

* Change deselect logo

* select remove

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
  • Loading branch information
Snowknight26 and alextran1502 committed May 8, 2024
1 parent 5eaf489 commit 6a5bc15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
import type { AssetInteractionStore } from '$lib/stores/asset-interaction.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';
export let assetStore: AssetStore;
Expand All @@ -14,11 +14,12 @@
const handleCancel = () => {
$isSelectingAllAssets = false;
assetInteractionStore.clearMultiselect();
};
</script>

{#if $isSelectingAllAssets}
<CircleIconButton title="Cancel" icon={mdiTimerSand} on:click={handleCancel} />
<CircleIconButton title="Unselect all" icon={mdiSelectRemove} on:click={handleCancel} />
{:else}
<CircleIconButton title="Select all" icon={mdiSelectAll} on:click={handleSelectAll} />
{/if}
1 change: 0 additions & 1 deletion web/src/lib/utils/asset-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ export const selectAllAssets = async (assetStore: AssetStore, assetInteractionSt
}
} catch (error) {
handleError(error, 'Error selecting all assets');
} finally {
isSelectingAllAssets.set(false);
}
};
Expand Down

0 comments on commit 6a5bc15

Please sign in to comment.