DEV: Switch to new addComposerToolbarPopupMenuOption plugin API (#25)
Why this change?
`api.addToolbarPopupMenuOptionsCallback` has been deprecated in 913fd3a7b3
This commit is contained in:
parent
3ca2000263
commit
344f4dd0ea
|
@ -1,2 +1,3 @@
|
||||||
|
< 3.2.0.beta2: 3ca2000263c8f99ebadca61ef62b3fa7e48e85ea
|
||||||
3.1.999: 322db3406e37b1bd146564ce48c7da28ebe7dd61
|
3.1.999: 322db3406e37b1bd146564ce48c7da28ebe7dd61
|
||||||
2.9.0.beta8: 1c4f5b1a99cfa610f13723bf0b3a5cf5c77e1ff4
|
2.9.0.beta8: 1c4f5b1a99cfa610f13723bf0b3a5cf5c77e1ff4
|
||||||
|
|
|
@ -292,25 +292,15 @@ export default {
|
||||||
{ onlyStream: true, id: "discourse-placeholder-theme-component" }
|
{ onlyStream: true, id: "discourse-placeholder-theme-component" }
|
||||||
);
|
);
|
||||||
|
|
||||||
api.addToolbarPopupMenuOptionsCallback(() => {
|
api.addComposerToolbarPopupMenuOption({
|
||||||
return {
|
label: themePrefix("toolbar.builder"),
|
||||||
action: "insertPlaceholder",
|
icon: "file",
|
||||||
icon: "file",
|
action: (toolbarEvent) => {
|
||||||
label: themePrefix("toolbar.builder"),
|
showModal("discourse-placeholder-builder", {
|
||||||
};
|
model: {
|
||||||
});
|
toolbarEvent,
|
||||||
|
},
|
||||||
api.modifyClass("controller:composer", {
|
});
|
||||||
pluginId: "discourse-placeholder-theme-component",
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
insertPlaceholder() {
|
|
||||||
showModal("discourse-placeholder-builder", {
|
|
||||||
model: {
|
|
||||||
toolbarEvent: this.toolbarEvent,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue