diff --git a/fe_calckey/frontend/client/package.json b/fe_calckey/frontend/client/package.json index 58fb895..86705e2 100644 --- a/fe_calckey/frontend/client/package.json +++ b/fe_calckey/frontend/client/package.json @@ -27,6 +27,7 @@ "@types/uuid": "8.3.4", "@vitejs/plugin-vue": "4.2.3", "@vue/compiler-sfc": "3.3.4", + "@vue/runtime-core": "3.3.4", "autobind-decorator": "2.4.0", "autosize": "5.0.2", "blurhash": "1.1.5", diff --git a/fe_calckey/frontend/client/src/components/MagNote.vue b/fe_calckey/frontend/client/src/components/MagNote.vue index 5c4791a..66c6c54 100644 --- a/fe_calckey/frontend/client/src/components/MagNote.vue +++ b/fe_calckey/frontend/client/src/components/MagNote.vue @@ -260,6 +260,8 @@ import { magHasReacted, magIsRenote, magReactionCount, + magReactionSelf, + magReactionToLegacy, } from "@/scripts-mag/mag-util"; const router = useRouter(); @@ -353,7 +355,7 @@ function react(viaKeyboard = false): void { (reaction) => { os.api("notes/reactions/create", { noteId: appearNote.id, - reaction: reaction, + reaction: magReactionToLegacy(reaction), }); }, () => { @@ -362,8 +364,8 @@ function react(viaKeyboard = false): void { ); } -function undoReact(note): void { - const oldReaction = note.myReaction; +function undoReact(note: packed.PackNoteMaybeFull): void { + const oldReaction = magReactionSelf(note); if (!oldReaction) return; os.api("notes/reactions/delete", { noteId: note.id, diff --git a/fe_calckey/frontend/client/src/components/MagNoteDetailed.vue b/fe_calckey/frontend/client/src/components/MagNoteDetailed.vue index d16f097..95829b2 100644 --- a/fe_calckey/frontend/client/src/components/MagNoteDetailed.vue +++ b/fe_calckey/frontend/client/src/components/MagNoteDetailed.vue @@ -170,7 +170,11 @@ import { useNoteCapture } from "@/scripts/use-note-capture"; import { stream } from "@/stream"; import { NoteUpdatedEvent } from "calckey-js/built/streaming.types"; import { packed } from "magnetar-common"; -import { magIsRenote, magReactionCount } from "@/scripts-mag/mag-util"; +import { + magIsRenote, + magReactionCount, + magReactionToLegacy, +} from "@/scripts-mag/mag-util"; import MagNote from "@/components/MagNote.vue"; const props = defineProps<{ @@ -254,7 +258,7 @@ function react(viaKeyboard = false): void { (reaction) => { os.api("notes/reactions/create", { noteId: note.id, - reaction: reaction, + reaction: magReactionToLegacy(reaction), }); }, () => { diff --git a/fe_calckey/frontend/client/src/components/MkEmojiPicker.section.vue b/fe_calckey/frontend/client/src/components/MkEmojiPicker.section.vue index 30cb6d7..057cbe3 100644 --- a/fe_calckey/frontend/client/src/components/MkEmojiPicker.section.vue +++ b/fe_calckey/frontend/client/src/components/MkEmojiPicker.section.vue @@ -34,16 +34,19 @@ class="_button item" @click="emit('chosen', emoji, $event)" > - + diff --git a/fe_calckey/frontend/client/src/components/MkEmojiPicker.vue b/fe_calckey/frontend/client/src/components/MkEmojiPicker.vue index ae172d5..db2f93d 100644 --- a/fe_calckey/frontend/client/src/components/MkEmojiPicker.vue +++ b/fe_calckey/frontend/client/src/components/MkEmojiPicker.vue @@ -26,9 +26,9 @@ class="_button item" :title="emoji.name" tabindex="0" - @click="chosen(emoji, $event)" + @click="chosen(magCustomEmoji(emoji), $event)" > - + - + @@ -57,13 +57,13 @@
@@ -273,7 +269,6 @@ diff --git a/fe_calckey/frontend/client/src/components/MkReactionTooltip.vue b/fe_calckey/frontend/client/src/components/MkReactionTooltip.vue index 4a95b5d..70ac6e3 100644 --- a/fe_calckey/frontend/client/src/components/MkReactionTooltip.vue +++ b/fe_calckey/frontend/client/src/components/MkReactionTooltip.vue @@ -6,13 +6,17 @@ @closed="emit('closed')" >
- -
{{ reaction.replace("@.", "") }}
+
{{ magReactionToLegacy(reaction) }}
@@ -20,11 +24,11 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkEmoji.vue b/fe_calckey/frontend/client/src/components/global/MagEmoji.vue similarity index 59% rename from fe_calckey/frontend/client/src/components/global/MkEmoji.vue rename to fe_calckey/frontend/client/src/components/global/MagEmoji.vue index 352e1ac..9a3536f 100644 --- a/fe_calckey/frontend/client/src/components/global/MkEmoji.vue +++ b/fe_calckey/frontend/client/src/components/global/MagEmoji.vue @@ -1,6 +1,6 @@