UX: Don't show more notifications message when there is none.
This commit is contained in:
parent
21684c98be
commit
6684e4ab87
|
@ -75,7 +75,6 @@ export default createWidget('user-menu', {
|
|||
return [this.attach('user-menu-links', { path }),
|
||||
this.attach('user-notifications', { path }),
|
||||
h('div.logout-link', [
|
||||
h('hr'),
|
||||
h('ul.menu-links',
|
||||
h('li', this.attach('link', { action: 'logout',
|
||||
className: 'logout',
|
||||
|
|
|
@ -67,13 +67,17 @@ export default createWidget('user-notifications', {
|
|||
const href = `${attrs.path}/notifications`;
|
||||
|
||||
result.push(h('hr'));
|
||||
result.push(h('ul', [
|
||||
notificationItems,
|
||||
h('li.read.last.heading',
|
||||
h('a', { attributes: { href } }, [I18n.t('notifications.more'), '...'])
|
||||
)
|
||||
]));
|
||||
|
||||
const items = [notificationItems]
|
||||
|
||||
if (notificationItems.length > 0) {
|
||||
items.push(
|
||||
h('li.read.last.heading', h('a', { attributes: { href } }, [I18n.t('notifications.more'), '...'])),
|
||||
h('hr')
|
||||
);
|
||||
}
|
||||
|
||||
result.push(h('ul', items));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue