From 53259bdcc02a80a4d0aa9dc7d71e53e7fc518c04 Mon Sep 17 00:00:00 2001 From: Sam Chau Date: Thu, 29 Jan 2026 02:49:02 +1030 Subject: [PATCH] style: modal'd search action on mobile --- src/lib/client/ui/actions/ActionsBar.svelte | 2 +- src/lib/client/ui/actions/SearchAction.svelte | 245 ++++++++++++++---- .../custom-formats/[databaseId]/+page.svelte | 2 +- .../entity-testing/[databaseId]/+page.svelte | 2 +- 4 files changed, 198 insertions(+), 53 deletions(-) diff --git a/src/lib/client/ui/actions/ActionsBar.svelte b/src/lib/client/ui/actions/ActionsBar.svelte index bbc37fc..8371178 100644 --- a/src/lib/client/ui/actions/ActionsBar.svelte +++ b/src/lib/client/ui/actions/ActionsBar.svelte @@ -2,7 +2,7 @@ export let className: string = ''; -
+
diff --git a/src/lib/client/ui/actions/SearchAction.svelte b/src/lib/client/ui/actions/SearchAction.svelte index abb9665..02982eb 100644 --- a/src/lib/client/ui/actions/SearchAction.svelte +++ b/src/lib/client/ui/actions/SearchAction.svelte @@ -1,5 +1,7 @@ -
-
- -
- -
- - - {#if activeQuery} -
- {activeQuery} -
- {/if} - - - (isFocused = true)} - on:blur={() => (isFocused = false)} - placeholder={activeQuery ? '' : placeholder} - class="h-full w-full bg-transparent pr-10 text-base sm:text-sm text-neutral-900 placeholder-neutral-500 outline-none dark:text-neutral-100 dark:placeholder-neutral-400 {activeQuery - ? 'pl-2' - : 'pl-10'}" - /> - - - {#if query} - - {:else if activeQuery} - - {/if} +{#if useMobileMode} + +
+
-
+ + + {#if modalOpen} + +
+
+
+ +
+ +
+ + + {#if activeQuery} +
+ {activeQuery} +
+ {/if} + + + + + + {#if query} + + {:else if activeQuery} + + {:else} + + {/if} +
+
+
+ {/if} +{:else} + +
+
+ +
+ +
+ + + {#if activeQuery} +
+ {activeQuery} +
+ {/if} + + + (isFocused = true)} + on:blur={() => (isFocused = false)} + placeholder={activeQuery ? '' : placeholder} + class="h-full w-full bg-transparent pr-10 text-base sm:text-sm text-neutral-900 placeholder-neutral-500 outline-none dark:text-neutral-100 dark:placeholder-neutral-400 {activeQuery + ? 'pl-2' + : 'pl-10'}" + /> + + + {#if query} + + {:else if activeQuery} + + {/if} +
+
+{/if} diff --git a/src/routes/custom-formats/[databaseId]/+page.svelte b/src/routes/custom-formats/[databaseId]/+page.svelte index 48d23df..3afa1ba 100644 --- a/src/routes/custom-formats/[databaseId]/+page.svelte +++ b/src/routes/custom-formats/[databaseId]/+page.svelte @@ -110,7 +110,7 @@ - + goto(`/custom-formats/${data.currentDatabase.id}/new`)} diff --git a/src/routes/quality-profiles/entity-testing/[databaseId]/+page.svelte b/src/routes/quality-profiles/entity-testing/[databaseId]/+page.svelte index 13cfa4f..f93688c 100644 --- a/src/routes/quality-profiles/entity-testing/[databaseId]/+page.svelte +++ b/src/routes/quality-profiles/entity-testing/[databaseId]/+page.svelte @@ -372,7 +372,7 @@ - + (showAddModal = true)} />