enhance(frontend): improve plugin management

This commit is contained in:
syuilo
2025-03-09 21:23:36 +09:00
parent 6cefabc6b6
commit 0402866b43
8 changed files with 131 additions and 144 deletions

View File

@@ -222,7 +222,7 @@ import { isEnabledUrlPreview } from '@/instance.js';
import { focusPrev, focusNext } from '@/utility/focus.js';
import { getAppearNote } from '@/utility/get-appear-note.js';
import { prefer } from '@/preferences.js';
import { noteViewInterruptors } from '@/plugin.js';
import { getPluginHandlers } from '@/plugin.js';
const props = withDefaults(defineProps<{
note: Misskey.entities.Note;
@@ -248,6 +248,7 @@ const currentClip = inject<Ref<Misskey.entities.Clip> | null>('currentClip', nul
const note = ref(deepClone(props.note));
// plugin
const noteViewInterruptors = getPluginHandlers('note_view_interruptor');
if (noteViewInterruptors.length > 0) {
onMounted(async () => {
let result: Misskey.entities.Note | null = deepClone(note.value);