From c97742efd712cbcd840e1ff141d06cc4d3399d27 Mon Sep 17 00:00:00 2001 From: MarcZierle Date: Fri, 14 Jan 2022 19:05:33 +0100 Subject: [PATCH] add api client and implement simple log list --- babel.config.js | 4 ++- package-lock.json | 36 +++++++++++++++++-- package.json | 4 ++- public/index.html | 2 +- src/App.vue | 25 +++++++++---- src/api/index.js | 15 ++++++++ src/main.js | 8 +++++ src/store/index.js | 27 ++++++++++---- src/views/CreateLog.vue | 13 ++++++- src/views/LogsList.vue | 80 +++++++++++++++++++++++++++++++++++++++-- vue.config.js | 5 +++ 11 files changed, 198 insertions(+), 21 deletions(-) create mode 100644 src/api/index.js create mode 100644 vue.config.js diff --git a/babel.config.js b/babel.config.js index 162a3ea..b4e9b9a 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,5 @@ module.exports = { - presets: ["@vue/cli-plugin-babel/preset"], + presets: [ + "@vue/cli-plugin-babel/preset" + ], }; diff --git a/package-lock.json b/package-lock.json index a81f06a..c47c93d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,8 +8,10 @@ "name": "frontend", "version": "0.1.0", "dependencies": { + "axios": "^0.24.0", "core-js": "^3.6.5", "vue": "^3.0.0", + "vue-meta": "^3.0.0-alpha.8", "vue-router": "^4.0.0-0", "vuex": "^4.0.0-0" }, @@ -3373,6 +3375,14 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, + "node_modules/axios": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", + "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "dependencies": { + "follow-redirects": "^1.14.4" + } + }, "node_modules/babel-eslint": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", @@ -7321,7 +7331,6 @@ "version": "1.14.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz", "integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==", - "dev": true, "funding": [ { "type": "individual", @@ -14868,6 +14877,14 @@ "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", "dev": true }, + "node_modules/vue-meta": { + "version": "3.0.0-alpha.9", + "resolved": "https://registry.npmjs.org/vue-meta/-/vue-meta-3.0.0-alpha.9.tgz", + "integrity": "sha512-/ff7qNKy4c5NwmDl6N5XK2hhiXEdMeUxvk+SXCs40W9DOgu7VWGqPtgdSnXHnYMRoofkT/nKHE+vXklJ47r9Dw==", + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vue-router": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.12.tgz", @@ -18596,6 +18613,14 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, + "axios": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", + "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "requires": { + "follow-redirects": "^1.14.4" + } + }, "babel-eslint": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", @@ -21758,8 +21783,7 @@ "follow-redirects": { "version": "1.14.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz", - "integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==", - "dev": true + "integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==" }, "for-in": { "version": "1.0.2", @@ -27824,6 +27848,12 @@ } } }, + "vue-meta": { + "version": "3.0.0-alpha.9", + "resolved": "https://registry.npmjs.org/vue-meta/-/vue-meta-3.0.0-alpha.9.tgz", + "integrity": "sha512-/ff7qNKy4c5NwmDl6N5XK2hhiXEdMeUxvk+SXCs40W9DOgu7VWGqPtgdSnXHnYMRoofkT/nKHE+vXklJ47r9Dw==", + "requires": {} + }, "vue-router": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.12.tgz", diff --git a/package.json b/package.json index 7c9267b..22eb8d8 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "frontend", + "name": "zierle-training-online-tools", "version": "0.1.0", "private": true, "scripts": { @@ -8,8 +8,10 @@ "lint": "vue-cli-service lint" }, "dependencies": { + "axios": "^0.24.0", "core-js": "^3.6.5", "vue": "^3.0.0", + "vue-meta": "^3.0.0-alpha.8", "vue-router": "^4.0.0-0", "vuex": "^4.0.0-0" }, diff --git a/public/index.html b/public/index.html index 3e5a139..32e2d00 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ - + <%= htmlWebpackPlugin.options.title %> diff --git a/src/App.vue b/src/App.vue index 2b212fa..e86238a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,14 +1,21 @@ \ No newline at end of file diff --git a/src/views/LogsList.vue b/src/views/LogsList.vue index d5f7a1f..0fbe104 100644 --- a/src/views/LogsList.vue +++ b/src/views/LogsList.vue @@ -1,3 +1,79 @@ \ No newline at end of file +
+

Logs List

+ + + Photo Log Title + Date created + delete + + + + {{ photolog.title }} + {{ photolog.date }} + + Delete + + + + + + +
+ + + \ No newline at end of file diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..798da2c --- /dev/null +++ b/vue.config.js @@ -0,0 +1,5 @@ +module.exports = { + transpileDependencies: [ + 'vue-meta', + ], +}