mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-09 11:41:30 -07:00
I forgot to add the dependency ಠ_ಠ
This commit is contained in:
parent
d29b7e794c
commit
a380686ba3
2 changed files with 4 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -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<HTMLElement>();
|
|||
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", {
|
||||
|
|
Loading…
Reference in a new issue