summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/routes/worlds
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/routes/worlds
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/routes/worlds')
-rw-r--r--frontend/src/routes/worlds/+page.svelte9
1 files changed, 6 insertions, 3 deletions
diff --git a/frontend/src/routes/worlds/+page.svelte b/frontend/src/routes/worlds/+page.svelte
index f223a61..6b95142 100644
--- a/frontend/src/routes/worlds/+page.svelte
+++ b/frontend/src/routes/worlds/+page.svelte
@@ -4,6 +4,7 @@
import type { World } from '$gql/graphql';
import { WorldSortLabel } 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((world) => modals.open(EditWorld, { world }))
.catch(toastFinally);
};
+
+ const quickFilter = (id: number) => quickComicFilter(id, 'worlds');
</script>
<Head section="worlds" />
@@ -78,9 +81,9 @@
<main>
<Cardlets>
{#each worlds.edges as { id, name }, index (id)}
- <Selectable {index} {id} {edit}>
- {#snippet children({ onclick, selected })}
- <Cardlet {name} {onclick} filter="worlds" {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}