diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-31 01:12:20 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-31 01:12:20 +0200 |
commit | 82f0a877a001ead0bd0cdd76d96fe46a071535d8 (patch) | |
tree | a37f50a00c77c5e6afd1790ccde75ab3639c6c96 /js/filter | |
parent | 32f2759945521129e00a7cd4933682ff63d9440f (diff) |
add active and unread stuff
Diffstat (limited to 'js/filter')
-rw-r--r-- | js/filter/UnreadCountFormatter.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/filter/UnreadCountFormatter.js b/js/filter/UnreadCountFormatter.js new file mode 100644 index 000000000..3450114b1 --- /dev/null +++ b/js/filter/UnreadCountFormatter.js @@ -0,0 +1,19 @@ +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright Bernhard Posselt 2014 + */ +app.filter('unreadCountFormatter', () => { + 'use strict'; + + return (unreadCount) => { + if (unreadCount > 999) { + return '999+'; + } + return unreadCount; + }; +});
\ No newline at end of file |