cacheview now properly loads new data
This commit is contained in:
parent
57c62d421d
commit
1f2ee957e8
@ -67,8 +67,6 @@
|
||||
this.$axios.get('/api/allCaches')
|
||||
.then((response) => {
|
||||
console.log("/api/allCaches");
|
||||
console.log(JSON.stringify(this.data));
|
||||
console.log(this.data);
|
||||
console.log(response.data);
|
||||
const cache = response.data.find(cache => cache.id === Number(this.$route.params.cache));
|
||||
this.cacheName = cache.name;
|
||||
|
||||
@ -74,16 +74,40 @@
|
||||
|
||||
}
|
||||
},
|
||||
beforeRouteUpdate (to, from, next) {
|
||||
console.log("beforeRouteUpdate: reset data and fetch");
|
||||
this.cacheID = "";
|
||||
this.cacheName = "";
|
||||
this.cache = {
|
||||
name: "",
|
||||
stationen: [],
|
||||
};
|
||||
this.station = {};
|
||||
this.askForPermission = true;
|
||||
this.activateCamera = false;
|
||||
this.isValid = false;
|
||||
this.validating = false;
|
||||
this.loading = false;
|
||||
this.paused = false;
|
||||
this.result = null;
|
||||
this.params = null;
|
||||
this.noStreamApiSupport = false;
|
||||
|
||||
this.fetchData();
|
||||
next()
|
||||
},
|
||||
created: function () {
|
||||
console.log("StationView: ");
|
||||
// console.log("'id' from url: " + this.$route.params.id)
|
||||
// console.log("'cache' from url: " + this.$route.params.cache)
|
||||
console.log("StationView: created!");
|
||||
console.log("'id' from url: " + this.$route.params.id);
|
||||
console.log("'cache' from url: " + this.$route.params.cache);
|
||||
this.fetchData();
|
||||
},
|
||||
beforeMount: function () {
|
||||
},
|
||||
mounted: function () {
|
||||
},
|
||||
updated: function () {
|
||||
},
|
||||
computed: {
|
||||
showCacheProgress() {
|
||||
if (this.cache !== null) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user