feat: haptics
This commit is contained in:
parent
50ed3f5606
commit
aec0db221f
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user