From dc4db405d2991d3ec6a114f3b08d3fccd057d3ee Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Thu, 13 Feb 2025 17:52:16 +0100
Subject: frontend: Migrate to Svelte 5

---
 frontend/src/lib/toolbar/MarkOrganized.svelte | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

(limited to 'frontend/src/lib/toolbar/MarkOrganized.svelte')

diff --git a/frontend/src/lib/toolbar/MarkOrganized.svelte b/frontend/src/lib/toolbar/MarkOrganized.svelte
index 4dc3a83..63c8622 100644
--- a/frontend/src/lib/toolbar/MarkOrganized.svelte
+++ b/frontend/src/lib/toolbar/MarkOrganized.svelte
@@ -1,27 +1,25 @@
 <script lang="ts">
-	import { getSelectionContext } from '$lib/Selection';
-	import { toastFinally } from '$lib/Toasts';
+	import type { MutationWith } from '$gql/Utils';
 	import Organized from '$lib/icons/Organized.svelte';
-	import { Client, getContextClient } from '@urql/svelte';
+	import { getSelectionContext } from '$lib/selection/Selection.svelte';
+	import { toastFinally } from '$lib/Toasts';
+	import { getContextClient } from '@urql/svelte';
 
 	const client = getContextClient();
 	const selection = getSelectionContext();
 
-	export let mutation: (
-		client: Client,
-		args: { ids: number[]; input: { organized: boolean } }
-	) => Promise<unknown>;
+	let { mutation }: { mutation: MutationWith<{ organized: boolean }> } = $props();
 
 	function mutate(organized: boolean) {
-		mutation(client, { ids: $selection.ids, input: { organized } }).catch(toastFinally);
+		mutation(client, { ids: selection.ids, input: { organized } }).catch(toastFinally);
 	}
 </script>
 
-<button type="button" class="btn-slate flex justify-start gap-1" on:click={() => mutate(true)}>
+<button type="button" class="btn-slate flex justify-start gap-1" onclick={() => mutate(true)}>
 	<Organized tristate organized={true} />
 	<span>Organized</span>
 </button>
-<button type="button" class="btn-slate flex justify-start gap-1" on:click={() => mutate(false)}>
+<button type="button" class="btn-slate flex justify-start gap-1" onclick={() => mutate(false)}>
 	<Organized dim tristate organized={false} />
 	<span>Unorganized</span>
 </button>
-- 
cgit v1.2.3-2-gb3c3

