mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: Support for extra admin links in the hamburger
This commit is contained in:
parent
83c092af64
commit
43bbc425e8
1 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
import { createWidget } from 'discourse/widgets/widget';
|
||||
import { createWidget, applyDecorators } from 'discourse/widgets/widget';
|
||||
import { h } from 'virtual-dom';
|
||||
|
||||
export default createWidget('hamburger-menu', {
|
||||
|
@ -141,7 +141,10 @@ export default createWidget('hamburger-menu', {
|
|||
}
|
||||
|
||||
if (currentUser && currentUser.staff) {
|
||||
results.push(this.attach('menu-links', { contents: () => this.adminLinks() }));
|
||||
results.push(this.attach('menu-links', { contents: () => {
|
||||
const extraLinks = applyDecorators(this, 'admin-links', this.attrs, this.state) || [];
|
||||
return this.adminLinks().concat(extraLinks);
|
||||
}}));
|
||||
}
|
||||
|
||||
results.push(this.attach('menu-links', { contents: () => this.generalLinks() }));
|
||||
|
|
Loading…
Reference in a new issue