Merge branch 'frontend/kathy' into frontend/timo
# Conflicts: # frontend/src/pages/CacheStart.vue
This commit is contained in:
commit
b4057e9c85
@ -43,6 +43,20 @@
|
|||||||
<q-item-label>Startseite</q-item-label>
|
<q-item-label>Startseite</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
<q-item
|
||||||
|
clickable
|
||||||
|
class="text-primary"
|
||||||
|
v-ripple
|
||||||
|
tag="a"
|
||||||
|
to="/qr-scanner"
|
||||||
|
>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon name="camera"/>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>QR-Code Scanner</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
class="text-primary"
|
class="text-primary"
|
||||||
|
|||||||
@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
<div class="column q-gutter-y-md">
|
<div class="column q-gutter-y-md">
|
||||||
<q-btn unelevated v-if="IsLoggedIn" color="primary" label="Zur Rangliste" to="/ranking/"/>
|
<q-btn unelevated v-if="IsLoggedIn" color="primary" label="Zur Rangliste" to="/ranking/"/>
|
||||||
<q-btn unelevated v-if="isLoggedIn" color="primary" label="Zur Belohnung" @click="reward = true">
|
<q-btn unelevated v-if="isLoggedIn" color="primary" label="Zur Belohnung" @click="reward = true" />
|
||||||
<q-dialog v-model="reward">
|
<q-dialog v-model="reward">
|
||||||
<q-card>
|
<q-card>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="text-h6">Jetzt ist eine gute Zeit, etwas Neues zu beginnen.</div>
|
<div class="text-h6">Jetzt ist eine gute Zeit, etwas Neues zu beginnen.</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
<q-btn unelevated color="primary" label="Zur Startseite" to="/"/>
|
<q-btn unelevated color="primary" label="Zur Startseite" to="/"/>
|
||||||
</div>
|
</div>
|
||||||
@ -25,15 +25,21 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
reward: false,
|
reward: false,
|
||||||
|
cacheID: "",
|
||||||
|
cacheName: "",
|
||||||
|
rankingPoints: "",
|
||||||
end1: "Gut gemacht, Du hast alle Stationen dieses Cache gefunden. Dir wurden ",
|
end1: "Gut gemacht, Du hast alle Stationen dieses Cache gefunden. Dir wurden ",
|
||||||
end2: " Punkte gutgeschrieben." //TODO Punkte wirklich gutschreiben, ggf. Cache auf erledigt setzen
|
end2: " Punkte gutgeschrieben." //TODO Punkte wirklich gutschreiben, ggf. Cache auf erledigt setzen
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isLoggedIn() {
|
isLoggedIn() {
|
||||||
return this.$store.getters['auth/GET_ADMINSTATE']; //TODO Methode umschreiben
|
return localStorage.getItem('userToken'); //TODO Methode umschreiben --> funktioniert das?
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchData();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchData() {
|
fetchData() {
|
||||||
this.$axios.get('/api/allCaches')
|
this.$axios.get('/api/allCaches')
|
||||||
@ -43,10 +49,11 @@
|
|||||||
console.log(this.data);
|
console.log(this.data);
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
const cache = response.data.find(cache => cache.id === Number(this.$route.params.cache));
|
const cache = response.data.find(cache => cache.id === Number(this.$route.params.cache));
|
||||||
this.data.cacheName = cache.name;
|
this.cacheName = cache.name;
|
||||||
this.data.cachePoints = cache.rankingPoints;
|
this.rankingPoints = cache.rankingPoints;
|
||||||
|
this.cacheID = this.$route.params.cache;
|
||||||
})
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -23,9 +23,6 @@
|
|||||||
</qrcode-drop-zone>
|
</qrcode-drop-zone>
|
||||||
</div>
|
</div>
|
||||||
<qrcode-capture v-if="noStreamApiSupport" @decode="onDecode"/>
|
<qrcode-capture v-if="noStreamApiSupport" @decode="onDecode"/>
|
||||||
<p class="decode-result">Last result: <b>{{ result }}</b></p>
|
|
||||||
<p class="validating">Validating: <b>{{ validating }}</b></p>
|
|
||||||
<p class="validating">is Valid: <b>{{ isValid }}</b></p>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -16,9 +16,9 @@ const routes = [
|
|||||||
children: [{ path: "", component: () => import("pages/Cache.vue") }]
|
children: [{ path: "", component: () => import("pages/Cache.vue") }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/qr-code-test/",
|
path: "/qr-scanner/",
|
||||||
component: () => import("layouts/MyLayout.vue"),
|
component: () => import("layouts/MyLayout.vue"),
|
||||||
children: [{ path: "", component: () => import("pages/qr-code-test.vue") }]
|
children: [{ path: "", component: () => import("pages/qr-scanner.vue") }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/cache/:id",
|
path: "/cache/:id",
|
||||||
@ -55,6 +55,11 @@ const routes = [
|
|||||||
component: () => import("layouts/MyLayout.vue"),
|
component: () => import("layouts/MyLayout.vue"),
|
||||||
children: [{ path: "", component: () => import("pages/CacheStart.vue") }]
|
children: [{ path: "", component: () => import("pages/CacheStart.vue") }]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/CacheEnd/:cache/",
|
||||||
|
component: () => import("layouts/MyLayout.vue"),
|
||||||
|
children: [{ path: "", component: () => import("pages/CacheEnd.vue") }]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/profile/",
|
path: "/profile/",
|
||||||
component: () => import("layouts/MyLayout.vue"),
|
component: () => import("layouts/MyLayout.vue"),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user