From a380686ba3e016b5df0550611a37fcfcb527d832 Mon Sep 17 00:00:00 2001 From: limepotato Date: Sun, 14 Jul 2024 07:23:28 -0600 Subject: [PATCH] =?UTF-8?q?I=20forgot=20to=20add=20the=20dependency=20?= =?UTF-8?q?=E0=B2=A0=5F=E0=B2=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/components/MkStarButton.vue | 2 ++ packages/client/src/components/MkStarButtonNoEmoji.vue | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/MkStarButton.vue b/packages/client/src/components/MkStarButton.vue index 08edb03d9..9c367df4e 100644 --- a/packages/client/src/components/MkStarButton.vue +++ b/packages/client/src/components/MkStarButton.vue @@ -45,6 +45,7 @@ import * as os from "@/os"; import { defaultStore } from "@/store"; import { i18n } from "@/i18n"; import { instance } from "@/instance"; +import * as sound from "@/scripts/sound.js"; const props = defineProps<{ note: Note; @@ -52,6 +53,7 @@ const props = defineProps<{ function star(ev?: MouseEvent): void { pleaseLogin(); + sound.play("reaction"); os.api("notes/reactions/create", { noteId: props.note.id, reaction: diff --git a/packages/client/src/components/MkStarButtonNoEmoji.vue b/packages/client/src/components/MkStarButtonNoEmoji.vue index 727e65ef8..e8f671df5 100644 --- a/packages/client/src/components/MkStarButtonNoEmoji.vue +++ b/packages/client/src/components/MkStarButtonNoEmoji.vue @@ -51,6 +51,7 @@ import { defaultStore } from "@/store"; import { i18n } from "@/i18n"; import { instance } from "@/instance"; import { useTooltip } from "@/scripts/use-tooltip"; +import * as sound from "@/scripts/sound.js"; const props = defineProps<{ note: Note; @@ -63,6 +64,7 @@ const buttonRef = ref(); function toggleStar(ev?: MouseEvent): void { pleaseLogin(); if (!props.reacted) { + sound.play("reaction"); os.api("notes/reactions/create", { noteId: props.note.id, reaction: instance.defaultReaction, @@ -75,7 +77,6 @@ function toggleStar(ev?: MouseEvent): void { const x = rect.left + el.offsetWidth / 2; const y = rect.top + el.offsetHeight / 2; os.popup(Ripple, { x, y }, {}, "end"); - sound.play("reaction"); } } else { os.api("notes/reactions/delete", {