updated
This commit is contained in:
parent
e1369dfab5
commit
4d414d28dd
7 changed files with 62 additions and 21 deletions
4
.env
4
.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"
|
|
@ -218,6 +218,19 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section v-if='$store.state.client.clientVersion !== $store.state.client.latestClientVersion && showOutdatedBanner' class="hero is-warning">
|
||||
<div class="hero-body" style="padding: 1rem 1rem !important;">
|
||||
<div class="mobile-container">
|
||||
<div class="container">
|
||||
<p style="text-align: center;">You are using an outdated version of Kaverti, please refresh.<button
|
||||
type="button"
|
||||
class="delete"
|
||||
style="float: right;"
|
||||
@click="showOutdatedBanner = false"/></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<b-navbar>
|
||||
<template #brand>
|
||||
<b-navbar-item tag="router-link" :to="{ path: '/' }">
|
||||
|
@ -253,6 +266,7 @@
|
|||
<div class="navbar-dropdown">
|
||||
<b-navbar-item tag="router-link" to="/debug">{{$t('navbar.dev.debug')}}</b-navbar-item>
|
||||
<b-navbar-item @click="fakeUser()">{{$t('navbar.dev.fakeUser')}}</b-navbar-item>
|
||||
<b-navbar-item @click="toggleBrokenRoute(true)">{{$t('navbar.dev.brokenRoute')}}</b-navbar-item>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="$store.state.debug" class="navbar-item has-dropdown is-hoverable is-info">
|
||||
|
@ -271,7 +285,7 @@
|
|||
</template>
|
||||
|
||||
<template #end>
|
||||
<b-navbar-item v-if="$store.state.user.username && !loading">
|
||||
<b-navbar-item v-if="$store.state.user.username && !loading" @click="dailyReward">
|
||||
<img src="https://cdn.kaverti.com/icons/koins.svg">{{$store.state.user.koins}}
|
||||
</b-navbar-item>
|
||||
<div v-if="!loading">
|
||||
|
@ -297,6 +311,7 @@
|
|||
<b-navbar-item tag="router-link" to="/character">{{$t('navbar.user.avatar')}}</b-navbar-item>
|
||||
<b-navbar-item tag="router-link" to="/creations">{{$t('navbar.user.creations')}}</b-navbar-item>
|
||||
<b-navbar-item tag="router-link" to="/downloads">{{$t('navbar.user.downloads')}}</b-navbar-item>
|
||||
<b-navbar-item tag="router-link" to="/admin" v-if="$store.state.user.admin">{{$t('navbar.user.admin')}}</b-navbar-item>
|
||||
<b-navbar-item tag="router-link" to="/friends"><b-tag class="is-info" rounded> 1</b-tag> {{$t('navbar.user.friends')}}</b-navbar-item>
|
||||
<b-navbar-item @click="logout()">{{$t('navbar.user.logout')}}</b-navbar-item>
|
||||
</div>
|
||||
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -62,8 +62,9 @@
|
|||
</div>
|
||||
<div class="column is-5">
|
||||
<h1 class="title">Preview Image</h1>
|
||||
<img :src="'https://cdn.kaverti.com/marketplace/previews/' + preview" v-if="preview">
|
||||
<img :src="'https://cdn.kaverti.com/marketplace/previews/' + preview + '.png'" v-if="preview">
|
||||
<h1 class="subtitle" v-if="!preview">Press preview to preview the hat as if it were uploaded on the Marketplace.</h1>
|
||||
<h1 class="subtitle">Please validate to make sure all information is correct, your item will automatically be approved.</h1>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<main class="section">
|
||||
<main class="section" v-if="$store.state.enableBrokenRoutes">
|
||||
<div class="columns is-multiline has-text-centered">
|
||||
<div class="column is-2" v-if="!loadingCategory && categories.length">
|
||||
<b-button class="is-info">Create thread</b-button>
|
||||
|
@ -53,19 +53,15 @@
|
|||
{{thread.Posts[0].plainText}}
|
||||
</p>
|
||||
</div>
|
||||
<nav class="level is-mobile">
|
||||
<div class="level-left">
|
||||
<p>Created at:</p>
|
||||
<div class="media-left">
|
||||
Created At: {{thread.createdAt}}
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="media-right">
|
||||
<button class="delete"></button>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" v-if="!$store.state.enableBrokenRoutes">This route has been disabled, enable Broken Routes in Developer Options</div>
|
||||
</main>
|
||||
</template>
|
||||
<script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<main>
|
||||
<main class="section">
|
||||
<div class="columns is-multiline" v-if="!loading">
|
||||
<div v-if="!users.length" class="column">
|
||||
<br>
|
||||
|
@ -9,7 +9,8 @@
|
|||
<div class="column is-3" v-for='(user) in users' :key='"user-" + user.id'>
|
||||
<div class="box">
|
||||
<h1 class="title">{{user.username}} <Badges :username="user.username" :system="user.system" :hidden="user.hidden" :admin="user.admin" :booster="user.booster" :bot="user.bot"></Badges></h1>
|
||||
<img :src="'https://cdn.kaverti.com/user/avatars/full/' + user.picture + '.png'">
|
||||
<img :src="'https://cdn.kaverti.com/user/avatars/full/' + user.picture + '.png'"><br>
|
||||
<b-button tag="router-link" :to='"/u/" + user.username' class="is-centered is-info">View Profile</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue