mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -07:00
Play sound on like
This commit is contained in:
parent
b8dcad8f8e
commit
7a4ac752d1
2 changed files with 4 additions and 0 deletions
|
@ -52,6 +52,8 @@ const props = defineProps<{
|
||||||
|
|
||||||
function star(ev?: MouseEvent): void {
|
function star(ev?: MouseEvent): void {
|
||||||
pleaseLogin();
|
pleaseLogin();
|
||||||
|
sound.play("reaction");
|
||||||
|
|
||||||
os.api("notes/reactions/create", {
|
os.api("notes/reactions/create", {
|
||||||
noteId: props.note.id,
|
noteId: props.note.id,
|
||||||
reaction:
|
reaction:
|
||||||
|
|
|
@ -64,6 +64,8 @@ function toggleStar(ev?: MouseEvent): void {
|
||||||
pleaseLogin();
|
pleaseLogin();
|
||||||
|
|
||||||
if (!props.reacted) {
|
if (!props.reacted) {
|
||||||
|
sound.play("reaction");
|
||||||
|
|
||||||
os.api("notes/reactions/create", {
|
os.api("notes/reactions/create", {
|
||||||
noteId: props.note.id,
|
noteId: props.note.id,
|
||||||
reaction: instance.defaultReaction,
|
reaction: instance.defaultReaction,
|
||||||
|
|
Loading…
Reference in a new issue