mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-12 11:34:41 +00:00
Fix race condition in color calculation.
This commit is contained in:
parent
fc341aa40d
commit
85cf036acd
1 changed files with 7 additions and 4 deletions
|
@ -61,10 +61,13 @@
|
|||
props: [ 'user' ],
|
||||
computed: {
|
||||
headingStyle () {
|
||||
let rgb = this.$store.state.config.colors['base00'].match(/\d+/g)
|
||||
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})`
|
||||
let color = this.$store.state.config.colors['base00']
|
||||
if (color) {
|
||||
let rgb = this.$store.state.config.colors['base00'].match(/\d+/g)
|
||||
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 () {
|
||||
|
|
Loading…
Reference in a new issue