mirror of
https://git.pleroma.social/sjw/pleroma-fe.git
synced 2025-01-27 01:20:04 +01:00
Fix race condition in color calculation.
This commit is contained in:
parent
fc341aa40d
commit
85cf036acd
@ -61,10 +61,13 @@
|
|||||||
props: [ 'user' ],
|
props: [ 'user' ],
|
||||||
computed: {
|
computed: {
|
||||||
headingStyle () {
|
headingStyle () {
|
||||||
let rgb = this.$store.state.config.colors['base00'].match(/\d+/g)
|
let color = this.$store.state.config.colors['base00']
|
||||||
return {
|
if (color) {
|
||||||
backgroundColor: `rgb(${Math.floor(rgb[0] * 0.53)}, ${Math.floor(rgb[1] * 0.56)}, ${Math.floor(rgb[2] * 0.59)})`,
|
let rgb = this.$store.state.config.colors['base00'].match(/\d+/g)
|
||||||
backgroundImage: `url(${this.user.cover_photo})`
|
return {
|
||||||
|
backgroundColor: `rgb(${Math.floor(rgb[0] * 0.53)}, ${Math.floor(rgb[1] * 0.56)}, ${Math.floor(rgb[2] * 0.59)})`,
|
||||||
|
backgroundImage: `url(${this.user.cover_photo})`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
bodyStyle () {
|
bodyStyle () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user