diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-22 11:34:40 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-22 11:34:40 +0900 |
| commit | 3be7952e9f0189b39c3f28c8cff68aab77d61acd (patch) | |
| tree | 629383dfd46fb7d0dcb143ef207c84ac7a86de07 /src | |
| parent | Fix bug (diff) | |
| download | sharkey-3be7952e9f0189b39c3f28c8cff68aab77d61acd.tar.gz sharkey-3be7952e9f0189b39c3f28c8cff68aab77d61acd.tar.bz2 sharkey-3be7952e9f0189b39c3f28c8cff68aab77d61acd.zip | |
Improve avatar rendering
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/app/common/views/components/avatar.vue | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/app/common/views/components/avatar.vue b/src/client/app/common/views/components/avatar.vue index 6b407ccc80..3e1b17635f 100644 --- a/src/client/app/common/views/components/avatar.vue +++ b/src/client/app/common/views/components/avatar.vue @@ -26,7 +26,11 @@ export default Vue.extend({ }, style(): any { return { - backgroundColor: this.user.avatarColor && this.user.avatarColor.length == 3 ? `rgb(${ this.user.avatarColor.join(',') })` : null, + backgroundColor: this.lightmode + ? `rgb(${ this.user.avatarColor.slice(0, 3).join(',') })` + : this.user.avatarColor && this.user.avatarColor.length == 3 + ? `rgb(${ this.user.avatarColor.join(',') })` + : null, backgroundImage: this.lightmode ? null : `url(${ this.user.avatarUrl }?thumbnail)`, borderRadius: (this as any).clientSettings.circleIcons ? '100%' : null }; |