grey out items being cut
This commit is contained in:
parent
3f6f9a8844
commit
e16c92fe0a
2 changed files with 4 additions and 1 deletions
|
@ -30,6 +30,7 @@
|
|||
import {
|
||||
copied,
|
||||
copySelection,
|
||||
cut,
|
||||
cutSelection,
|
||||
pasteSelection,
|
||||
selectAll,
|
||||
|
@ -144,6 +145,8 @@
|
|||
{/if}
|
||||
<span
|
||||
class="w-full text-left truncate py-1 flex flex-row items-center {hidden
|
||||
? 'text-muted-foreground'
|
||||
: ''} {$cut && $copied?.some((i) => i.getFullId() === item.getFullId())
|
||||
? 'text-muted-foreground'
|
||||
: ''}"
|
||||
on:contextmenu={(e) => {
|
||||
|
|
|
@ -230,7 +230,7 @@ export function applyToOrderedSelectedItemsFromFile(callback: (fileId: string, l
|
|||
}
|
||||
|
||||
export const copied = writable<ListItem[] | undefined>(undefined);
|
||||
const cut = writable(false);
|
||||
export const cut = writable(false);
|
||||
|
||||
export function copySelection(): boolean {
|
||||
let selected = get(selection).getSelected();
|
||||
|
|
Loading…
Reference in a new issue