web/SmallDialog: add error haptics to error popups

This commit is contained in:
wukko
2025-03-05 22:19:08 +06:00
parent a2e08b9ccb
commit 7e71701e10
2 changed files with 14 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
<script lang="ts">
import { hapticError } from "$lib/haptics";
import type { Optional } from "$lib/types/generic";
import type { MeowbaltEmotions } from "$lib/types/meowbalt";
import type { DialogButton, SmallDialogIcons } from "$lib/types/dialog";
@@ -21,6 +22,11 @@
export let leftAligned = false;
let close: () => void;
// error meowbalt art is not used in dialogs unless it's an error
if (meowbalt === "error") {
hapticError();
}
</script>
<DialogContainer {id} {dismissable} bind:close>