From a408cae6864439a875edf7877b147f9ad0d76e45 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Sun, 19 Sep 2021 17:30:37 +0200 Subject: [PATCH] introduce vuex --- package-lock.json | 24 +++++++++++++++- package.json | 3 +- src/App.vue | 17 ++--------- src/components/AutoComplete.vue | 8 ++++-- src/components/Navbar.vue | 26 +++++++++++------ src/main.js | 2 ++ src/mixins/request.mixin.js | 22 ++++++++------- src/router/index.js | 9 ++++-- src/store.js | 50 +++++++++++++++++++++++++++++++++ src/views/profile/View.vue | 14 +++++---- 10 files changed, 129 insertions(+), 46 deletions(-) create mode 100644 src/store.js diff --git a/package-lock.json b/package-lock.json index 4fa14de..5ce9315 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,8 @@ "sass": "^1.37.5", "sass-loader": "^10.2.0", "vue": "^3.0.0", - "vue-router": "^4.0.0-0" + "vue-router": "^4.0.0-0", + "vuex": "^4.0.2" } }, "node_modules/@babel/code-frame": { @@ -13335,6 +13336,18 @@ "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", "dev": true }, + "node_modules/vuex": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.0.2.tgz", + "integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==", + "dev": true, + "dependencies": { + "@vue/devtools-api": "^6.0.0-beta.11" + }, + "peerDependencies": { + "vue": "^3.0.2" + } + }, "node_modules/watchpack": { "version": "1.7.5", "resolved": "https://registry.nlark.com/watchpack/download/watchpack-1.7.5.tgz?cache=0&sync_timestamp=1621437900992&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fwatchpack%2Fdownload%2Fwatchpack-1.7.5.tgz", @@ -25940,6 +25953,15 @@ "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", "dev": true }, + "vuex": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.0.2.tgz", + "integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==", + "dev": true, + "requires": { + "@vue/devtools-api": "^6.0.0-beta.11" + } + }, "watchpack": { "version": "1.7.5", "resolved": "https://registry.nlark.com/watchpack/download/watchpack-1.7.5.tgz?cache=0&sync_timestamp=1621437900992&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fwatchpack%2Fdownload%2Fwatchpack-1.7.5.tgz", diff --git a/package.json b/package.json index 2c0f6d9..088c008 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "sass": "^1.37.5", "sass-loader": "^10.2.0", "vue": "^3.0.0", - "vue-router": "^4.0.0-0" + "vue-router": "^4.0.0-0", + "vuex": "^4.0.2" } } diff --git a/src/App.vue b/src/App.vue index 2727711..e221db0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
- +