Allow plugins to add panels to header more easily
This commit is contained in:
parent
19ad1e2c2e
commit
d073f582eb
|
@ -214,6 +214,8 @@ export default createWidget('header', {
|
|||
panels.push(this.attach('user-menu'));
|
||||
}
|
||||
|
||||
this.additionalPanels(attrs, state).map(function(panel) { panels.push(panel) })
|
||||
|
||||
const contents = [ this.attach('home-logo', { minimized: !!attrs.topic }),
|
||||
h('div.panel.clearfix', panels) ];
|
||||
|
||||
|
@ -224,6 +226,11 @@ export default createWidget('header', {
|
|||
return h('div.wrap', h('div.contents.clearfix', contents));
|
||||
},
|
||||
|
||||
// override to allow plugins to append additional panels
|
||||
additionalPanels(attrs, state) {
|
||||
return []
|
||||
},
|
||||
|
||||
updateHighlight() {
|
||||
if (!this.state.searchVisible) {
|
||||
const service = this.register.lookup('search-service:main');
|
||||
|
|
Loading…
Reference in New Issue