summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/lib/components
diff options
context:
space:
mode:
authorWolfgang Müller2025-02-13 19:04:12 +0100
committerWolfgang Müller2025-02-13 19:04:12 +0100
commit618f72b31d57ac17f475dbe983a31627cff3b96e (patch)
tree21cc384917ad64fe726d6356d3616df4b7507927 /frontend/src/lib/components
parent341fc19d4b7e9d8fb8b9a9d72377cf36565f2f2e (diff)
downloadhircine-618f72b31d57ac17f475dbe983a31627cff3b96e.tar.gz
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).
Diffstat (limited to 'frontend/src/lib/components')
-rw-r--r--frontend/src/lib/components/Cardlet.svelte19
1 files changed, 2 insertions, 17 deletions
diff --git a/frontend/src/lib/components/Cardlet.svelte b/frontend/src/lib/components/Cardlet.svelte
index d249cc8..d0c0509 100644
--- a/frontend/src/lib/components/Cardlet.svelte
+++ b/frontend/src/lib/components/Cardlet.svelte
@@ -1,30 +1,15 @@
<script lang="ts">
- import type { ComicFilter } from '$gql/graphql';
- import { href } from '$lib/Navigation';
import type { Snippet } from 'svelte';
interface Props {
name: string;
title?: string | null;
- filter?: keyof ComicFilter;
- id?: number | string;
overlay?: Snippet;
onclick: (event: MouseEvent) => void;
+ onauxclick?: (event: MouseEvent) => void;
}
- let {
- name,
- title = undefined,
- filter = undefined,
- id = undefined,
- overlay,
- onclick
- }: Props = $props();
-
- const onauxclick = (e: MouseEvent) => {
- if (filter === undefined || id === undefined || e.button !== 1) return;
- window.open(href('comics', { filter: { include: { [filter]: { all: [id] } } } }));
- };
+ let { name, title = undefined, overlay, onclick, onauxclick = undefined }: Props = $props();
</script>
<button