Display gray # instead of colored + for no-name contacts
For consistency with android.
This commit is contained in:
parent
4c40861728
commit
feb5e5b068
5 changed files with 10 additions and 3 deletions
|
@ -95,7 +95,7 @@
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
<script type='text/x-tmpl-mustache' id='avatar'>
|
<script type='text/x-tmpl-mustache' id='avatar'>
|
||||||
<span class='avatar color{{avatar.color}}' style='background-image: url("{{ avatar.url }}");'>
|
<span class='avatar {{#avatar.color }} color{{avatar.color}} {{/avatar.color}}' style='background-image: url("{{ avatar.url }}");'>
|
||||||
{{ avatar.content }}
|
{{ avatar.content }}
|
||||||
</span>
|
</span>
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -244,7 +244,10 @@
|
||||||
if (this.avatarUrl) {
|
if (this.avatarUrl) {
|
||||||
return { url: this.avatarUrl };
|
return { url: this.avatarUrl };
|
||||||
} else if (this.isPrivate()) {
|
} else if (this.isPrivate()) {
|
||||||
var title = this.getTitle() || '';
|
var title = this.get('name');
|
||||||
|
if (!title) {
|
||||||
|
return { content: '#', color: 'gray' };
|
||||||
|
}
|
||||||
var initials = title.trim()[0];
|
var initials = title.trim()[0];
|
||||||
return {
|
return {
|
||||||
color: Math.abs(this.hashCode()) % 17,
|
color: Math.abs(this.hashCode()) % 17,
|
||||||
|
|
|
@ -357,6 +357,7 @@ $avatar-size: 44px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// avatar colors
|
// avatar colors
|
||||||
|
.avatar.colorgray { background-color: #999999 }
|
||||||
.avatar.color0 { background-color: #e57373 }
|
.avatar.color0 { background-color: #e57373 }
|
||||||
.avatar.color1 { background-color: #f06292 }
|
.avatar.color1 { background-color: #f06292 }
|
||||||
.avatar.color2 { background-color: #ba68c8 }
|
.avatar.color2 { background-color: #ba68c8 }
|
||||||
|
|
|
@ -274,6 +274,9 @@ img.emoji {
|
||||||
.attachment-preview img {
|
.attachment-preview img {
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
|
|
||||||
|
.avatar.colorgray {
|
||||||
|
background-color: #999999; }
|
||||||
|
|
||||||
.avatar.color0 {
|
.avatar.color0 {
|
||||||
background-color: #e57373; }
|
background-color: #e57373; }
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue