From 66b59f2752e47a9f6349810c8de6d2947d811de0 Mon Sep 17 00:00:00 2001 From: wakarimasen 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') 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 83205b8c0e317d63c9cef86ede6a84a69021f4e2 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Thu, 13 Apr 2017 16:17:57 +0300 Subject: Make sidepanel scroll independently from timeline, allows for seeing notifications and posting new statuses even when scrolled deep down. --- src/App.scss | 28 +++++++++++++++++++++++++ src/App.vue | 12 +++++++---- src/components/notifications/notifications.scss | 2 ++ 3 files changed, 38 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/App.scss b/src/App.scss index 8a1942c6..6e584f3d 100644 --- a/src/App.scss +++ b/src/App.scss @@ -222,6 +222,12 @@ nav { flex-basis: 35%; } +.sidebar-flexer { + flex: 1; + flex-basis: 35%; + width: 365px; +} + .mobile-shown { display: none; } @@ -238,6 +244,28 @@ nav { } } +@media all and (min-width: 960px) { + .sidebar { + overflow: hidden; + max-height: 100vh; + max-width: 345px; + position: fixed; + margin-top: -10px; + + .sidebar-container { + height: 96vh; + padding-top: 10px; + margin-right: -40px; + padding-right: 25px; + overflow-x: hidden; + overflow-y: auto; + } + } + .sidebar-flexer { + max-height: 96vh; + } +} + @media all and (max-width: 959px) { .mobile-hidden { display: none; diff --git a/src/App.vue b/src/App.vue index c4b3cb13..fcfdae97 100644 --- a/src/App.vue +++ b/src/App.vue @@ -15,10 +15,14 @@ -