mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-15 06:27:34 -07:00
Improve avatar rendering
This commit is contained in:
parent
c7cf07f618
commit
2646ea0a68
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue