summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkNoteSub.vue
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-11-16 00:22:12 +0100
committerMar0xy <marie@kaifa.ch>2023-11-16 00:22:12 +0100
commit490b249407e1a89b23b0afc274daed1cffb89a59 (patch)
tree69b3848c69bfae20e885d990ab1d6743a8901644 /packages/frontend/src/components/MkNoteSub.vue
parentupd: add option to disable server disconnect warning (diff)
downloadsharkey-490b249407e1a89b23b0afc274daed1cffb89a59.tar.gz
sharkey-490b249407e1a89b23b0afc274daed1cffb89a59.tar.bz2
sharkey-490b249407e1a89b23b0afc274daed1cffb89a59.zip
upd: Allow users to change default like emoji
When users change the default like emoji in reactions tab from heart to another one it will be send out as that specific emoji. If reset back to heart it will default to the instance like emoji again which is heart by default. Closes transfem-org/Sharkey#95
Diffstat (limited to 'packages/frontend/src/components/MkNoteSub.vue')
-rw-r--r--packages/frontend/src/components/MkNoteSub.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/frontend/src/components/MkNoteSub.vue b/packages/frontend/src/components/MkNoteSub.vue
index 7b8d744d6a..85d1203831 100644
--- a/packages/frontend/src/components/MkNoteSub.vue
+++ b/packages/frontend/src/components/MkNoteSub.vue
@@ -134,6 +134,7 @@ const menuButton = shallowRef<HTMLElement>();
const likeButton = shallowRef<HTMLElement>();
let appearNote = $computed(() => isRenote ? props.note.renote as Misskey.entities.Note : props.note);
+const defaultLike = computed(() => defaultStore.state.like !== '❤️' ? defaultStore.state.like : props.meta.defaultLike);
const isRenote = (
props.note.renote != null &&
@@ -189,7 +190,7 @@ function react(viaKeyboard = false): void {
if (props.note.reactionAcceptance === 'likeOnly') {
os.api('notes/reactions/create', {
noteId: props.note.id,
- reaction: props.meta.defaultLike,
+ reaction: defaultLike.value,
});
const el = reactButton.value as HTMLElement | null | undefined;
if (el) {
@@ -219,7 +220,7 @@ function like(): void {
showMovedDialog();
os.api('notes/reactions/create', {
noteId: props.note.id,
- reaction: props.meta.defaultLike,
+ reaction: defaultLike.value,
});
const el = reactButton.value as HTMLElement | null | undefined;
if (el) {