fix copied & cut stores

This commit is contained in:
vcoppe
2025-10-18 09:36:55 +02:00
parent 4ae0bc25c2
commit 9fa8fe5767
5 changed files with 18 additions and 17 deletions

View File

@@ -10,7 +10,7 @@
import { settings } from '$lib/logic/settings';
import { fileStateCollection } from '$lib/logic/file-state';
import { createFile, pasteSelection } from '$lib/logic/file-actions';
import { selection } from '$lib/logic/selection';
import { selection, copied } from '$lib/logic/selection';
let {
orientation,
@@ -86,9 +86,9 @@
</ContextMenu.Item>
<ContextMenu.Separator />
<ContextMenu.Item
disabled={selection.copied === undefined ||
selection.copied.length === 0 ||
!allowedPastes[selection.copied[0].level].includes(ListLevel.ROOT)}
disabled={$copied === undefined ||
$copied.length === 0 ||
!allowedPastes[$copied[0].level].includes(ListLevel.ROOT)}
onclick={pasteSelection}
>
<ClipboardPaste size="16" class="mr-1" />