From 618f72b31d57ac17f475dbe983a31627cff3b96e Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Thu, 13 Feb 2025 19:04:12 +0100
Subject: frontend: Allow control-clicking to open the quick filter

This makes hircine's behaviour more consistent with standard browser
behaviour (that would also open a new tab when control-clicking).
---
 frontend/src/routes/namespaces/+page.svelte | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'frontend/src/routes/namespaces/+page.svelte')

diff --git a/frontend/src/routes/namespaces/+page.svelte b/frontend/src/routes/namespaces/+page.svelte
index 04f7737..d8e728d 100644
--- a/frontend/src/routes/namespaces/+page.svelte
+++ b/frontend/src/routes/namespaces/+page.svelte
@@ -4,6 +4,7 @@
 	import type { Namespace } from '$gql/graphql';
 	import { NamespaceSortLabel } from '$lib/Enums';
 	import { BasicFilterContext } from '$lib/Filter.svelte';
+	import { quickComicFilter } from '$lib/Navigation';
 	import { toastFinally } from '$lib/Toasts';
 	import AddButton from '$lib/components/AddButton.svelte';
 	import Cardlet from '$lib/components/Cardlet.svelte';
@@ -53,6 +54,8 @@
 			.then((namespace) => modals.open(EditNamespace, { namespace }))
 			.catch(toastFinally);
 	};
+
+	const quickFilter = (id: number) => quickComicFilter(`${id}:`, 'tags');
 </script>
 
 <Head section="Namespaces" />
@@ -78,9 +81,9 @@
 		<main>
 			<Cardlets>
 				{#each namespaces.edges as { id, name }, index (id)}
-					<Selectable {index} {id} {edit}>
-						{#snippet children({ onclick, selected })}
-							<Cardlet {name} {onclick} filter="tags" id={`${id}:`}>
+					<Selectable {index} {id} onclick={edit} onauxclick={quickFilter}>
+						{#snippet children({ onclick, onauxclick, selected })}
+							<Cardlet {name} {onclick} {onauxclick}>
 								{#snippet overlay()}
 									<SelectionOverlay position="right" centered {selected} />
 								{/snippet}
-- 
cgit v1.2.3-2-gb3c3

