mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
UX: Display nicer looking numbers for unread in categories
This commit is contained in:
parent
37162e476b
commit
2d7b036b9a
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
import { createWidget } from 'discourse/widgets/widget';
|
||||
import { h } from 'virtual-dom';
|
||||
import { number } from 'discourse/lib/formatter';
|
||||
|
||||
createWidget('hamburger-category', {
|
||||
tagName: 'li.category-link',
|
||||
|
@ -9,7 +10,9 @@ createWidget('hamburger-category', {
|
|||
|
||||
const unreadTotal = parseInt(c.get('unreadTopics'), 10) + parseInt(c.get('newTopics'), 10);
|
||||
if (unreadTotal) {
|
||||
results.push(h('a.badge.badge-notification', { attributes: { href: c.get('url') } }, unreadTotal.toString()));
|
||||
results.push(h('a.badge.badge-notification', {
|
||||
attributes: { href: c.get('url') }
|
||||
}, number(unreadTotal)));
|
||||
}
|
||||
|
||||
if (!this.currentUser) {
|
||||
|
|
Loading…
Reference in a new issue