From 0daa3a1e73268d3bf95d8ea29699f7c97c83bba7 Mon Sep 17 00:00:00 2001 From: Vilsol Date: Sat, 30 Dec 2023 02:31:57 +0200 Subject: [PATCH] feat: tag dropdown --- src/gql/home/tags.graphql | 4 +- src/lib/components/mods/ModGrid.svelte | 87 ++++++++++++++--------- src/routes/admin/tag-manager/+page.svelte | 4 +- 3 files changed, 58 insertions(+), 37 deletions(-) diff --git a/src/gql/home/tags.graphql b/src/gql/home/tags.graphql index e83b032a8..b17598f4c 100644 --- a/src/gql/home/tags.graphql +++ b/src/gql/home/tags.graphql @@ -1,5 +1,5 @@ -query GetTags { - getTags { +query GetTags($limit: Int) { + getTags(filter: { limit: $limit }) { id name } diff --git a/src/lib/components/mods/ModGrid.svelte b/src/lib/components/mods/ModGrid.svelte index 840d91152..a707071af 100644 --- a/src/lib/components/mods/ModGrid.svelte +++ b/src/lib/components/mods/ModGrid.svelte @@ -1,6 +1,6 @@ -
- {#if newMod && $user !== null} - {$t('mods.new')} - {/if} + const sortedTags = (tags: Tag[]): Tag[] => tags.toSorted((a, b) => a.name.localeCompare(b.name)); + + let tagsOpen = false; + +
{#if showSearch}
-
-
+
+
+ +
+
-
+