mirror of
https://github.com/moparisthebest/kaiwa
synced 2025-02-16 15:10:11 -05:00
Track idleSince time for contacts
This commit is contained in:
parent
37e4fa3502
commit
50c6f7b317
File diff suppressed because one or more lines are too long
@ -109,6 +109,12 @@ module.exports = HumanModel.define({
|
||||
return resource.idleSince || undefined;
|
||||
}
|
||||
},
|
||||
idle: {
|
||||
deps: ['idleSince'],
|
||||
fn: function () {
|
||||
return !!this.idleSince;
|
||||
}
|
||||
},
|
||||
chatState: {
|
||||
deps: ['topResource', 'lockedResource', '_forceUpdate'],
|
||||
fn: function () {
|
||||
|
@ -15,7 +15,14 @@ module.exports = BaseCollection.extend({
|
||||
return 1;
|
||||
}
|
||||
if (res1.show === res2.show) {
|
||||
return 0;
|
||||
if (!!res1.idleSince && !!res2.idleSince) {
|
||||
return 0;
|
||||
}
|
||||
if (res1.idleSince && !res2.idleSince) {
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
var ranking = {
|
||||
|
@ -13,7 +13,8 @@ module.exports = HumanView.extend({
|
||||
subscription: '',
|
||||
chatState: '',
|
||||
activeContact: '',
|
||||
hasUnread: ''
|
||||
hasUnread: '',
|
||||
idle: ''
|
||||
},
|
||||
textBindings: {
|
||||
displayName: '.name',
|
||||
|
@ -122,6 +122,12 @@
|
||||
&:after
|
||||
background: $textSecondary
|
||||
|
||||
&.idle
|
||||
.name
|
||||
color: red
|
||||
&:after
|
||||
background: red
|
||||
|
||||
img
|
||||
opacity: 1
|
||||
|
||||
|
@ -469,6 +469,14 @@ h3 {
|
||||
#bookmarks li.paused:after {
|
||||
background: #b7b7b7;
|
||||
}
|
||||
#roster li.idle .name,
|
||||
#bookmarks li.idle .name {
|
||||
color: #f00;
|
||||
}
|
||||
#roster li.idle:after,
|
||||
#bookmarks li.idle:after {
|
||||
background: #f00;
|
||||
}
|
||||
#roster li img,
|
||||
#bookmarks li img {
|
||||
opacity: 1;
|
||||
|
Loading…
Reference in New Issue
Block a user