From 08df04917074b4da6fffdfd7b9327e1151c62e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Fri, 3 Nov 2023 18:57:22 +0100 Subject: [PATCH] feat: rudimentary filter in action selector Fixes #1 --- src/i18n/de/index.ts | 3 + src/i18n/en/index.ts | 3 + .../components/layout/ActionSelector.svelte | 61 ++++++++++++++++--- src/lib/serial/keymap-codes.ts | 16 +++-- 4 files changed, 66 insertions(+), 17 deletions(-) diff --git a/src/i18n/de/index.ts b/src/i18n/de/index.ts index 952b2a11..15cd610e 100644 --- a/src/i18n/de/index.ts +++ b/src/i18n/de/index.ts @@ -22,6 +22,9 @@ const de = { PLACEHOLDER: "Nach Aktionen suchen", CURRENT_ACTION: "Aktuelle Aktion", DELETE: "Entfernen", + filter: { + ALL: "Alle", + }, }, share: { URL_COPIED: "Teilbare URL kopiert!", diff --git a/src/i18n/en/index.ts b/src/i18n/en/index.ts index 052cc552..376ccdc5 100644 --- a/src/i18n/en/index.ts +++ b/src/i18n/en/index.ts @@ -21,6 +21,9 @@ const en = { PLACEHOLDER: "Search for actions", CURRENT_ACTION: "Current action", DELETE: "Remove", + filter: { + ALL: "All", + }, }, share: { URL_COPIED: "Sharable URL copied!", diff --git a/src/lib/components/layout/ActionSelector.svelte b/src/lib/components/layout/ActionSelector.svelte index 67c916a9..c49c8aa8 100644 --- a/src/lib/components/layout/ActionSelector.svelte +++ b/src/lib/components/layout/ActionSelector.svelte @@ -1,11 +1,12 @@ + dispatch("close")}>
{ if (event.key === "Enter") { @@ -94,6 +96,27 @@ on:click={() => dispatch("close")}>close
+
+ + {#each KEYMAP_CATEGORIES as category} + + {/each} +