Let groups have blue headers
// FREEBIE
This commit is contained in:
parent
3e103ffde2
commit
c8aa2246dc
1 changed files with 13 additions and 6 deletions
|
@ -352,19 +352,26 @@
|
|||
}
|
||||
|
||||
var title = this.get('name');
|
||||
var color = '#999999';
|
||||
if (this.isPrivate() && title) {
|
||||
color = COLORS[Math.abs(this.hashCode()) % 15];
|
||||
var color;
|
||||
if (this.isPrivate()) {
|
||||
if (title) {
|
||||
color = COLORS[Math.abs(this.hashCode()) % 15];
|
||||
} else {
|
||||
color = '#999999';
|
||||
}
|
||||
} else {
|
||||
color = '#2090ea';
|
||||
}
|
||||
|
||||
if (this.avatarUrl) {
|
||||
return { url: this.avatarUrl, color: color };
|
||||
} else if (this.isPrivate()) {
|
||||
var content;
|
||||
if (!title) {
|
||||
return { content: '#', color: color };
|
||||
content = '#';
|
||||
}
|
||||
var initials = title.trim()[0];
|
||||
return { content: initials, color: color };
|
||||
var content = title.trim()[0];
|
||||
return { content: content, color: color };
|
||||
} else {
|
||||
return { url: '/images/group_default.png', color: color };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue