diff --git a/frontend/src/pages/CacheStart.vue b/frontend/src/pages/CacheStart.vue index 5880e30..9c525c3 100644 --- a/frontend/src/pages/CacheStart.vue +++ b/frontend/src/pages/CacheStart.vue @@ -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; diff --git a/frontend/src/pages/StationView.vue b/frontend/src/pages/StationView.vue index a7a7845..1a0ee7a 100644 --- a/frontend/src/pages/StationView.vue +++ b/frontend/src/pages/StationView.vue @@ -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) {