diff --git a/frontend/src/components/qrscanner.vue b/frontend/src/components/qrscanner.vue
index 07bced0..048a997 100644
--- a/frontend/src/components/qrscanner.vue
+++ b/frontend/src/components/qrscanner.vue
@@ -21,6 +21,10 @@
+
+
+
@@ -118,9 +122,18 @@
if (localStorage.getItem('userToken')) {
params.token = JSON.parse(localStorage.getItem('userToken')).token;
}
+ this.updateProps()
+ console.log("emitted params!")
return params;
},
+ updateProps() {
+ this.$emit('result', this.params)
+ },
+ updateCameraState() {
+ this.$emit('camera', this.activateCamera)
+ },
+
pauseCamera() {
this.paused = true
},
@@ -130,7 +143,11 @@
},
toggleCamera(bool) {
- this.activateCamera = bool
+ this.activateCamera = bool;
+ if (this.askForPermission === false) {
+ this.askForPermission = true;
+ }
+ this.updateCameraState();
},
logErrors(promise) {
@@ -151,6 +168,18 @@
}
}
},
+ beforeRouteUpdate(to, from, next) {
+ 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;
+ next()
+ },
}
diff --git a/frontend/src/pages/StationView.vue b/frontend/src/pages/StationView.vue
index 1a0ee7a..5c36651 100644
--- a/frontend/src/pages/StationView.vue
+++ b/frontend/src/pages/StationView.vue
@@ -4,11 +4,12 @@
class="q-mb-md "
:ratio="16/9"
src="https://www.buga2019.de/we-bilder/3.Gartenausstellung/Gelaendeplan/190320_Gelaendeplan-quadratisch.jpg"
+ v-if="!cameraActive"
>
-
+
{{ cache.name }}
Station {{ showCacheProgress }}
-
+
{{ station.description }}
@@ -17,64 +18,31 @@
-
-
Um den QR-Code scannen zu können, müssen Sie den Zugriff auf Ihre Kamera erlauben.
-
-
-
-
-
+