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 @@
-
-
- +
+
+ +