diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-03-09 21:23:36 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-03-09 21:23:36 +0900 |
| commit | 0402866b4378e014943cb03031953e07bd082a35 (patch) | |
| tree | 54ae6bcd9d50b1746da2f8b345b7e51f96edc28b /packages/frontend/src/components/MkPostForm.vue | |
| parent | chore(frontend): remove unused binding (diff) | |
| download | sharkey-0402866b4378e014943cb03031953e07bd082a35.tar.gz sharkey-0402866b4378e014943cb03031953e07bd082a35.tar.bz2 sharkey-0402866b4378e014943cb03031953e07bd082a35.zip | |
enhance(frontend): improve plugin management
Diffstat (limited to 'packages/frontend/src/components/MkPostForm.vue')
| -rw-r--r-- | packages/frontend/src/components/MkPostForm.vue | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index 4edb147b86..755e13279c 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -136,7 +136,7 @@ import { claimAchievement } from '@/utility/achievements.js'; import { emojiPicker } from '@/utility/emoji-picker.js'; import { mfmFunctionPicker } from '@/utility/mfm-function-picker.js'; import { prefer } from '@/preferences.js'; -import { notePostInterruptors, postFormActions } from '@/plugin.js'; +import { getPluginHandlers } from '@/plugin.js'; const $i = signinRequired(); @@ -197,6 +197,7 @@ const showingOptions = ref(false); const textAreaReadOnly = ref(false); const justEndedComposition = ref(false); const renoteTargetNote: ShallowRef<PostFormProps['renote'] | null> = shallowRef(props.renote); +const postFormActions = getPluginHandlers('post_form_action'); const draftKey = computed((): string => { let key = props.channel ? `channel:${props.channel.id}` : ''; @@ -823,6 +824,7 @@ async function post(ev?: MouseEvent) { } // plugin + const notePostInterruptors = getPluginHandlers('note_post_interruptor'); if (notePostInterruptors.length > 0) { for (const interruptor of notePostInterruptors) { try { |