From 1d9bfacaf3b06da2479279d925f04a6ba01ee05e Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 7 Mar 2022 15:36:48 +0100 Subject: [PATCH 1/3] Updated to composition API --- package-lock.json | 15 ---- package.json | 3 +- src/App.vue | 6 -- src/i18n.ts | 2 +- src/router/index.ts | 4 +- src/views/Login/Login.vue | 150 +++++++++++++++++++------------------- 6 files changed, 79 insertions(+), 101 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a29f7f08..752052c06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,6 @@ "core-js": "^3.6.5", "quasar": "^2.0.0", "vue": "^3.0.0", - "vue-class-component": "^8.0.0-0", "vue-i18n": "^9.1.0", "vue-router": "^4.0.0-0", "vuex": "^4.0.0-0" @@ -19418,14 +19417,6 @@ "@vue/shared": "3.2.31" } }, - "node_modules/vue-class-component": { - "version": "8.0.0-rc.1", - "resolved": "https://registry.npmmirror.com/vue-class-component/-/vue-class-component-8.0.0-rc.1.tgz", - "integrity": "sha512-w1nMzsT/UdbDAXKqhwTmSoyuJzUXKrxLE77PCFVuC6syr8acdFDAq116xgvZh9UCuV0h+rlCtxXolr3Hi3HyPQ==", - "peerDependencies": { - "vue": "^3.0.0" - } - }, "node_modules/vue-cli-plugin-i18n": { "version": "2.3.1", "resolved": "https://registry.npmmirror.com/vue-cli-plugin-i18n/-/vue-cli-plugin-i18n-2.3.1.tgz", @@ -37109,12 +37100,6 @@ "@vue/shared": "3.2.31" } }, - "vue-class-component": { - "version": "8.0.0-rc.1", - "resolved": "https://registry.npmmirror.com/vue-class-component/-/vue-class-component-8.0.0-rc.1.tgz", - "integrity": "sha512-w1nMzsT/UdbDAXKqhwTmSoyuJzUXKrxLE77PCFVuC6syr8acdFDAq116xgvZh9UCuV0h+rlCtxXolr3Hi3HyPQ==", - "requires": {} - }, "vue-cli-plugin-i18n": { "version": "2.3.1", "resolved": "https://registry.npmmirror.com/vue-cli-plugin-i18n/-/vue-cli-plugin-i18n-2.3.1.tgz", diff --git a/package.json b/package.json index c006c3ae5..e76479171 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "core-js": "^3.6.5", "quasar": "^2.0.0", "vue": "^3.0.0", - "vue-class-component": "^8.0.0-0", "vue-i18n": "^9.1.0", "vue-router": "^4.0.0-0", "vuex": "^4.0.0-0" @@ -49,4 +48,4 @@ "vue-cli-plugin-quasar": "~4.0.4", "vue-jest": "^5.0.0-0" } -} \ No newline at end of file +} diff --git a/src/App.vue b/src/App.vue index 981b4e3d4..95692e2db 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,12 +2,6 @@ - - diff --git a/src/views/Dashboard/Dashboard.vue b/src/views/Dashboard/Dashboard.vue index 9e5b694a9..353def709 100644 --- a/src/views/Dashboard/Dashboard.vue +++ b/src/views/Dashboard/Dashboard.vue @@ -4,11 +4,4 @@ - - diff --git a/src/views/Layout/Main.vue b/src/views/Layout/Main.vue index 7a23a4969..7cc63e395 100644 --- a/src/views/Layout/Main.vue +++ b/src/views/Layout/Main.vue @@ -59,22 +59,14 @@ - diff --git a/src/views/Layout/NotFound.vue b/src/views/Layout/NotFound.vue index 3d8ced2d9..f130f38c2 100644 --- a/src/views/Layout/NotFound.vue +++ b/src/views/Layout/NotFound.vue @@ -2,11 +2,4 @@ Page not found - - diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index a84ed7b3f..61991fb49 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -62,12 +62,6 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import axios from 'axios'; -interface LoginForm { - username: string; - password: string; - keepLogin: boolean; -} - const quasar = useQuasar(); const store = useStore(); const router = useRouter(); @@ -89,8 +83,8 @@ const darkMode = computed({ function onSubmit(): void { axios .post('/api/accounts/login', { - user: username, - password: password, + user: username.value, + password: password.value, }) .then((response) => { store.dispatch('logIn', { @@ -120,23 +114,6 @@ function onSubmit(): void { } }); } - -/* data(): LoginForm { - return { - username: '', - password: '', - keepLogin: true, - }; - } */ - -/* @Options({ - setup() { - return { - $q: useQuasar(), - }; - }, -}) - */