feat(client): Plugin:register_note_post_interruptor API
This commit is contained in:
@@ -112,6 +112,7 @@ export default () => new Vuex.Store({
|
||||
userActions: [],
|
||||
noteActions: [],
|
||||
noteViewInterruptors: [],
|
||||
notePostInterruptors: [],
|
||||
},
|
||||
|
||||
getters: {
|
||||
@@ -283,6 +284,14 @@ export default () => new Vuex.Store({
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
registerNotePostInterruptor(state, { pluginId, handler }) {
|
||||
state.notePostInterruptors.push({
|
||||
handler: (note) => {
|
||||
return state.pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)]);
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
Reference in New Issue
Block a user