From 73fca4ff515f45be874555a52b18d99a97d511a1 Mon Sep 17 00:00:00 2001 From: Bytetrex Date: Fri, 9 Apr 2021 14:01:28 +0800 Subject: [PATCH] muhahahhaa --- src/App.vue | 42 +- src/assets/css/kaverti.css | 6 +- src/components/Navbar.vue | 816 ++++++++++++++++++------------------- src/main.js | 117 +++--- src/views/Forums.vue | 4 +- src/views/Home.vue | 2 +- src/views/Settings.vue | 4 +- src/views/Teams.vue | 7 +- src/views/Transaction.vue | 247 ++++++----- src/views/User.vue | 4 +- src/views/Users.vue | 7 +- 11 files changed, 647 insertions(+), 609 deletions(-) diff --git a/src/App.vue b/src/App.vue index 9b8e771..7e4cd28 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,28 +20,30 @@ export default { Footer, }, mounted() { - if (JSON.parse(localStorage.getItem("token"))) { - this.$store.commit("setToken", JSON.parse(localStorage.getItem("token"))); + const jwt = localStorage.getItem("token"); + const wind = localStorage.getItem("wind404"); + + if (token) { + this.$store.commit("setToken", token); } - if (JSON.parse(localStorage.getItem("wind404"))) { - var wind = JSON.parse(localStorage.getItem("wind404")); + + if (wind) { + this.$store.commit("setWind", wind); } else { - // eslint-disable-next-line no-redeclare - var wind = false; + this.$store.commit("setWind", wind); } - this.$store.commit("setWind", wind); - Object.assign(axios.defaults, { - headers: { Authorization: this.$store.state.user.token }, - }); + if (this.$store.state.debug) { this.$buefy.snackbar.open({ message: this.$t("errors.devBuild"), type: "is-warning", }); } - this.axios + + if (this.$store.state.user.username) { + this.axios .get( - process.env.VUE_APP_APIENDPOINT + + process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + "/" + "userinfo" @@ -63,12 +65,14 @@ export default { type: "is-warning", }); }); - this.axios.get( - process.env.VUE_APP_APIENDPOINT + - process.env.VUE_APP_APIVERSION + - "/" + - "awards/eligibility" - ); + + this.axios.get( + process.env.VUE_APP_APIENDPOINT + + process.env.VUE_APP_APIVERSION + + "/" + + "awards/eligibility" + ); + } }, }; @@ -79,6 +83,6 @@ export default { \ No newline at end of file diff --git a/src/assets/css/kaverti.css b/src/assets/css/kaverti.css index f6755e1..014f85a 100644 --- a/src/assets/css/kaverti.css +++ b/src/assets/css/kaverti.css @@ -5,7 +5,11 @@ } main { - flex: 1 !important + flex: 1 !important; +} + +.container { + max-width: 960px !important; } .large-icon { diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index f0af266..179e8a7 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -1,11 +1,11 @@ diff --git a/src/views/User.vue b/src/views/User.vue index c53ecf5..11c8f20 100644 --- a/src/views/User.vue +++ b/src/views/User.vue @@ -3,7 +3,7 @@
-
+

{{ user.username }} 

-
+

{{ $t("user.more") }} {{ user.username }}

diff --git a/src/views/Users.vue b/src/views/Users.vue index 8df6362..85e94d4 100644 --- a/src/views/Users.vue +++ b/src/views/Users.vue @@ -3,9 +3,10 @@
-
-
- +
+
+ +