summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/routes/namespaces/+page.svelte
diff options
context:
space:
mode:
authorWolfgang Müller2025-02-20 15:24:42 +0100
committerWolfgang Müller2025-02-20 19:51:39 +0100
commit8e9aa5f6286a15c818a47344fc80964f5288bb52 (patch)
treeb3ef187daff345eeb918ab07900cc1c4185c53e4 /frontend/src/routes/namespaces/+page.svelte
parentc6bf35aea63969b90463d6e70cb02ed61e4e3270 (diff)
downloadhircine-8e9aa5f6286a15c818a47344fc80964f5288bb52.tar.gz
frontend: Allow filtering for orphaned associations
With the association count filters in place we may now also allow the user to filter for associations that do not have a matching counterparts (artists without a comic, for example).
Diffstat (limited to 'frontend/src/routes/namespaces/+page.svelte')
-rw-r--r--frontend/src/routes/namespaces/+page.svelte8
1 files changed, 5 insertions, 3 deletions
diff --git a/frontend/src/routes/namespaces/+page.svelte b/frontend/src/routes/namespaces/+page.svelte
index d8e728d..429432f 100644
--- a/frontend/src/routes/namespaces/+page.svelte
+++ b/frontend/src/routes/namespaces/+page.svelte
@@ -3,7 +3,7 @@
import { fetchNamespace, namespacesQuery } from '$gql/Queries';
import type { Namespace } from '$gql/graphql';
import { NamespaceSortLabel } from '$lib/Enums';
- import { BasicFilterContext } from '$lib/Filter.svelte';
+ import { NamespaceFilterContext } from '$lib/Filter.svelte';
import { quickComicFilter } from '$lib/Navigation';
import { toastFinally } from '$lib/Toasts';
import AddButton from '$lib/components/AddButton.svelte';
@@ -20,6 +20,7 @@
import { initSelectionContext } from '$lib/selection/Selection.svelte';
import SelectionOverlay from '$lib/selection/SelectionOverlay.svelte';
import DeleteSelection from '$lib/toolbar/DeleteSelection.svelte';
+ import FilterOrphaned from '$lib/toolbar/FilterOrphaned.svelte';
import Search from '$lib/toolbar/Search.svelte';
import SelectItems from '$lib/toolbar/SelectItems.svelte';
import SelectSort from '$lib/toolbar/SelectSort.svelte';
@@ -44,9 +45,9 @@
}
});
- let filter = $state(new BasicFilterContext(data.filter));
+ let filter = $state(new NamespaceFilterContext(data.filter));
$effect(() => {
- filter = new BasicFilterContext(data.filter);
+ filter = new NamespaceFilterContext(data.filter);
});
const edit = (id: number) => {
@@ -69,6 +70,7 @@
{/snippet}
{#snippet center()}
<Search name="Namespaces" {filter} bind:field={filter.include.name.contains} />
+ <FilterOrphaned {filter} />
<SelectSort {sort} labels={NamespaceSortLabel} />
<SelectItems {pagination} />
{/snippet}