diff --git a/.env b/.env index 6fa3219..e334ed2 100644 --- a/.env +++ b/.env @@ -1,7 +1,7 @@ VUE_APP_APIENDPOINT=/api/ VUE_APP_APIVERSION=v1 -VUE_APP_GATEWAYENDPOINT=https://gateway.kaverti.com -VUE_APP_STAGING=false +VUE_APP_GATEWAYENDPOINT=/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 diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 30bf446..02db076 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -218,6 +218,19 @@ + + + + + You are using an outdated version of Kaverti, please refresh. + + + + @@ -253,6 +266,7 @@ {{$t('navbar.dev.debug')}} {{$t('navbar.dev.fakeUser')}} + {{$t('navbar.dev.brokenRoute')}} @@ -271,7 +285,7 @@ - + {{$store.state.user.koins}} @@ -297,6 +311,7 @@ {{$t('navbar.user.avatar')}} {{$t('navbar.user.creations')}} {{$t('navbar.user.downloads')}} + {{$t('navbar.user.admin')}} 1 {{$t('navbar.user.friends')}} {{$t('navbar.user.logout')}} @@ -337,6 +352,7 @@ export default { loading: true, settingsModal: false, showBanner: true, + showOutdatedBanner: true, friendCount: 0, settings: { tab: 0, @@ -447,6 +463,9 @@ export default { }, }, methods: { + toggleBrokenRoute (val) { + this.$store.commit('brokenRoute', val) + }, savePref() { this.preferences.error = '' this.preferences.loading = true @@ -604,13 +623,22 @@ export default { this.$buefy.snackbar.open(`WARNING: You have fake authenticated, you do not have authenticated API access. Use for debug purposes only.`) Object.assign(axios.defaults, {headers: {Authorization: this.$store.state.user.token}}) }, + dailyReward() { + this.axios.get( + process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'users/reward' + ).then(res => { + this.$store.commit('setKoins', res.data.koins) + }).catch(e => { + AjaxErrorHandler(this.$store)(e) + }) + }, getInfo() { Object.assign(axios.defaults, {headers: {Authorization: this.$store.state.user.token}}) this.axios.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'kaverti/state') .then(res => { - this.$store.commit('setSettings', res.data) - this.$store.commit('setVersion', res.data.latestCanaryVersion) - this.$store.commit('setAPIVersion', res.data.latestAPIVersion) + this.$store.commit('setSettings', res.data.state) + this.$store.commit('setVersion', res.data.state.latestCanaryVersion) + this.$store.commit('setAPIVersion', res.data.apiVersion) }).catch(() => { this.$buefy.snackbar.open({message:this.$t('errors.down'), type: 'is-info'}) }) @@ -637,9 +665,9 @@ export default { Object.assign(axios.defaults, {headers: {Authorization: this.$store.state.user.token}}) this.axios.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'kaverti/state') .then(res => { - this.$store.commit('setSettings', res.data) - this.$store.commit('setVersion', res.data.latestCanaryVersion) - this.$store.commit('setAPIVersion', res.data.latestAPIVersion) + this.$store.commit('setSettings', res.data.state) + this.$store.commit('setVersion', res.data.state.latestCanaryVersion) + this.$store.commit('setAPIVersion', res.data.apiVersion) }).catch(() => { this.$buefy.snackbar.open({message:this.$t('errors.down'), type: 'is-info'}) }) @@ -662,6 +690,7 @@ export default { console.log(this.getBannerId()) }) if(this.$store.state.username) { + this.dailyReward() this.axios.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'relationships/getAllPendingCanAccept') .then(res => { this.friendCount = res.data.count diff --git a/src/locales/en.json b/src/locales/en.json index c6c2aad..fd185ff 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -124,6 +124,7 @@ "transactions": "Transactions", "settings": "Settings", "logout": "Logout", + "admin": "Admin", "friends": "Friends" }, "more": { @@ -256,6 +257,15 @@ "wind": "Windspeak", "debug": "Debug" }, + "admin": { + "title": "Kaverti Admin", + "dashboard": "Dashboard (SOON)", + "uploadItem": "Create Hat", + "executive": { + "title": "Executive Staff", + "soon": "(SOON)" + } + }, "currency": "Koins", "close": "Close", "tos": "Terms of Service", diff --git a/src/store/index.js b/src/store/index.js index 00a8af1..e57de21 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -14,6 +14,7 @@ export default new Vuex.Store({ state: { debug: tb(process.env.VUE_APP_STAGING), wind: false, + enableBrokenRoutes: false, client: { clientVersion: '1.0.0-prerelease', latestClientVersion: '', @@ -135,6 +136,9 @@ export default new Vuex.Store({ }, setDescription (state, value) { state.user.description = value + }, + brokenRoute(state, value) { + state.enableBrokenRoutes = value } }, actions: { diff --git a/src/views/AdminCreateItem.vue b/src/views/AdminCreateItem.vue index e3632e8..066ff4a 100644 --- a/src/views/AdminCreateItem.vue +++ b/src/views/AdminCreateItem.vue @@ -62,8 +62,9 @@ Preview Image - + Press preview to preview the hat as if it were uploaded on the Marketplace. + Please validate to make sure all information is correct, your item will automatically be approved. diff --git a/src/views/Forums.vue b/src/views/Forums.vue index 5a77f82..e764563 100644 --- a/src/views/Forums.vue +++ b/src/views/Forums.vue @@ -1,5 +1,5 @@ - + Create thread @@ -53,19 +53,15 @@ {{thread.Posts[0].plainText}} - - - Created at: - - - - - + + Created At: {{thread.createdAt}} + + This route has been disabled, enable Broken Routes in Developer Options
You are using an outdated version of Kaverti, please refresh.
Created at: