From 66b59f2752e47a9f6349810c8de6d2947d811de0 Mon Sep 17 00:00:00 2001
From: wakarimasen <wakarimasen@airmail.cc>
Date: Tue, 11 Apr 2017 11:47:19 +0200
Subject: Fix daily average on accounts younger than a day

---
 src/components/user_card_content/user_card_content.vue | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/components/user_card_content/user_card_content.vue')

diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 8c971d53..7b89a7f2 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -79,9 +79,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: {
-- 
cgit v1.2.3-70-g09d2


From 69ef9101d4066df5df6780a2bfaeaa949869df02 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson <shpuld@gmail.com>
Date: Thu, 13 Apr 2017 17:57:20 +0300
Subject: Fix login screen, (remove one duplicate line from user card css).

---
 src/App.scss                                           | 7 ++++---
 src/components/user_card_content/user_card_content.vue | 1 -
 2 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/components/user_card_content/user_card_content.vue')

diff --git a/src/App.scss b/src/App.scss
index 16278e98..0f5c13c7 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -219,7 +219,7 @@ nav {
 }
 
 .sidebar {
-  flex: 1;
+  flex: 0;
   flex-basis: 35%;
 }
 
@@ -249,17 +249,18 @@ nav {
   .sidebar {
     overflow: hidden;
     max-height: 100vh;
-    max-width: 345px;
+    width: 345px;
     position: fixed;
     margin-top: -10px;
 
     .sidebar-container {
       height: 96vh;
+      width: 360px;
       padding-top: 10px;
       margin-right: -40px;
       padding-right: 25px;
       overflow-x: hidden;
-      overflow-y: auto;
+      overflow-y: scroll;
     }
   }
   .sidebar-flexer {
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 7b89a7f2..bba16584 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -116,7 +116,6 @@
 }
 
 .profile-panel-body {
-  padding-top: 0em;
   top: -0em;
   padding-top: 4em;
 }
-- 
cgit v1.2.3-70-g09d2


From 85cf036acd4c6e23c0128f5e3bb8730f4dabb32a Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Mon, 12 Jun 2017 15:59:54 +0200
Subject: Fix race condition in color calculation.

---
 src/components/user_card_content/user_card_content.vue | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'src/components/user_card_content/user_card_content.vue')

diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index bba16584..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 () {
-- 
cgit v1.2.3-70-g09d2

