From 33a39d36834fdee7a9c81fc889d58f2ed70e5518 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Thu, 29 Jun 2017 20:49:05 +0200 Subject: [PATCH] Client fixes (#8844) * client: fix router when not authenticated, small fixes for tasks * load the user only when necessary * fix tests --- test/client/unit/specs/store/actions/user.js | 2 +- website/client/app.vue | 69 ++++++++------------ website/client/assets/scss/task.scss | 42 ++++++++++-- website/client/components/appHeader.vue | 31 ++------- website/client/components/appMenu.vue | 2 +- website/client/components/static/home.vue | 4 +- website/client/components/tasks/task.vue | 6 +- website/client/index.html | 5 -- website/client/main.js | 14 +--- website/client/router.js | 29 ++++++-- website/client/store/index.js | 28 +++++++- 11 files changed, 131 insertions(+), 101 deletions(-) diff --git a/test/client/unit/specs/store/actions/user.js b/test/client/unit/specs/store/actions/user.js index 5069e04087..38739d8c45 100644 --- a/test/client/unit/specs/store/actions/user.js +++ b/test/client/unit/specs/store/actions/user.js @@ -1,7 +1,7 @@ import axios from 'axios'; import generateStore from 'client/store'; -describe('tasks actions', () => { +describe('user actions', () => { let store; beforeEach(() => { diff --git a/website/client/app.vue b/website/client/app.vue index 6f05b18552..2d0feaaf89 100644 --- a/website/client/app.vue +++ b/website/client/app.vue @@ -1,19 +1,20 @@ - - diff --git a/website/client/assets/scss/task.scss b/website/client/assets/scss/task.scss index ee64dc34e8..805cdec48d 100644 --- a/website/client/assets/scss/task.scss +++ b/website/client/assets/scss/task.scss @@ -6,51 +6,79 @@ &-worst { background: $maroon-100; - &-control { + &-control-habit { background: darken($maroon-100, 12%); } + + &-control-daily-todo { + background: $maroon-500; + } } &-worse { background: $red-100; - &-control { + &-control-habit { background: darken($red-100, 12%); } + + &-control-daily-todo { + background: $red-500; + } } &-bad { background: $orange-100; - &-control { + &-control-habit { background: darken($orange-100, 12%); } + + &-control-daily-todo { + background: $orange-500; + } } &-neutral { background: $yellow-50; - &-control { + &-control-habit { background: darken($yellow-50, 12%); } + + &-control-daily-todo { + background: $yellow-500; + } } &-good { background: $green-10; - &-control { + &-control-habit { background: darken($green-10, 12%); } + + &-control-daily-todo { + background: $green-500; + } } &-better { background: $blue-50; - &-control { + &-control-habit { background: darken($blue-50, 12%); } + + &-control-daily-todo { + background: $blue-500; + } } &-best { background: $teal-50; - &-control { + &-control-habit { background: darken($teal-50, 12%); } + + &-control-daily-todo { + background: $teal-500; + } } &-reward { diff --git a/website/client/components/appHeader.vue b/website/client/components/appHeader.vue index 21e7f631bf..352ad1086d 100644 --- a/website/client/components/appHeader.vue +++ b/website/client/components/appHeader.vue @@ -1,7 +1,7 @@