feat: haptics

This commit is contained in:
trev 2025-03-19 05:55:54 -04:00
parent 50ed3f5606
commit aec0db221f

View File

@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
import Button from '$lib/components/ui/button/button.svelte'; import Button from '$lib/components/ui/button/button.svelte';
import ScanCapture from '$lib/ScanCapture.svelte'; import ScanCapture from '$lib/ScanCapture.svelte';
import { Haptics, ImpactStyle } from '@capacitor/haptics';
import { SvelteSet } from 'svelte/reactivity'; import { SvelteSet } from 'svelte/reactivity';
import { fade } from 'svelte/transition'; import { fade } from 'svelte/transition';
@ -10,6 +11,7 @@
function onscan(value: string) { function onscan(value: string) {
if (!list.has(value)) { if (!list.has(value)) {
list.add(value); list.add(value);
Haptics.impact({ style: ImpactStyle.Light });
} }
} }
</script> </script>