enhance(frontend): improve plugin management
This commit is contained in:
parent
6cefabc6b6
commit
0402866b43
8 changed files with 131 additions and 144 deletions
|
|
@ -254,7 +254,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||
import { isEnabledUrlPreview } from '@/instance.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;
|
||||
|
|
@ -268,6 +268,7 @@ const inChannel = inject('inChannel', null);
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue