diff --git a/src/routes/wishlist/+page.svelte b/src/routes/wishlist/+page.svelte index 93a7fe9..3562e78 100644 --- a/src/routes/wishlist/+page.svelte +++ b/src/routes/wishlist/+page.svelte @@ -6,6 +6,12 @@ import { alertAction, confirmAction } from '$lib/client/confirm.svelte'; import type { WishlistEntry, SortKey } from '$lib/server/wishlist/repository'; + const SORT_OPTIONS: { value: SortKey; label: string }[] = [ + { value: 'popular', label: 'Beliebteste' }, + { value: 'newest', label: 'Neueste' }, + { value: 'oldest', label: 'Älteste' } + ]; + let entries = $state([]); let loading = $state(true); let sort = $state('popular'); @@ -80,15 +86,19 @@

Das wollen wir bald mal essen.

-
- +
+ {#each SORT_OPTIONS as s (s.value)} + + {/each}
{#if loading} @@ -162,24 +172,32 @@ margin: 0.2rem 0 0; color: #666; } - .controls { + .sort-chips { display: flex; - justify-content: flex-end; - padding: 0.5rem 0 1rem; + flex-wrap: wrap; + gap: 0.35rem; + margin: 0.5rem 0 1rem; } - .controls label { - display: inline-flex; - gap: 0.5rem; - align-items: center; - font-size: 0.9rem; - color: #555; - } - .controls select { - padding: 0.5rem 0.75rem; - border: 1px solid #cfd9d1; - border-radius: 10px; - min-height: 40px; + .chip { + padding: 0.4rem 0.85rem; background: white; + border: 1px solid #cfd9d1; + border-radius: 999px; + color: #2b6a3d; + font-size: 0.88rem; + cursor: pointer; + min-height: 36px; + font-family: inherit; + white-space: nowrap; + } + .chip:hover { + background: #f4f8f5; + } + .chip.active { + background: #2b6a3d; + color: white; + border-color: #2b6a3d; + font-weight: 600; } .muted { color: #888;