diff --git a/frontend/quasar.conf.js b/frontend/quasar.conf.js index ec9e8bf..4df0238 100644 --- a/frontend/quasar.conf.js +++ b/frontend/quasar.conf.js @@ -109,14 +109,14 @@ module.exports = function (ctx) { }, env: ctx.dev ? { // Base URL for API-Calls: DEV - //API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19geocaching') API: JSON.stringify('http://localhost:8080'), + // API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19geocaching'), USER_API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19usermanagement') } : { // Base URL for API-Calls: PRODUCTION (build) - API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19geocaching'), + API: JSON.stringify('http://localhost:8080'), + //API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19geocaching'), USER_API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19usermanagement') - //API: JSON.stringify('http://localhost:8080') } }, diff --git a/frontend/src/boot/qr-scanner.js b/frontend/src/boot/qr-scanner.js index 9660d77..193e1ff 100644 --- a/frontend/src/boot/qr-scanner.js +++ b/frontend/src/boot/qr-scanner.js @@ -1,5 +1,5 @@ import VueQrcodeReader from "vue-qrcode-reader"; -// import qrscanner from "../components/qr-scanner"; +// import qrscanner from "../components/qrscanner"; // "async" is optional export default async ({ Vue }) => { diff --git a/frontend/src/components/qrscanner.vue b/frontend/src/components/qrscanner.vue new file mode 100644 index 0000000..a2abe74 --- /dev/null +++ b/frontend/src/components/qrscanner.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/frontend/src/layouts/MyLayout.vue b/frontend/src/layouts/MyLayout.vue index 943c3f7..23d2b46 100644 --- a/frontend/src/layouts/MyLayout.vue +++ b/frontend/src/layouts/MyLayout.vue @@ -52,7 +52,7 @@ to="/qr-scanner" > - + QR-Code Scanner @@ -73,6 +73,7 @@ - + Meine Caches @@ -131,6 +132,23 @@ + + + + + Logout + + + - {{ loginText }} + Login @@ -177,22 +195,10 @@ name: "MyLayout", data() { return { - // dialog: { - // color: this, - // show: true, - // message: "Hallo Fehler! Dies ist ein Beispiel Fehler." - // }, leftDrawerOpen: this.$q.platform.is.desktop, - //menuButtonVisible: !this.$q.platform.is.desktop, - //leftDrawerOpen: true, - //miniState: true }; }, computed: { - loginText() { - let text = this.$store.state.auth.isAuthenticated ? "Logout" : "Login"; - return text; - }, dialogShow: { get() { // console.log("get dialogShow: "+this.$store.state.dialog.dialog.show) @@ -228,12 +234,25 @@ }, } }, + created() { + this.evalAuthentication(); + }, methods: { //openURL dialogClose() { console.log("dialogClose(): ") this.$store.commit('dialog/RESET_MESSAGE_DIALOG'); }, + evalAuthentication: function () { + this.$store.commit('auth/SET_AUTHENTICATED'); + // this.$store.commit('auth/SET_USER'); + }, + logout: function () { + console.log("logout()"); + console.log(JSON.parse(localStorage.getItem('userToken'))); + localStorage.removeItem('userToken'); + this.evalAuthentication(); + }, } }; diff --git a/frontend/src/pages/Cache.vue b/frontend/src/pages/Cache.vue index 183e401..42c9e40 100644 --- a/frontend/src/pages/Cache.vue +++ b/frontend/src/pages/Cache.vue @@ -210,6 +210,7 @@ this.$store.commit('cacheCollector/RESET_NEW_CACHE'); this.$router.push({path: '/overview'}); }).catch((error) => { + //TODO: Fehlermeldungen // Error let msg; let title; diff --git a/frontend/src/pages/CacheEnd.vue b/frontend/src/pages/CacheEnd.vue index 7ba09e1..93e4f8c 100644 --- a/frontend/src/pages/CacheEnd.vue +++ b/frontend/src/pages/CacheEnd.vue @@ -2,23 +2,15 @@

{{ cacheName }}

-

{{ end1 + rankingPoints + end2 }}

+

Herzlichen Glückwunsch!

+

Du hast alle Stationen gefunden und diesen Cache damit erfolgreich abgeschlossen!

+

Dir wurden {{ rankingPoints }} Punkte gutgeschrieben.

+

Deine Belohnung:

+

- - - - - -
Deine Belohnung:
-
- - -
{{ cache.reward.rewardDescription }}
-
-
-
- + +
@@ -28,21 +20,15 @@ export default { data() { return { - reward: false, cacheID: "", cacheName: "", cache: { reward: "", }, rankingPoints: "", - end1: "Gut gemacht, Du hast alle Stationen dieses Cache gefunden. Dir wurden ", - end2: " Punkte gutgeschrieben." //TODO Punkte wirklich gutschreiben, ggf. Cache auf erledigt setzen } }, computed: { - isLoggedIn() { - return localStorage.getItem('userToken'); //TODO Methode umschreiben --> funktioniert das? - } }, created() { this.fetchData(); diff --git a/frontend/src/pages/CacheStart.vue b/frontend/src/pages/CacheStart.vue index 9c525c3..635b544 100644 --- a/frontend/src/pages/CacheStart.vue +++ b/frontend/src/pages/CacheStart.vue @@ -4,59 +4,30 @@ class="q-mb-md " :ratio="16/9" src="https://www.buga2019.de/we-bilder/3.Gartenausstellung/Gelaendeplan/190320_Gelaendeplan-quadratisch.jpg" + v-if="!cameraActive" > -
+

{{ cacheName }}

{{ instruction }}

-
-
-

Um den QR-Code scannen zu können, müssen Sie den Zugriff auf Ihre Kamera erlauben.

- - -
-
- - -
-
-
- -
-
-
-
- -
+
diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index 56efa31..ec2a41d 100644 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -30,6 +30,7 @@ color="primary" class="full-width" @click="login" + @keyup.enter="login" unelevated > diff --git a/frontend/src/pages/qr-generator.vue b/frontend/src/pages/qr-generator.vue new file mode 100644 index 0000000..5138ed4 --- /dev/null +++ b/frontend/src/pages/qr-generator.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/frontend/src/pages/qr-scanner.vue b/frontend/src/pages/qr-scanner.vue index e111c73..e5859f3 100644 --- a/frontend/src/pages/qr-scanner.vue +++ b/frontend/src/pages/qr-scanner.vue @@ -1,148 +1,29 @@