|
|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
|
|
|
|
|
import type { AssetInteractionStore } from '$lib/stores/asset-interaction.store';
|
|
|
|
|
import { BucketPosition, type AssetStore } from '$lib/stores/assets.store';
|
|
|
|
|
import { BucketPosition, type AssetStore, isSelectAllCancelled } from '$lib/stores/assets.store';
|
|
|
|
|
import { handleError } from '$lib/utils/handle-error';
|
|
|
|
|
import { get } from 'svelte/store';
|
|
|
|
|
import { mdiTimerSand, mdiSelectAll } from '@mdi/js';
|
|
|
|
|
@ -13,10 +13,14 @@
|
|
|
|
|
|
|
|
|
|
const handleSelectAll = async () => {
|
|
|
|
|
try {
|
|
|
|
|
$isSelectAllCancelled = false;
|
|
|
|
|
selecting = true;
|
|
|
|
|
|
|
|
|
|
const assetGridState = get(assetStore);
|
|
|
|
|
for (const bucket of assetGridState.buckets) {
|
|
|
|
|
if ($isSelectAllCancelled) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
await assetStore.loadBucket(bucket.bucketDate, BucketPosition.Unknown);
|
|
|
|
|
for (const asset of bucket.assets) {
|
|
|
|
|
assetInteractionStore.selectAsset(asset);
|
|
|
|
|
|