feat: add donation dialog, close #524 (#597)

* feat: add donation dialog, close #524

* fix: command palette broken
This commit is contained in:
Xylight authored and GitHub committed 2025-06-25 23:50:08 +00:00
1 parent 58d5be7027
commit f1f3955a7b
12 files changed
+134 -60

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
<script lang="ts">
import { navigating } from '$app/state'
import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
import { t } from '$lib/i18n/translations'
import { Button, TextInput } from 'mono-svelte'
import { Icon, MagnifyingGlass } from 'svelte-hero-icons'
interface Props {
query?: string | null
}
let { query = $bindable() }: Props = $props()
let searchElement = $state<HTMLInputElement>()
</script>
<div class="mt-4 mb-0 sticky z-30 top-6 lg:top-22">
<Tabs routes={[]} class="p-2 dark:bg-zinc-925/70">
<div class="flex gap-2 flex-row items-center w-full text-base h-10">
<TextInput
bind:value={query}
bind:element={searchElement}
name="q"
aria-label={$t('routes.search.query')}
size="lg"
class="flex-1 rounded-full! h-full text-base!"
/>
<Button
submit
color="primary"
size="custom"
class="shrink-0 h-full aspect-square"
title="Search"
rounding="pill"
loading={navigating.to?.route.id == '/search'}
>
{#snippet prefix()}
<Icon src={MagnifyingGlass} size="16" micro />
{/snippet}
</Button>
</div>
</Tabs>
</div>