summaryrefslogtreecommitdiff
path: root/packages/client/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'packages/client/src/components')
-rw-r--r--packages/client/src/components/note.vue15
1 files changed, 13 insertions, 2 deletions
diff --git a/packages/client/src/components/note.vue b/packages/client/src/components/note.vue
index 93286a28b2..3cd7a819d4 100644
--- a/packages/client/src/components/note.vue
+++ b/packages/client/src/components/note.vue
@@ -138,7 +138,18 @@ const props = defineProps<{
const inChannel = inject('inChannel', null);
-const note = $ref(JSON.parse(JSON.stringify(props.note)));
+let note = $ref(JSON.parse(JSON.stringify(props.note)));
+
+// plugin
+if (noteViewInterruptors.length > 0) {
+ onMounted(async () => {
+ let result = JSON.parse(JSON.stringify(note));
+ for (const interruptor of noteViewInterruptors) {
+ result = await interruptor.handler(result);
+ }
+ note = result;
+ });
+}
const isRenote = (
note.renote != null &&
@@ -152,7 +163,7 @@ const menuButton = ref<HTMLElement>();
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
const renoteTime = ref<HTMLElement>();
const reactButton = ref<HTMLElement>();
-let appearNote = $ref(isRenote ? note.renote as misskey.entities.Note : note);
+let appearNote = $computed(() => isRenote ? note.renote as misskey.entities.Note : note);
const isMyRenote = $i && ($i.id === note.userId);
const showContent = ref(false);
const collapsed = ref(appearNote.cw == null && appearNote.text != null && (