mirror of
https://github.com/flarum/framework.git
synced 2024-11-27 19:13:37 +08:00
Add item priorities
This commit is contained in:
parent
c81ceafb54
commit
e192402a42
|
@ -30,7 +30,7 @@ export default class HeaderSecondary extends Component {
|
||||||
items() {
|
items() {
|
||||||
const items = new ItemList();
|
const items = new ItemList();
|
||||||
|
|
||||||
items.add('search', app.search.render());
|
items.add('search', app.search.render(), 30);
|
||||||
|
|
||||||
if (Object.keys(app.locales).length > 1) {
|
if (Object.keys(app.locales).length > 1) {
|
||||||
const locales = [];
|
const locales = [];
|
||||||
|
@ -54,12 +54,12 @@ export default class HeaderSecondary extends Component {
|
||||||
items.add('locale', SelectDropdown.component({
|
items.add('locale', SelectDropdown.component({
|
||||||
children: locales,
|
children: locales,
|
||||||
buttonClassName: 'Button Button--link'
|
buttonClassName: 'Button Button--link'
|
||||||
}));
|
}), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app.session.user) {
|
if (app.session.user) {
|
||||||
items.add('notifications', NotificationsDropdown.component());
|
items.add('notifications', NotificationsDropdown.component(), 10);
|
||||||
items.add('session', SessionDropdown.component());
|
items.add('session', SessionDropdown.component(), 0);
|
||||||
} else {
|
} else {
|
||||||
if (app.forum.attribute('allowSignUp')) {
|
if (app.forum.attribute('allowSignUp')) {
|
||||||
items.add('signUp',
|
items.add('signUp',
|
||||||
|
@ -67,7 +67,7 @@ export default class HeaderSecondary extends Component {
|
||||||
children: app.trans('core.sign_up'),
|
children: app.trans('core.sign_up'),
|
||||||
className: 'Button Button--link',
|
className: 'Button Button--link',
|
||||||
onclick: () => app.modal.show(new SignUpModal())
|
onclick: () => app.modal.show(new SignUpModal())
|
||||||
})
|
}), 10
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ export default class HeaderSecondary extends Component {
|
||||||
children: app.trans('core.log_in'),
|
children: app.trans('core.log_in'),
|
||||||
className: 'Button Button--link',
|
className: 'Button Button--link',
|
||||||
onclick: () => app.modal.show(new LogInModal())
|
onclick: () => app.modal.show(new LogInModal())
|
||||||
})
|
}), 0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user