mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-31 14:11:05 +00:00
Commas in unread counts.
This commit is contained in:
parent
13e6246860
commit
b1f88de36a
2 changed files with 11 additions and 13 deletions
|
@ -3194,7 +3194,7 @@ background: transparent;
|
|||
.NB-feeds-header-user-dashboard {
|
||||
cursor: pointer;
|
||||
padding: 10px 0 10px;
|
||||
width: 32px;
|
||||
width: 36px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
@ -3259,15 +3259,15 @@ background: transparent;
|
|||
color: #B0B0B0;
|
||||
}
|
||||
.NB-feeds-header-dashboard .NB-feeds-header-negative {
|
||||
background: transparent url('/media/embed/icons/circular/g_icn_hidden.png') no-repeat 6px 3px;
|
||||
background: transparent url('/media/embed/icons/circular/g_icn_hidden.png') no-repeat 6px 2px;
|
||||
display: none;
|
||||
}
|
||||
.NB-feeds-header-dashboard .NB-feeds-header-neutral {
|
||||
background: transparent url('/media/embed/icons/circular/g_icn_unread.png') no-repeat 6px 3px;
|
||||
background: transparent url('/media/embed/icons/circular/g_icn_unread.png') no-repeat 6px 2px;
|
||||
background-size: 8px;
|
||||
}
|
||||
.NB-feeds-header-dashboard .NB-feeds-header-positive {
|
||||
background: transparent url('/media/embed/icons/circular/g_icn_focus.png') no-repeat 6px 3px;
|
||||
background: transparent url('/media/embed/icons/circular/g_icn_focus.png') no-repeat 6px 2px;
|
||||
background-size: 8px;
|
||||
}
|
||||
.NB-feeds-header-dashboard .NB-feeds-header-right {
|
||||
|
|
|
@ -35,10 +35,9 @@ NEWSBLUR.Views.SidebarHeader = Backbone.View.extend({
|
|||
<span class="NB-feeds-header-count NB-feeds-header-positive <% if (!positive_count) { %>NB-empty<% } %>"><%= positive_count %></span>\
|
||||
</div>\
|
||||
', {
|
||||
feeds_count : (this.feeds_count ? Inflector.pluralize(' site', this.feeds_count, true) : ' '),
|
||||
positive_count : this.unread_counts['ps'],
|
||||
neutral_count : this.unread_counts['nt'],
|
||||
negative_count : this.unread_counts['ng'],
|
||||
positive_count : Inflector.commas(this.unread_counts['ps']),
|
||||
neutral_count : Inflector.commas(this.unread_counts['nt']),
|
||||
negative_count : Inflector.commas(this.unread_counts['ng']),
|
||||
hide_read_feeds : !!hide_read_feeds
|
||||
});
|
||||
|
||||
|
@ -57,7 +56,6 @@ NEWSBLUR.Views.SidebarHeader = Backbone.View.extend({
|
|||
|
||||
count: function() {
|
||||
this.unread_counts = NEWSBLUR.assets.folders.unread_counts();
|
||||
this.feeds_count = this.count_feeds();
|
||||
|
||||
if (!NEWSBLUR.Globals.is_authenticated) return;
|
||||
if (!NEWSBLUR.assets.preference('title_counts')) return;
|
||||
|
@ -65,16 +63,16 @@ NEWSBLUR.Views.SidebarHeader = Backbone.View.extend({
|
|||
var counts = [];
|
||||
var unread_view = _.isNumber(this.options.unread_view) && this.options.unread_view || NEWSBLUR.assets.preference('unread_view');
|
||||
if (unread_view <= -1) {
|
||||
counts.push(this.unread_counts['ng']);
|
||||
counts.push(Inflector.commas(this.unread_counts['ng']));
|
||||
}
|
||||
if (unread_view <= 0) {
|
||||
counts.push(this.unread_counts['nt']);
|
||||
counts.push(Inflector.commas(this.unread_counts['nt']));
|
||||
}
|
||||
if (unread_view <= 1) {
|
||||
counts.push(this.unread_counts['ps']);
|
||||
counts.push(Inflector.commas(this.unread_counts['ps']));
|
||||
}
|
||||
if (!this.unread_counts['ng'] && !this.unread_counts['ps']) {
|
||||
counts = [this.unread_counts['nt']];
|
||||
counts = [Inflector.commas(this.unread_counts['nt'])];
|
||||
}
|
||||
var title = "NewsBlur";
|
||||
if (_.any(counts)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue