diff --git a/website/src/lib/components/App.svelte b/website/src/lib/components/App.svelte index a88486a4..23c5e40c 100644 --- a/website/src/lib/components/App.svelte +++ b/website/src/lib/components/App.svelte @@ -1,14 +1,13 @@
@@ -26,7 +25,7 @@
- + diff --git a/website/src/lib/components/file-list/FileListNodeLabel.svelte b/website/src/lib/components/file-list/FileListNodeLabel.svelte new file mode 100644 index 00000000..2e1d1d3f --- /dev/null +++ b/website/src/lib/components/file-list/FileListNodeLabel.svelte @@ -0,0 +1,35 @@ + + + + + { + e.stopPropagation(); // Avoid toggling the collapsible element + }} + on:contextmenu={(e) => { + if (e.ctrlKey) { + // Add to selection instead of opening context menu + e.preventDefault(); + e.stopPropagation(); + selected.update((value) => { + if (value.has(id)) { + value.delete(id); + } else { + value.add(id); + } + return value; + }); + } + }} +> + {label} +