mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-29 12:42:16 -05:00
Always show unread count instead of only on hover. Fix unread count in bookmarks list
This commit is contained in:
parent
f49ef09c12
commit
0aa116e6f6
@ -38,6 +38,15 @@ module.exports = HumanModel.define({
|
|||||||
return this.name || this.jid;
|
return this.name || this.jid;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
displayUnreadCount: {
|
||||||
|
deps: ['unreadCount'],
|
||||||
|
fn: function () {
|
||||||
|
if (this.unreadCount > 0) {
|
||||||
|
return this.unreadCount.toString();
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
hasUnread: {
|
hasUnread: {
|
||||||
deps: ['unreadCount'],
|
deps: ['unreadCount'],
|
||||||
fn: function () {
|
fn: function () {
|
||||||
|
@ -14,7 +14,7 @@ module.exports = HumanView.extend({
|
|||||||
},
|
},
|
||||||
textBindings: {
|
textBindings: {
|
||||||
displayName: '.name',
|
displayName: '.name',
|
||||||
unreadCount: '.unread'
|
displayUnreadCount: '.unread'
|
||||||
},
|
},
|
||||||
events: {
|
events: {
|
||||||
'click': 'handleClick'
|
'click': 'handleClick'
|
||||||
|
@ -63,12 +63,12 @@
|
|||||||
-webkit-transition: all .3s ease-in 0
|
-webkit-transition: all .3s ease-in 0
|
||||||
-moz-transition: all .3s ease-in 0
|
-moz-transition: all .3s ease-in 0
|
||||||
|
|
||||||
&:hover
|
|
||||||
background: $sidebarActive
|
|
||||||
|
|
||||||
.unread:not(:empty)
|
.unread:not(:empty)
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background: $sidebarActive
|
||||||
|
|
||||||
&.online, &.chat, &.dnd, &.away, &.xa
|
&.online, &.chat, &.dnd, &.away, &.xa
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
|
@ -380,14 +380,14 @@ h3 {
|
|||||||
-webkit-transition: all 0.3s ease-in 0;
|
-webkit-transition: all 0.3s ease-in 0;
|
||||||
-moz-transition: all 0.3s ease-in 0;
|
-moz-transition: all 0.3s ease-in 0;
|
||||||
}
|
}
|
||||||
|
#roster li .unread:not(:empty),
|
||||||
|
#bookmarks li .unread:not(:empty) {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
#roster li:hover,
|
#roster li:hover,
|
||||||
#bookmarks li:hover {
|
#bookmarks li:hover {
|
||||||
background: #1f2d49;
|
background: #1f2d49;
|
||||||
}
|
}
|
||||||
#roster li:hover .unread:not(:empty),
|
|
||||||
#bookmarks li:hover .unread:not(:empty) {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
#roster li.online:after,
|
#roster li.online:after,
|
||||||
#bookmarks li.online:after,
|
#bookmarks li.online:after,
|
||||||
#roster li.chat:after,
|
#roster li.chat:after,
|
||||||
|
Loading…
Reference in New Issue
Block a user