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-section>
|
||||
</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
|
||||
clickable
|
||||
class="text-primary"
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
|
||||
<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 Belohnung" @click="reward = true">
|
||||
<q-btn unelevated v-if="isLoggedIn" color="primary" label="Zur Belohnung" @click="reward = true" />
|
||||
<q-dialog v-model="reward">
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<div class="text-h6">Jetzt ist eine gute Zeit, etwas Neues zu beginnen.</div>
|
||||
</q-card-section>
|
||||
</card>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-btn unelevated color="primary" label="Zur Startseite" to="/"/>
|
||||
</div>
|
||||
@ -25,15 +25,21 @@
|
||||
data() {
|
||||
return {
|
||||
reward: false,
|
||||
cacheID: "",
|
||||
cacheName: "",
|
||||
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 this.$store.getters['auth/GET_ADMINSTATE']; //TODO Methode umschreiben
|
||||
return localStorage.getItem('userToken'); //TODO Methode umschreiben --> funktioniert das?
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData();
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.$axios.get('/api/allCaches')
|
||||
@ -43,10 +49,11 @@
|
||||
console.log(this.data);
|
||||
console.log(response.data);
|
||||
const cache = response.data.find(cache => cache.id === Number(this.$route.params.cache));
|
||||
this.data.cacheName = cache.name;
|
||||
this.data.cachePoints = cache.rankingPoints;
|
||||
this.cacheName = cache.name;
|
||||
this.rankingPoints = cache.rankingPoints;
|
||||
this.cacheID = this.$route.params.cache;
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -23,9 +23,6 @@
|
||||
</qrcode-drop-zone>
|
||||
</div>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
@ -16,9 +16,9 @@ const routes = [
|
||||
children: [{ path: "", component: () => import("pages/Cache.vue") }]
|
||||
},
|
||||
{
|
||||
path: "/qr-code-test/",
|
||||
path: "/qr-scanner/",
|
||||
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",
|
||||
@ -55,6 +55,11 @@ const routes = [
|
||||
component: () => import("layouts/MyLayout.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/",
|
||||
component: () => import("layouts/MyLayout.vue"),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user