From 2b93390b320b69520b6cbbe0255745c99510d42d Mon Sep 17 00:00:00 2001 From: Troplo Date: Sat, 10 Apr 2021 18:10:14 +1000 Subject: [PATCH] Improvements --- .env | 10 ++-- .env.development | 6 +-- .gitignore | 5 +- package.json | 2 +- src/App.vue | 8 ++-- src/assets/js/linkExpander.js | 2 +- src/components/Badges.vue | 2 +- src/components/Banners.vue | 83 ++++++++++++++++++++++++++++++++ src/components/Footer.vue | 19 ++++---- src/components/Navbar.vue | 86 ++++++++++++---------------------- src/components/SidebarChat.vue | 2 +- src/main.js | 2 +- src/store/index.js | 8 +++- src/views/AdminCreateItem.vue | 6 +-- src/views/Avatar.vue | 4 +- src/views/ChatMessage.vue | 4 +- src/views/Debug.vue | 4 +- src/views/ForumThread.vue | 2 +- src/views/Forums.vue | 8 ++-- src/views/Friends.vue | 6 +-- src/views/Home.vue | 12 ++--- src/views/Marketplace.vue | 4 +- src/views/MarketplaceItem.vue | 4 +- src/views/Register.vue | 16 +++---- src/views/SettingsGeneral.vue | 12 ++--- src/views/Stats.vue | 2 +- src/views/Teams.vue | 2 +- src/views/Transaction.vue | 8 ++-- src/views/User.vue | 68 +++++++++++++-------------- src/views/UserAwards.vue | 2 +- src/views/UserFriends.vue | 2 +- src/views/UserInventory.vue | 2 +- src/views/UserPosts.vue | 2 +- src/views/Users.vue | 4 +- vue.config.example.js | 66 ++++++++++++++++++++++++++ 35 files changed, 304 insertions(+), 171 deletions(-) create mode 100644 src/components/Banners.vue create mode 100644 vue.config.example.js diff --git a/.env b/.env index 97690dc..22a7a57 100644 --- a/.env +++ b/.env @@ -1,7 +1,9 @@ -VUE_APP_APIENDPOINT=/api/ -VUE_APP_APIVERSION=v2 -VUE_APP_GATEWAYENDPOINT=/socket.io/ +VUE_APP_API_ENDPOINT=/api/ +VUE_APP_API_VERSION=v2 +VUE_APP_GATEWAY_ENDPOINT=/socket.io/ VUE_APP_STAGING=true VUE_APP_I18N_LOCALE=en VUE_APP_I18N_FALLBACK_LOCALE=en -VUE_APP_RELEASE="Canary" \ No newline at end of file +VUE_APP_RELEASE="Canary" +VUE_APP_VERSION=[AIV]{version}[/AIV] +VUE_APP_BUILD_DATE=[AIV]{date}[/AIV] \ No newline at end of file diff --git a/.env.development b/.env.development index be6fe8f..b1cdbb7 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ -VUE_APP_APIENDPOINT="/api/" -VUE_APP_APIVERSION="v2" -VUE_APP_GATEWAYENDPOINT="/socket.io/" +VUE_APP_API_ENDPOINT="/api/" +VUE_APP_API_VERSION="v2" +VUE_APP_GATEWAY_ENDPOINT="/socket.io/" VUE_APP_STAGING=true VUE_APP_RELEASE="Canary" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 25e65c3..2b24970 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,7 @@ pnpm-debug.log* *.metadata # Yarn and NPM -.yarn \ No newline at end of file +.yarn + +# Vue +vue.config.js \ No newline at end of file diff --git a/package.json b/package.json index f932deb..27ef42d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kaverti-frontend", - "version": "", + "version": "1.0.0", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/App.vue b/src/App.vue index 562146e..3992080 100644 --- a/src/App.vue +++ b/src/App.vue @@ -38,8 +38,8 @@ export default { } this.axios .get( - process.env.VUE_APP_APIENDPOINT + - process.env.VUE_APP_APIVERSION + + process.env.VUE_APP_API_ENDPOINT + + process.env.VUE_APP_API_VERSION + "/" + "userinfo" ) @@ -56,8 +56,8 @@ export default { }) if (this.$store.state.user.username) { this.axios.get( - process.env.VUE_APP_APIENDPOINT + - process.env.VUE_APP_APIVERSION + + process.env.VUE_APP_API_ENDPOINT + + process.env.VUE_APP_API_VERSION + "/" + "awards/eligibility" ) diff --git a/src/assets/js/linkExpander.js b/src/assets/js/linkExpander.js index 87d8c62..48e5dcf 100644 --- a/src/assets/js/linkExpander.js +++ b/src/assets/js/linkExpander.js @@ -49,7 +49,7 @@ export default { replaceLink(cached, link); } else { Vue.axios - .get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'forums/link_preview?url=' + link.href) + .get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'forums/link_preview?url=' + link.href) .then(res => { cache[link.href] = res.data; replaceLink(res.data, link); diff --git a/src/components/Badges.vue b/src/components/Badges.vue index 3910f59..f77a3c1 100644 --- a/src/components/Badges.vue +++ b/src/components/Badges.vue @@ -72,7 +72,7 @@ export default { }, modifyUser() { this.axios - .put(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'admin/user/modify', { + .put(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'admin/user/modify', { username: this.username, bot: this.bot, system: this.system, diff --git a/src/components/Banners.vue b/src/components/Banners.vue new file mode 100644 index 0000000..5e550f7 --- /dev/null +++ b/src/components/Banners.vue @@ -0,0 +1,83 @@ + + + \ No newline at end of file diff --git a/src/components/Footer.vue b/src/components/Footer.vue index 3b3ae77..cc79ec9 100644 --- a/src/components/Footer.vue +++ b/src/components/Footer.vue @@ -102,6 +102,9 @@

© 2021 Kaverti

+

Version: {{$store.state.client.clientVersion}}

+

Build Date: {{$store.state.client.buildDate}}

+

!! DEVELOPMENT MODE !! {{$store.state.client.domain}}

{{ $t("languages.title") }} Provide Feedback @@ -132,8 +135,8 @@ export default { this.feedback.loading = true; this.axios .post( - process.env.VUE_APP_APIENDPOINT + - process.env.VUE_APP_APIVERSION + + process.env.VUE_APP_API_ENDPOINT + + process.env.VUE_APP_API_VERSION + "/" + "feedback", { @@ -145,8 +148,8 @@ export default { ) .then(() => { this.axios.get( - process.env.VUE_APP_APIENDPOINT + - process.env.VUE_APP_APIVERSION + + process.env.VUE_APP_API_ENDPOINT + + process.env.VUE_APP_API_VERSION + "/" + "userinfo" ); @@ -178,8 +181,8 @@ export default { localStorage.setItem("lang", this.$i18n.locale); this.axios .put( - process.env.VUE_APP_APIENDPOINT + - process.env.VUE_APP_APIVERSION + + process.env.VUE_APP_API_ENDPOINT + + process.env.VUE_APP_API_VERSION + "/" + "users/preferences", { @@ -189,8 +192,8 @@ export default { .then(() => { this.axios .get( - process.env.VUE_APP_APIENDPOINT + - process.env.VUE_APP_APIVERSION + + process.env.VUE_APP_API_ENDPOINT + + process.env.VUE_APP_API_VERSION + "/" + "userinfo" ) diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 27ff7f2..d95d5a4 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -187,41 +187,9 @@
-
-
-
-
-

{{ $t("errors.emailVerify") }}

-
-
-
-
-
-
-
-
-

- You are using an outdated version of Kaverti, please - refresh.

-
-
-
+ + {{version}} +