@@ -331,6 +332,7 @@ const replies = ref([]);
const quotes = ref([]);
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
+const mutedReactions = ref(defaultStore.state.mutedReactions);
watch(() => props.expandAllCws, (expandAllCws) => {
if (expandAllCws !== showContent.value) showContent.value = expandAllCws;
@@ -736,6 +738,16 @@ async function clip(): Promise {
os.popupMenu(await getNoteClipMenu({ note: note.value, isDeleted }), clipButton.value).then(focus);
}
+async function reactionMuteToggle(emojiName: string) {
+ if (!mutedReactions.value.includes(emojiName)) {
+ mutedReactions.value.push(emojiName);
+ defaultStore.set('mutedReactions', mutedReactions.value);
+ } else {
+ mutedReactions.value = mutedReactions.value.filter(x => x !== emojiName);
+ defaultStore.set('mutedReactions', mutedReactions.value);
+ }
+}
+
function showRenoteMenu(): void {
if (!isMyRenote) return;
pleaseLogin(undefined, pleaseLoginContext.value);
@@ -1089,6 +1101,10 @@ function animatedMFM() {
margin-bottom: 8px;
}
+.reactionMuteButton {
+ margin-bottom: 8px;
+}
+
.reactionTab {
padding: 4px 6px;
border: solid 1px var(--divider);
diff --git a/packages/frontend/src/components/SkNoteDetailed.vue b/packages/frontend/src/components/SkNoteDetailed.vue
index cca6c7a40c..ca433a6e6f 100755
--- a/packages/frontend/src/components/SkNoteDetailed.vue
+++ b/packages/frontend/src/components/SkNoteDetailed.vue
@@ -208,6 +208,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ appearNote.reactions[reaction] }}
+ {{ !mutedReactions.includes(reactionTabType) ? i18n.ts.muteThisReaction : i18n.ts.unmuteThisReaction }}
@@ -339,6 +340,7 @@ const replies = ref([]);
const quotes = ref([]);
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
+const mutedReactions = ref(defaultStore.state.mutedReactions);
watch(() => props.expandAllCws, (expandAllCws) => {
if (expandAllCws !== showContent.value) showContent.value = expandAllCws;
@@ -744,6 +746,16 @@ async function clip(): Promise {
os.popupMenu(await getNoteClipMenu({ note: note.value, isDeleted }), clipButton.value).then(focus);
}
+async function reactionMuteToggle(emojiName: string) {
+ if (!mutedReactions.value.includes(emojiName)) {
+ mutedReactions.value.push(emojiName);
+ defaultStore.set('mutedReactions', mutedReactions.value);
+ } else {
+ mutedReactions.value = mutedReactions.value.filter(x => x !== emojiName);
+ defaultStore.set('mutedReactions', mutedReactions.value);
+ }
+}
+
function showRenoteMenu(): void {
if (!isMyRenote) return;
pleaseLogin(undefined, pleaseLoginContext.value);
@@ -1156,6 +1168,10 @@ onUnmounted(() => {
margin-bottom: 8px;
}
+.reactionMuteButton {
+ margin-bottom: 8px;
+}
+
.reactionTab {
padding: 4px 6px;
border: solid 1px var(--divider);