diff options
| author | Shpuld Shpuldson <shpuld@gmail.com> | 2017-06-15 23:25:19 +0300 |
|---|---|---|
| committer | Shpuld Shpuldson <shpuld@gmail.com> | 2017-06-15 23:25:19 +0300 |
| commit | e0e8965c08c09fee16d17e312c3788e13cdd1c88 (patch) | |
| tree | 53e6c4eebd4328f868c2d3f6eb0b26b3c3e1951d /src/components/user_card_content/user_card_content.vue | |
| parent | 44923afbee23ef7bd22c20d25bf7776b284f5f88 (diff) | |
| parent | 7d46e3965d06e039537066eeb5fac99ebcab978d (diff) | |
update branch and fix merge conflicts
Diffstat (limited to 'src/components/user_card_content/user_card_content.vue')
| -rw-r--r-- | src/components/user_card_content/user_card_content.vue | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index 8c971d53..ff1b108c 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -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 () { @@ -79,9 +82,8 @@ return this.$store.state.users.currentUser }, dailyAvg () { - return Math.round( - this.user.statuses_count / ((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000)) - ) + const days = Math.ceil((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000)) + return Math.round(this.user.statuses_count / days) } }, methods: { @@ -117,7 +119,6 @@ } .profile-panel-body { - padding-top: 0em; top: -0em; padding-top: 4em; } |
