feat(client): AiScript: ノート書き換えAPI

This commit is contained in:
syuilo
2020-07-29 01:15:02 +09:00
parent 595ad04ddb
commit 30df8ea121
5 changed files with 30 additions and 8 deletions

View File

@@ -111,6 +111,7 @@ export default () => new Vuex.Store({
postFormActions: [],
userActions: [],
noteActions: [],
noteViewInterruptors: [],
},
getters: {
@@ -274,6 +275,14 @@ export default () => new Vuex.Store({
}
});
},
registerNoteViewInterruptor(state, { pluginId, handler }) {
state.noteViewInterruptors.push({
handler: (note) => {
return state.pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)]);
}
});
},
},
actions: {