diff --git a/bun.lock b/bun.lock index d0fb04e..9a378db 100644 --- a/bun.lock +++ b/bun.lock @@ -7,6 +7,7 @@ "dependencies": { "hono": "^4.6.0", "libsodium-wrappers-sumo": "^0.7.15", + "svelte-dnd-action": "^0.9.69", }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^5.0.0", @@ -219,6 +220,8 @@ "svelte-check": ["svelte-check@4.4.8", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.25", "chokidar": "^4.0.1", "fdir": "^6.2.0", "picocolors": "^1.0.0", "sade": "^1.7.4" }, "peerDependencies": { "svelte": "^4.0.0 || ^5.0.0-next.0", "typescript": ">=5.0.0" }, "bin": { "svelte-check": "bin/svelte-check" } }, "sha512-67adfgBox5eNSNIvIIwgFizKGdcRrGpiMoNO2obHcYuLz7iTa8Xgm/NGU3ntMFnNm8K1grFOIG6HhMLX/vcN8w=="], + "svelte-dnd-action": ["svelte-dnd-action@0.9.69", "", { "peerDependencies": { "svelte": ">=3.23.0 || ^5.0.0-next.0" } }, "sha512-NAmSOH7htJoYraTQvr+q5whlIuVoq88vEuHr4NcFgscDRUxfWPPxgie2OoxepBCQCikrXZV4pqV86aun60wVyw=="], + "tinyglobby": ["tinyglobby@0.2.16", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg=="], "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], diff --git a/frontend/src/components/ActivityRow.svelte b/frontend/src/components/ActivityRow.svelte index b103cdc..480fda5 100644 --- a/frontend/src/components/ActivityRow.svelte +++ b/frontend/src/components/ActivityRow.svelte @@ -18,17 +18,16 @@ /** Called when the row updates its own activity (e.g. after a heart * toggle). The parent should patch its list so the change persists. */ onChanged?: (a: Activity) => void; - /** Whether to render a drag handle that initiates HTML5 DnD on this row. - * Parent owns the actual dragstart/dragend wiring — the handle just - * forwards events upward. */ + /** Render a drag handle on this row. The parent owns the actual drag + * wiring via svelte-dnd-action; the handle's pointerdown/touchstart + * just flips the parent's dragDisabled to false (one drag at a time). */ draggable?: boolean; - onDragHandleStart?: (e: DragEvent) => void; - onDragHandleEnd?: () => void; + onDragHandleStart?: () => void; } let { activity, privateCleartext = null, onDeleted, onEdit, onChanged, - draggable = false, onDragHandleStart, onDragHandleEnd, + draggable = false, onDragHandleStart, }: Props = $props(); // Fallback decrypt for the case where Home hasn't pre-computed yet (e.g. @@ -205,15 +204,14 @@
{#if draggable} - + diff --git a/frontend/src/components/Home.svelte b/frontend/src/components/Home.svelte index 2882101..d9ce8a0 100644 --- a/frontend/src/components/Home.svelte +++ b/frontend/src/components/Home.svelte @@ -1,5 +1,6 @@