Improvements

This commit is contained in:
Troplo 2021-04-10 18:10:14 +10:00
parent 122183496e
commit 2b93390b32
35 changed files with 304 additions and 171 deletions

8
.env
View file

@ -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"
VUE_APP_VERSION=[AIV]{version}[/AIV]
VUE_APP_BUILD_DATE=[AIV]{date}[/AIV]

View file

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

3
.gitignore vendored
View file

@ -28,3 +28,6 @@ pnpm-debug.log*
# Yarn and NPM
.yarn
# Vue
vue.config.js

View file

@ -1,6 +1,6 @@
{
"name": "kaverti-frontend",
"version": "",
"version": "1.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

View file

@ -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"
)

View file

@ -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);

View file

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

View file

@ -0,0 +1,83 @@
<template>
<div class="banners">
<section
v-if="!$store.state.user.emailVerified && $store.state.user.username"
class="hero is-danger"
>
<div class="hero-body" style="padding: 1rem 1rem !important">
<div class="mobile-container">
<div class="container">
<p style="text-align: center">{{ $t("errors.emailVerify") }}</p>
</div>
</div>
</div>
</section>
<section
v-if="!$store.state.client.secure && !$store.state.client.development"
class="hero is-danger"
>
<div class="hero-body" style="padding: 1rem 1rem !important">
<div class="mobile-container">
<div class="container">
<p style="text-align: center">Kaverti is being accessed insecurely, Authentication will be disabled.</p>
</div>
</div>
</div>
</section>
<section
v-if="
$store.state.client.clientVersion !==
$store.state.client.latestClientVersion && showOutdatedBanner && $store.state.client.latestClientVersion
"
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>
</div>
</template>
<script>
export default {
name: "Banners",
data() {
return {
showOutdatedBanner: true,
showBanner: true
}
},
methods: {
toggleBrokenRoute(val) {
this.$store.commit("brokenRoute", val);
},
getBannerId() {
this.showBanner = !localStorage.getItem(this.$store.state.client.bannerId);
},
updateDismissed() {
localStorage.setItem(
"update-" + this.$store.state.client.clientVersion,
true
);
this.updateModal = false;
},
removeBannerId() {
localStorage.setItem(this.$store.state.client.bannerId, true);
this.$store.state.client.bannerEnabled = false;
console.log(localStorage.getItem(this.$store.state.client.bannerId));
},
}
}
</script>

View file

@ -102,6 +102,9 @@
</div>
</b-modal>
<h1>&copy; 2021 Kaverti</h1>
<p>Version: {{$store.state.client.clientVersion}}</p>
<p>Build Date: {{$store.state.client.buildDate}}</p>
<p v-if="$store.state.client.development">!! DEVELOPMENT MODE !! {{$store.state.client.domain}}</p>
<div class="buttons">
<b-button type="is-info" @click="langModal = true">{{ $t("languages.title") }}</b-button>
<b-button type="is-info" @click="feedbackModal = true">Provide Feedback</b-button>
@ -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"
)

View file

@ -187,41 +187,9 @@
</div>
</form>
</b-modal>
<section
v-if="!$store.state.user.emailVerified && $store.state.user.username"
class="hero is-danger"
>
<div class="hero-body" style="padding: 1rem 1rem !important">
<div class="mobile-container">
<div class="container">
<p style="text-align: center">{{ $t("errors.emailVerify") }}</p>
</div>
</div>
</div>
</section>
<section
v-if="
$store.state.client.clientVersion !==
$store.state.client.latestClientVersion && showOutdatedBanner && $store.state.client.latestClientVersion
"
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>
<Banners> </Banners>
{{version}}
<b-navbar>
<template #brand>
<b-navbar-item tag="router-link" :to="{ path: '/' }">
@ -385,7 +353,11 @@
<script>
import AjaxErrorHandler from ".././assets/js/errorHandler";
import axios from "axios";
import Banners from "./Banners"
export default {
components: {
Banners
},
data() {
return {
loginModal: false,
@ -459,8 +431,8 @@ export default {
doRegister() {
this.register.loading = true;
this.axios
.post(process.env.VUE_APP_APIENDPOINT +
process.env.VUE_APP_APIVERSION + "/passkey/register", {
.post(process.env.VUE_APP_API_ENDPOINT +
process.env.VUE_APP_API_VERSION + "/passkey/register", {
username: this.register.username,
password: this.register.password,
email: this.register.email,
@ -495,8 +467,8 @@ export default {
doLogin() {
this.login.loading = true;
this.axios
.post(process.env.VUE_APP_APIENDPOINT +
process.env.VUE_APP_APIVERSION + "/users/login", {
.post(process.env.VUE_APP_API_ENDPOINT +
process.env.VUE_APP_API_VERSION + "/users/login", {
username: this.login.username,
password: this.login.password,
})
@ -512,8 +484,8 @@ export default {
this.loginModal = false;
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"
)
@ -542,8 +514,8 @@ export default {
AjaxErrorHandler(this.$store)(e);
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"
)
@ -582,8 +554,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"
)
@ -619,8 +591,8 @@ export default {
dailyReward(notify) {
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 +
"/" +
"users/reward"
)
@ -634,8 +606,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 +
"/" +
"kaverti/state"
)
@ -652,8 +624,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"
)
@ -685,8 +657,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 +
"/" +
"kaverti/state"
)
@ -703,8 +675,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"
)
@ -734,8 +706,8 @@ export default {
this.showUpdate();
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 +
"/" +
"relationships/getAllPendingCanAccept"
)

View file

@ -113,7 +113,7 @@ export default {
this.loading = true;
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + `/` + `users/conversations`, { params })
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + `/` + `users/conversations`, { params })
.then(res => {
this.loading = false;
this.$store.commit('addConversations', res.data.Conversations);

View file

@ -22,7 +22,7 @@ const nprogress = new NProgress();
Vue.use(
new VueSocketIO({
debug: true,
connection: io(process.env.VUE_APP_GATEWAYENDPOINT), // options object is Optional
connection: io(process.env.VUE_APP_GATEWAY_ENDPOINT), // options object is Optional
})
);
Vue.use(VMdEditor);

View file

@ -10,7 +10,7 @@ export default new Vuex.Store({
wind: false,
enableBrokenRoutes: false,
client: {
clientVersion: '1.0.0-prerelease4',
clientVersion: process.env.VUE_APP_VERSION,
latestClientVersion: '',
latestAPIVersion: '',
bannerText: '',
@ -20,7 +20,11 @@ export default new Vuex.Store({
name: "Kaverti",
logo: '',
icon: '',
release: process.env.VUE_APP_RELEASE
release: process.env.VUE_APP_RELEASE,
development: window.location.hostname === 'dev.kaverti.flowinity' || window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1',
secure: window.location.protocol === "https:",
domain: window.location.hostname,
buildDate: process.env.VUE_APP_BUILD_DATE
},
errors: {
errors: null,

View file

@ -103,7 +103,7 @@ export default {
data.append('image', this.item.file);
data.append('fileObj', this.item.fileObj);
this.axios.post(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'marketplace/preview/' + this.createType, data)
this.axios.post(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'marketplace/preview/' + this.createType, data)
.then((res) => {
this.loadingPreview = false
this.preview = res.data.image
@ -125,10 +125,10 @@ export default {
data.append('onSalePrice', this.item.onSalePrice);
data.append('limited', this.item.limited);
data.append('quantityAllowed', this.item.quantity);
this.axios.post(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'marketplace/upload/' + this.createType, data)
this.axios.post(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'marketplace/upload/' + this.createType, data)
.then((res) => {
this.loading = false
this.axios.put(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'marketplace/rerender/' + res.data.id)
this.axios.put(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'marketplace/rerender/' + res.data.id)
}).catch((e) => {
this.loading = false
AjaxErrorHandler(this.$store)(e)

View file

@ -61,7 +61,7 @@ export default {
refresh() {
this.refreshAvatarLoading = true
this.axios
.post(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'users/render/refresh')
.post(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'users/render/refresh')
.then(() => {
this.refreshAvatarLoading = false
})
@ -76,7 +76,7 @@ export default {
getItems() {
this.loading = true;
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'inventory/' + this.category)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'inventory/' + this.category)
.then(res => {
this.items = res.data.rows;
this.count = res.data.count

View file

@ -147,7 +147,7 @@ export default {
if(name.length) {
this.axios
.put(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + `/` + `chat/conversation/${this.$route.params.id}/name`, { name })
.put(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + `/` + `chat/conversation/${this.$route.params.id}/name`, { name })
.then(res => {
this.name = name;
res
@ -189,7 +189,7 @@ export default {
this.loading = true;
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + `/` + `chat/conversation/${this.$route.params.id}?page=${this.page}`)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + `/` + `chat/conversation/${this.$route.params.id}?page=${this.page}`)
.then(res => {
this.loading = false;
this.showModal = false;

View file

@ -53,8 +53,8 @@ export default {
},
authTest() {
this.axios
.get(process.env.VUE_APP_APIENDPOINT +
process.env.VUE_APP_APIVERSION + "/userinfo/auth")
.get(process.env.VUE_APP_API_ENDPOINT +
process.env.VUE_APP_API_VERSION + "/userinfo/auth")
.then(() => {
this.$buefy.snackbar.open({
message: this.$t("errors.authSuccess"),

View file

@ -238,7 +238,7 @@ export default {
this.thread = []
}
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'forums/thread/' + this.$route.params.id)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'forums/thread/' + this.$route.params.id)
.then((res) => {
if(initial) {
this.thread = res.data

View file

@ -126,8 +126,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 +
"/" +
"forums/category/" +
this.selectedCategory
@ -163,8 +163,8 @@ export default {
mounted() {
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 +
`/` +
"forums/category"
)

View file

@ -81,7 +81,7 @@ export default {
methods: {
removeFriend(user) {
this.axios
.put(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'relationships/remove', {
.put(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'relationships/remove', {
friend: user.friend2.username
})
.then(() => {
@ -95,7 +95,7 @@ export default {
},
doRelationshipAccept(user) {
this.axios
.put(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'relationships/accept', {
.put(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'relationships/accept', {
friend: user.friend2.username
})
.then(() => {
@ -110,7 +110,7 @@ export default {
getItems() {
this.loading = true;
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'relationships/getAll/' + this.category)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'relationships/getAll/' + this.category)
.then(res => {
this.friends = res.data.rows;
this.count = res.data.count;

View file

@ -147,8 +147,8 @@ export default {
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 +
`/` +
`wall/post`,
{
@ -172,8 +172,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 +
`/` +
`user/GlobalWall?wall=true&offset=` +
this.wallOffset
@ -193,8 +193,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 +
`/` +
`blog/posts`
)

View file

@ -161,7 +161,7 @@ export default {
this.offset = 0
this.paginate = true
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'marketplace/' + this.category + '?search=' + this.search + '&offset=' + this.offset)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'marketplace/' + this.category + '?search=' + this.search + '&offset=' + this.offset)
.then(res => {
this.items = res.data.Items
this.loading = false
@ -177,7 +177,7 @@ export default {
this.wait = true
}
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'marketplace/' + this.category + '?offset=' + this.offset)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'marketplace/' + this.category + '?offset=' + this.offset)
.then(res => {
if(res.data.length < this.limit) {
this.offset = null;

View file

@ -101,13 +101,13 @@ export default {
},
mounted() {
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + `/` + `marketplace/view/${this.$route.params.id}`)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + `/` + `marketplace/view/${this.$route.params.id}`)
.then(res => this.item = res.data, this.loading = false)
.catch((e) => {
AjaxErrorHandler(this.$store)(e)
})
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + `/` + `marketplace/check/${this.$route.params.id}`)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + `/` + `marketplace/check/${this.$route.params.id}`)
.then(res => this.purchased = res.data.purchased)
}
}

View file

@ -154,13 +154,13 @@ export default {
methods: {
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')
this.axios.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'kaverti/state')
.then(res => {
this.$store.commit('setSettings', res.data.state)
this.$store.commit('setVersion', res.data.state.latestCanaryVersion)
this.$store.commit('setAPIVersion', res.data.apiVersion)
})
this.axios.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'userinfo')
this.axios.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'userinfo')
.then(res => {
this.$store.commit('setUsername', res.data.username)
this.$store.commit('setEmail', res.data.email)
@ -185,8 +185,8 @@ export default {
},
doInit() {
this.register.init.loading = true
this.axios.post(process.env.VUE_APP_APIENDPOINT +
process.env.VUE_APP_APIVERSION + '/passkey/register', {
this.axios.post(process.env.VUE_APP_API_ENDPOINT +
process.env.VUE_APP_API_VERSION + '/passkey/register', {
username: this.register.init.username,
password: this.register.init.password,
email: this.register.init.email,
@ -207,8 +207,8 @@ export default {
},
doInfo() {
this.register.personal.loading = true
this.axios.put(process.env.VUE_APP_APIENDPOINT +
process.env.VUE_APP_APIVERSION + '/users/preferences', {
this.axios.put(process.env.VUE_APP_API_ENDPOINT +
process.env.VUE_APP_API_VERSION + '/users/preferences', {
description: this.register.personal.description
}).then(() => {
this.getInfo()
@ -222,8 +222,8 @@ export default {
},
doTheme(theme) {
this.register.customization.loading = true
this.axios.put(process.env.VUE_APP_APIENDPOINT +
process.env.VUE_APP_APIVERSION + '/users/preferences', {
this.axios.put(process.env.VUE_APP_API_ENDPOINT +
process.env.VUE_APP_API_VERSION + '/users/preferences', {
theme: theme
}).then(() => {
this.getInfo()

View file

@ -84,8 +84,8 @@ export default {
this.settings.description.loading = true;
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",
{
description: this.settings.description.value,
@ -105,8 +105,8 @@ export default {
this.settings.preferences.loading = true;
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",
{
developerMode: this.settings.preferences.developerMode,
@ -115,8 +115,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"
)
.then((res) => {

View file

@ -75,7 +75,7 @@ export default {
}
},
mounted() {
this.axios.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'kaverti/stats')
this.axios.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'kaverti/stats')
.then(res => {
this.users = res.data.users
this.posts = res.data.posts

View file

@ -145,7 +145,7 @@ export default {
this.wait = true
}
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'teams/' + '?offset=' + this.offset)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + '/' + 'teams/' + '?offset=' + this.offset)
.then(res => {
if(res.data < this.limit) {
this.offset = null;

View file

@ -131,8 +131,8 @@ export default {
if (this.offset === null) return;
let url =
process.env.VUE_APP_APIENDPOINT +
process.env.VUE_APP_APIVERSION +
process.env.VUE_APP_API_ENDPOINT +
process.env.VUE_APP_API_VERSION +
`/` +
`transactions?
sort=${this.tableSort.column}
@ -178,8 +178,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 +
"/" +
"transactions" +
"?limit=" +

View file

@ -224,8 +224,8 @@ export default {
fetchData() {
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 +
`/` +
`user/${this.$route.params.username}`
)
@ -243,8 +243,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 +
`/` +
"relationships/get/" +
this.$route.params.username
@ -254,8 +254,8 @@ export default {
scrubDesc() {
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 +
"/" +
"admin/user/scrub",
{
@ -271,8 +271,8 @@ export default {
refreshAvatar() {
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 +
"/" +
"admin/user/avatar",
{
@ -287,8 +287,8 @@ export default {
scrubUsername() {
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 +
"/" +
"admin/user/scrub",
{
@ -305,8 +305,8 @@ export default {
this.relationships.type === "";
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 +
`/` +
`relationships/get/${this.$route.params.username}`
)
@ -315,8 +315,8 @@ export default {
removeFriend() {
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 +
"/" +
"relationships/remove",
{
@ -328,8 +328,8 @@ export default {
this.description.loading = false;
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 +
`/` +
`relationships/get/${this.$route.params.username}`
)
@ -356,8 +356,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 +
`/` +
`relationships/get/${this.$route.params.username}`
)
@ -379,8 +379,8 @@ export default {
doRelationship() {
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 +
"/" +
"relationships/send",
{
@ -392,8 +392,8 @@ export default {
this.description.loading = false;
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 +
`/` +
`relationships/get/${this.$route.params.username}`
)
@ -417,8 +417,8 @@ export default {
AjaxErrorHandler(this.$store)(e);
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 +
`/` +
`relationships/get/${this.$route.params.username}`
)
@ -439,8 +439,8 @@ export default {
doRelationshipAccept() {
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 +
"/" +
"relationships/accept",
{
@ -452,8 +452,8 @@ export default {
this.description.loading = false;
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 +
`/` +
`relationships/get/${this.$route.params.username}`
)
@ -479,8 +479,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 +
`/` +
`relationships/get/${this.$route.params.username}`
)
@ -517,8 +517,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 +
`/` +
`user/${this.$route.params.username}`
)
@ -526,8 +526,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 +
`/` +
`relationships/get/${this.$route.params.username}`
)

View file

@ -34,7 +34,7 @@ export default {
},
mounted() {
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + `/` + `user/${this.$route.params.username}?awards=true`)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + `/` + `user/${this.$route.params.username}?awards=true`)
.then(res => {
this.awards = res.data
})

View file

@ -27,7 +27,7 @@ export default {
},
mounted() {
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + `/` + 'relationships/user/' + this.$route.params.username)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + `/` + 'relationships/user/' + this.$route.params.username)
.then(res => {
this.friends = res.data
})

View file

@ -33,7 +33,7 @@ export default {
},
mounted() {
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + `/` + `user/${this.$route.params.username}?sort=username&order=desc&offset=234243&inventory=true`)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + `/` + `user/${this.$route.params.username}?sort=username&order=desc&offset=234243&inventory=true`)
.then(res => {
this.inventory = res.data.Inventories
})

View file

@ -80,7 +80,7 @@ export default {
this.$store.dispatch('setTitle', this.$route.params.username + ' - Posts')
this.axios
.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + `/` + `user/${this.$route.params.username}?posts=true`)
.get(process.env.VUE_APP_API_ENDPOINT + process.env.VUE_APP_API_VERSION + `/` + `user/${this.$route.params.username}?posts=true`)
.then(res => {
this.posts = res.data.Posts
this.nextURL = res.data.meta.nextURL

View file

@ -165,8 +165,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 +
"/" +
"user/" +
"?offset=" +

66
vue.config.example.js Normal file
View file

@ -0,0 +1,66 @@
const Dotenv = require('dotenv-webpack');
var WebpackAutoInject = require('webpack-auto-inject-version');
const fs = require("fs");
module.exports = {
devServer: {
proxy: 'http://localhost:23981',
//disableHostCheck: true, // dev.kaverti.flowinity
//host: 'dev.kaverti.flowinity',
/*
https: {
cert: fs.readFileSync('C:/ssl/troplo/certificate.crt'),
key: fs.readFileSync('C:/ssl/troplo/private.key'),
}
*/
},
publicPath: '/',
productionSourceMap: false,
configureWebpack: {
plugins: [
new Dotenv(),
new WebpackAutoInject({
// specify the name of the tag in the outputed files eg
// bundle.js: [SHORT] Version: 0.13.36 ...
SHORT: 'Kaverti AIV',
SILENT: false,
PACKAGE_JSON_PATH: './package.json',
PACKAGE_JSON_INDENT: 4,
components: {
AutoIncreaseVersion: true,
InjectAsComment: true,
InjectByTag: true
},
componentsOptions: {
AutoIncreaseVersion: {
runInWatchMode: true // it will increase version with every single build!
},
InjectAsComment: {
tag: 'Kaverti Version: {version}, Build Date: {date}',
dateFormat: 'dd/mm/yyyy; hh:MM:ss TT', // change timezone: `UTC:h:MM:ss` or `GMT:h:MM:ss`
multiLineCommentType: false, // use `/** */` instead of `//` as comment block
},
InjectByTag: {
fileRegex: /\.+/,
AIVTagRegexp: /(\[AIV])(([a-zA-Z{} ,:;!()_@\-"'\\\/])+)(\[\/AIV])/g,
dateFormat: 'dd/mm/yyyy; hh:MM:ss TT'
}
},
LOGS_TEXT: {
AIS_START: 'Kaverti AIV started'
}
})
]
},
pluginOptions: {
i18n: {
locale: 'en',
fallbackLocale: 'debug',
localeDir: 'locales',
enableInSFC: false
}
}
}