From 2d7b036b9ab67f930c19a8cb0922bae044cdabd0 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 2 Aug 2016 15:15:41 -0400 Subject: [PATCH] UX: Display nicer looking numbers for unread in categories --- .../discourse/widgets/hamburger-categories.js.es6 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/hamburger-categories.js.es6 b/app/assets/javascripts/discourse/widgets/hamburger-categories.js.es6 index ec14630d747..4000467e942 100644 --- a/app/assets/javascripts/discourse/widgets/hamburger-categories.js.es6 +++ b/app/assets/javascripts/discourse/widgets/hamburger-categories.js.es6 @@ -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) {