DEV: allows to prepend widgets to post nav controls (#10005)
Co-authored-by: Régis Hanol <regis@hanol.fr>
This commit is contained in:
parent
23ed16339f
commit
a3cf1cf6ff
|
@ -552,8 +552,17 @@ export default createWidget("post-menu", {
|
||||||
postControls.push(repliesButton);
|
postControls.push(repliesButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
let extraControls = applyDecorators(this, "extra-controls", attrs, state);
|
const extraControls = applyDecorators(this, "extra-controls", attrs, state);
|
||||||
postControls.push(h("div.actions", visibleButtons.concat(extraControls)));
|
const beforeExtraControls = applyDecorators(
|
||||||
|
this,
|
||||||
|
"before-extra-controls",
|
||||||
|
attrs,
|
||||||
|
state
|
||||||
|
);
|
||||||
|
|
||||||
|
const controlsButtons = [...beforeExtraControls, ...visibleButtons, ...extraControls];
|
||||||
|
|
||||||
|
postControls.push(h("div.actions", controlsButtons));
|
||||||
if (state.adminVisible) {
|
if (state.adminVisible) {
|
||||||
postControls.push(this.attach("post-admin-menu", attrs));
|
postControls.push(this.attach("post-admin-menu", attrs));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue