add: better search and better delete locking mechanism

This commit is contained in:
rasmusq
2025-11-25 22:14:27 +01:00
parent ad3634cf98
commit 62ff4826c1
6 changed files with 138 additions and 63 deletions
+31
View File
@@ -0,0 +1,31 @@
<script lang="ts">
import { Button } from '$lib/components/ui/button';
import { Lock, LockOpen } from 'lucide-svelte';
import { languageStore } from '$lib/stores/language.svelte';
let {
unlocked = $bindable(false)
}: {
unlocked: boolean;
} = $props();
const t = $derived(languageStore.t);
function handleClick() {
unlocked = !unlocked;
}
</script>
<Button
onclick={handleClick}
variant={unlocked ? "default" : "outline"}
class="w-full md:w-auto"
>
{#if unlocked}
<Lock class="mr-2 h-4 w-4" />
{t.wishlist.lockEditing}
{:else}
<LockOpen class="mr-2 h-4 w-4" />
{t.wishlist.unlockEditing}
{/if}
</Button>