mirror of
https://github.com/discourse/discourse.git
synced 2025-05-04 16:04:38 +08:00
Correct colors for tracking glyph in notification area
This commit is contained in:
parent
6006494609
commit
2debf7d97d
@ -15,16 +15,20 @@ Discourse.NotificationsButton = Discourse.DropdownButtonView.extend({
|
|||||||
isPrivateMessage: Em.computed.alias('topic.isPrivateMessage'),
|
isPrivateMessage: Em.computed.alias('topic.isPrivateMessage'),
|
||||||
activeItem: Em.computed.alias('topic.details.notification_level'),
|
activeItem: Em.computed.alias('topic.details.notification_level'),
|
||||||
|
|
||||||
|
watchingClasses: 'fa fa-exclamation-circle watching',
|
||||||
|
trackingClasses: 'fa fa-circle tracking',
|
||||||
|
mutedClasses: 'fa fa-times-circle muted',
|
||||||
|
|
||||||
dropDownContent: function() {
|
dropDownContent: function() {
|
||||||
var contents = [], postfix = '';
|
var contents = [], postfix = '';
|
||||||
|
|
||||||
if (this.get('isPrivateMessage')) { postfix = '_pm'; }
|
if (this.get('isPrivateMessage')) { postfix = '_pm'; }
|
||||||
|
|
||||||
_.each([
|
_.each([
|
||||||
['WATCHING', 'watching', 'fa fa-circle heatmap-high'],
|
['WATCHING', 'watching', this.watchingClasses],
|
||||||
['TRACKING', 'tracking', 'fa fa-circle heatmap-low'],
|
['TRACKING', 'tracking', this.trackingClasses],
|
||||||
['REGULAR', 'regular', ''],
|
['REGULAR', 'regular', 'tracking'],
|
||||||
['MUTED', 'muted', 'fa fa-times-circle']
|
['MUTED', 'muted', this.mutedClasses]
|
||||||
], function(pair) {
|
], function(pair) {
|
||||||
|
|
||||||
if (postfix === '_pm' && pair[1] === 'regular') { return; }
|
if (postfix === '_pm' && pair[1] === 'regular') { return; }
|
||||||
@ -40,6 +44,8 @@ Discourse.NotificationsButton = Discourse.DropdownButtonView.extend({
|
|||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
text: function() {
|
text: function() {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
var key = (function() {
|
var key = (function() {
|
||||||
switch (this.get('topic.details.notification_level')) {
|
switch (this.get('topic.details.notification_level')) {
|
||||||
case Discourse.Topic.NotificationLevel.WATCHING: return 'watching';
|
case Discourse.Topic.NotificationLevel.WATCHING: return 'watching';
|
||||||
@ -51,9 +57,9 @@ Discourse.NotificationsButton = Discourse.DropdownButtonView.extend({
|
|||||||
|
|
||||||
var icon = (function() {
|
var icon = (function() {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'watching': return '<i class="fa fa-circle heatmap-high"></i> ';
|
case 'watching': return '<i class="' + self.watchingClasses + '"></i> ';
|
||||||
case 'tracking': return '<i class="fa fa-circle heatmap-low"></i> ';
|
case 'tracking': return '<i class="' + self.trackingClasses + '"></i> ';
|
||||||
case 'muted': return '<i class="fa fa-times-circle"></i> ';
|
case 'muted': return '<i class="' + self.mutedClasses + '"></i> ';
|
||||||
default: return '';
|
default: return '';
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
@ -19,6 +19,7 @@ body {
|
|||||||
color: $tertiary_text_color;
|
color: $tertiary_text_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.coldmap-high {
|
.coldmap-high {
|
||||||
color: $coldmap-high !important;
|
color: $coldmap-high !important;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
.fa.muted {
|
||||||
|
color: $notification_badge_background_color;
|
||||||
|
}
|
||||||
|
.fa.tracking, .fa.watching {
|
||||||
|
color: lighten($emphasis_text_color, 20%);
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user