From 6f79ab0955be750c51be28ef3dc32b52e27cb719 Mon Sep 17 00:00:00 2001 From: Vitaliy Klachkov Date: Fri, 16 Mar 2018 11:45:11 +1100 Subject: [PATCH] WIP: Add authentication page (#88) * Add sign out functionality * Add sign in and sign out functionality * Slight refactoring * Add redirection after signing in * Update auth form * Update remember me feature * Add Remember me feature * Update idleness interval * Update authorization form --- package.json | 1 + src/components/AppHeader.vue | 28 +++- src/components/Events.vue | 2 +- src/components/event/LastEvents.vue | 2 +- src/components/event/Settlements.vue | 2 +- src/components/users/Authorization.vue | 197 +++++++++++++++++++++++++ src/components/users/ResetPassword.vue | 0 src/helpers/axios.js | 19 +++ src/{helpers.js => helpers/math.js} | 0 src/main.js | 17 ++- src/router/index.js | 10 +- src/settings/api.js | 1 + src/store/index.js | 9 +- src/store/plugins/axios.js | 16 ++ src/store/plugins/user_activity.js | 14 ++ src/store/user.js | 37 +++-- yarn.lock | 10 ++ 17 files changed, 333 insertions(+), 32 deletions(-) create mode 100644 src/components/users/ResetPassword.vue create mode 100644 src/helpers/axios.js rename src/{helpers.js => helpers/math.js} (100%) create mode 100644 src/store/plugins/axios.js create mode 100644 src/store/plugins/user_activity.js diff --git a/package.json b/package.json index 1093550e..92c3b47b 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "axios": "^0.16.2", "bootstrap": "4.0.0-beta.2", "chart.js": "^2.7.0", + "idle-vue": "^2.0.5", "vue": "^2.4.2", "vue-axios": "^2.0.2", "vue-chartjs": "^2.8.7", diff --git a/src/components/AppHeader.vue b/src/components/AppHeader.vue index c6bb3583..9a9166af 100644 --- a/src/components/AppHeader.vue +++ b/src/components/AppHeader.vue @@ -26,15 +26,35 @@ Аналитика - - Войти -