Compare commits
3 Commits
16bdebf796
...
mongodb-6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25be34d9c7 | ||
|
|
2abc46216d | ||
|
|
dbefc505dd |
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"backend_de": "http://localhost:31204",
|
"backend_dev": "http://localhost:31204",
|
||||||
"backend_dev": "https://webplay.rocks",
|
"backend_de": "https://webplay.rocks",
|
||||||
"backend": "https://webplay.rocks"
|
"backend": "https://webplay.rocks"
|
||||||
}
|
}
|
||||||
@@ -3,13 +3,19 @@ import axios from 'axios'
|
|||||||
export default {
|
export default {
|
||||||
checkIfInstanceIsNew(context) {
|
checkIfInstanceIsNew(context) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
axios.get(context.rootGetters.server + "/api/system/setup").then((res) => {
|
axios
|
||||||
if (res.status == 200) {
|
.get(context.rootGetters.server + "/api/system/setup")
|
||||||
resolve(true);
|
.then((res) => {
|
||||||
} else {
|
console.log(res.status);
|
||||||
resolve(false);
|
if (res.status == 200) {
|
||||||
}
|
resolve(true);
|
||||||
});
|
} else {
|
||||||
|
resolve(false);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadClientConfigs(context) {
|
loadClientConfigs(context) {
|
||||||
|
|||||||
@@ -10,11 +10,13 @@ export default {
|
|||||||
load(context) {
|
load(context) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
axios.get(context.rootGetters.server + "/api/user/login", context.rootGetters.headers).then((res) => {
|
axios.get(context.rootGetters.server + "/api/user/login", context.rootGetters.headers).then((res) => {
|
||||||
|
console.log(res.data);
|
||||||
context.commit("load", res.data);
|
context.commit("load", res.data);
|
||||||
context.rootState["player"].shuffle = res.data.player.shuffle;
|
context.rootState["player"].shuffle = res.data.player.shuffle;
|
||||||
context.rootState["player"].repeatType = res.data.player.repeat;
|
context.rootState["player"].repeatType = res.data.player.repeat;
|
||||||
resolve();
|
resolve();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
console.log("error")
|
||||||
context.commit("resetToken");
|
context.commit("resetToken");
|
||||||
reject(err);
|
reject(err);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
<div id="welcomeLeft" class="flex-column grow">
|
<div id="welcomeLeft" class="flex-column grow">
|
||||||
<div id="banner" class="center flex-column shadow">
|
<div id="banner" class="center flex-column shadow">
|
||||||
<div id="collage">
|
<div id="collage">
|
||||||
<svg width="100%" height="100%" viewBox="20 20 700 100">
|
<svg width="100%" height="100%" viewBox="20 40 600 100">
|
||||||
<g>
|
<g>
|
||||||
<animateTransform id="animY1" attributeName="transform" type="translate" begin="0s; animY2.end" from="-40 -60" to="-10 -20" dur="30s" />
|
<animateTransform id="animY1" attributeName="transform" type="translate" begin="0s; animY2.end" from="0 -140" to="-20 -60" dur="30s" />
|
||||||
<animateTransform id="animY2" attributeName="transform" type="translate" begin="animY1.end" from="-10 -20" to="-40 -60" dur="30s" />
|
<animateTransform id="animY2" attributeName="transform" type="translate" begin="animY1.end" from="-20 -60" to="0 -140" dur="30s" />
|
||||||
|
|
||||||
<image :xlink:href="item.covers.cover64" :x="Math.floor(i / 4) * 64" :y="i % 4 * 64" width="64" height="64" v-for="(item, i) in randomCovers" :key="item" />
|
<image :xlink:href="item.covers.cover64" :x="Math.floor(i / 6) * 64" :y="i % 6 * 64" width="64" height="64" v-for="(item, i) in randomCovers" :key="item" />
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
@@ -113,7 +113,7 @@ export default {
|
|||||||
this.$store.dispatch("tracks/loadMostListened");
|
this.$store.dispatch("tracks/loadMostListened");
|
||||||
this.$store.dispatch("videos/loadMostViewed");
|
this.$store.dispatch("videos/loadMostViewed");
|
||||||
if (this.randomCovers.length == 0) {
|
if (this.randomCovers.length == 0) {
|
||||||
this.$store.dispatch("albums/loadRandomCovers", 48);
|
this.$store.dispatch("albums/loadRandomCovers", 60);
|
||||||
this.$store.dispatch("albums/loadAlbums", true);
|
this.$store.dispatch("albums/loadAlbums", true);
|
||||||
this.$store.dispatch("artists/loadArtists", true);
|
this.$store.dispatch("artists/loadArtists", true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,13 +123,17 @@ export default {
|
|||||||
checkTocken() {
|
checkTocken() {
|
||||||
let token = localStorage.getItem("token");
|
let token = localStorage.getItem("token");
|
||||||
if (token) {
|
if (token) {
|
||||||
|
console.log("hello token")
|
||||||
this.$store.dispatch("user/setToken", token);
|
this.$store.dispatch("user/setToken", token);
|
||||||
|
console.log("hello token; user/load")
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch("user/load")
|
.dispatch("user/load")
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
console.log("user loaded")
|
||||||
this.goto();
|
this.goto();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
console.log("user not loaded")
|
||||||
console.log(err);
|
console.log(err);
|
||||||
this.checkIfNewBackend();
|
this.checkIfNewBackend();
|
||||||
});
|
});
|
||||||
@@ -157,6 +161,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkIfNewBackend() {
|
checkIfNewBackend() {
|
||||||
|
console.log("check new instance")
|
||||||
this.$store.dispatch("checkIfInstanceIsNew").then((res) => {
|
this.$store.dispatch("checkIfInstanceIsNew").then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.$router.replace("setup");
|
this.$router.replace("setup");
|
||||||
|
|||||||
Reference in New Issue
Block a user