Add item priorities

This commit is contained in:
Toby Zerner 2015-09-04 12:11:45 +09:30
parent c81ceafb54
commit e192402a42

View File

@ -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
); );
} }