Merge branch 'frontend/timo' into develop
# Conflicts: # frontend/src/pages/Register.vue
This commit is contained in:
commit
2cacf050be
@ -2,7 +2,7 @@ import axios from "axios";
|
||||
|
||||
const axiosInstance = axios.create({
|
||||
baseURL: process.env.API,
|
||||
timeout: 6000
|
||||
timeout: 10000
|
||||
});
|
||||
console.log("process.env.DEV: "+process.env.DEV);
|
||||
console.log("process.env.API: "+process.env.API);
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova) { %>, viewport-fit=cover<% } %>">
|
||||
|
||||
<link rel="icon" href="statics/quasar-logo.png" type="image/x-icon">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="statics/icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="statics/icons/favicon-16x16.png">
|
||||
<link rel="icon" href="statics/buga_logo.svg" type="image/x-icon">
|
||||
<!-- <link rel="icon" type="image/png" sizes="32x32" href="statics/icons/favicon-32x32.png">-->
|
||||
<!-- <link rel="icon" type="image/png" sizes="16x16" href="statics/icons/favicon-16x16.png">-->
|
||||
</head>
|
||||
<body>
|
||||
<!-- DO NOT touch the following DIV -->
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
<q-icon name="list"/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>Rangliste</q-item-label>
|
||||
<q-item-label>Top 10 Rangliste</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
@ -163,6 +163,7 @@
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
|
||||
<!-- <q-item-->
|
||||
<!-- disable-->
|
||||
<!-- class="text-grey-5"-->
|
||||
@ -173,6 +174,8 @@
|
||||
<!-- <q-item-label>dev: {{ clickCounter }} clicks</q-item-label>-->
|
||||
<!-- </q-item-section>-->
|
||||
<!-- </q-item>-->
|
||||
|
||||
|
||||
</q-list>
|
||||
</q-drawer>
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
max-height="50vh"
|
||||
/>
|
||||
<p class="text-h6">Stationen</p>
|
||||
<q-list bordered separator class="rounded-borders">
|
||||
<q-list bordered separator class="rounded-borders" v-if="computedCache.stationen.length > 0">
|
||||
|
||||
<q-item v-for="(station, index) in computedCache.stationen" :key="index">
|
||||
<q-item-section avatar>
|
||||
@ -44,10 +44,10 @@
|
||||
<span class="text-grey-8">ID: {{ station.id ? station.id : "keine" }}</span>
|
||||
</q-item-label>
|
||||
<q-item-label lines="1" class="q-mt-xs text-body2">
|
||||
<span class="cursor-pointer">{{ station.description }}</span>
|
||||
<span class="cursor-pointer" v-html="station.description"></span>
|
||||
</q-item-label>
|
||||
<q-item-label caption lines="1">
|
||||
Code: {{ station.code }}
|
||||
Koordinaten: {{ station.lattitude }}, {{ station.longitude }}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@ -60,8 +60,9 @@
|
||||
</q-item>
|
||||
|
||||
</q-list>
|
||||
<p class=""><b>Hinweis:</b> Ein Cache muss mindestens aus zwei Stationen bestehen (inklusive der Endstation).</p>
|
||||
<div class="row reverse">
|
||||
<q-btn @click="addStation" unelevated color="primary" label="Station hinzufügen" icon-right="add"/>
|
||||
<q-btn @click="addStation" class="full-width" unelevated color="primary" label="Station hinzufügen" icon-right="add"/>
|
||||
</div>
|
||||
<p class="text-h6">Endstation</p>
|
||||
<q-card flat bordered class="rounded-borders">
|
||||
|
||||
@ -82,9 +82,9 @@
|
||||
},
|
||||
computed: {
|
||||
validationSuccesful() {
|
||||
if (this.validateUsername(this.user.name)
|
||||
if (this.user.name.length >= 2
|
||||
&& this.validateEmail(this.user.email)
|
||||
&& this.user.email.toLowerCase() === this.user.checkemail.toLowerCase()
|
||||
&& this.user.email === this.user.checkemail
|
||||
&& this.user.password.length >= 8
|
||||
&& this.user.password === this.user.checkpassword) {
|
||||
return true;
|
||||
@ -102,7 +102,7 @@
|
||||
},
|
||||
register: function () {
|
||||
|
||||
if (this.user.email.toLowerCase() === this.user.checkemail.toLowerCase() && this.user.password === this.user.checkpassword) {
|
||||
if (this.user.email === this.user.checkemail && this.user.password === this.user.checkpassword) {
|
||||
const data = {
|
||||
name: this.user.name,
|
||||
password: this.user.password,
|
||||
@ -126,7 +126,7 @@
|
||||
console.log(response.data);
|
||||
if (response.status === 201) {
|
||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
||||
message: "Deine Registrierung war erfolgreich!",
|
||||
message: "Deine Registrierung war erfolgreich! Du bist jetzt eingeloggt.",
|
||||
title: "Registrierungsprozess",
|
||||
color: "blue"
|
||||
});
|
||||
|
||||
@ -50,8 +50,8 @@
|
||||
latlang: "",
|
||||
station: {
|
||||
description: "Rätsel, Aufgabe und Informationen zur Station.",
|
||||
lattitude: "0.000",
|
||||
longitude: "0.000",
|
||||
lattitude: 49.1474082,
|
||||
longitude: 9.2065282,
|
||||
solution: "",
|
||||
code: ""
|
||||
},
|
||||
|
||||
@ -37,8 +37,8 @@
|
||||
latlang: "",
|
||||
station: {
|
||||
description: "Beschreibung",
|
||||
lattitude: "0.000",
|
||||
longitude: "0.000",
|
||||
lattitude: 49.1474082,
|
||||
longitude: 9.2065282,
|
||||
solution: "",
|
||||
code: ""
|
||||
},
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
import qrscanner from "../components/qrscanner";
|
||||
export default {
|
||||
name: "Station",
|
||||
components: {qrscanner},
|
||||
components: { qrscanner },
|
||||
data() {
|
||||
return {
|
||||
cacheID: "",
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
indicator-color="cyan-14"
|
||||
switch-indicator
|
||||
>
|
||||
<q-tab name="solo" label="Solo-Cacher" icon="person"/>
|
||||
<q-tab name="team" label="Cacher-Team" icon="group"/>
|
||||
<q-tab name="solo" label="Solo" icon="person"/>
|
||||
<q-tab name="team" label="Team" icon="group"/>
|
||||
</q-tabs>
|
||||
<q-separator color="grey-4"/>
|
||||
</div>
|
||||
@ -86,26 +86,6 @@
|
||||
console.log(response.data);
|
||||
this.rankinglist = response.data;
|
||||
}).catch((error) => {
|
||||
// Error
|
||||
let msg;
|
||||
let title;
|
||||
if (error.response) {
|
||||
// The request was made and the server responded with a status code
|
||||
title = "Problem with response!";
|
||||
msg = error.response;
|
||||
} else if (error.request) {
|
||||
// The request was made but no response was received
|
||||
title = "Problem with request!";
|
||||
msg = "Error occured due to wrong server request!"
|
||||
console.log(error.request);
|
||||
} else {
|
||||
// Something happened in setting up the request that triggered an Error
|
||||
title = "Error";
|
||||
msg = error.message;
|
||||
console.log('Error', error.message);
|
||||
}
|
||||
console.log(error.config);
|
||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: msg, title: title, });
|
||||
})
|
||||
},
|
||||
fetchTeamRankinglist() {
|
||||
@ -115,27 +95,19 @@
|
||||
console.log(response.data);
|
||||
this.teamRankinglist = response.data;
|
||||
}).catch((error) => {
|
||||
// Error
|
||||
let msg;
|
||||
let title;
|
||||
if (error.response) {
|
||||
// The request was made and the server responded with a status code
|
||||
title = "Problem with response!";
|
||||
msg = error.response;
|
||||
} else if (error.request) {
|
||||
// The request was made but no response was received
|
||||
title = "Problem with request!";
|
||||
msg = "Error occured due to wrong server request!"
|
||||
console.log(error.request);
|
||||
} else {
|
||||
// Something happened in setting up the request that triggered an Error
|
||||
title = "Error";
|
||||
msg = error.message;
|
||||
console.log('Error', error.message);
|
||||
}
|
||||
console.log(error.config);
|
||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: msg, title: title, });
|
||||
})
|
||||
},
|
||||
calculateRank() {
|
||||
// TODO
|
||||
// let rank = 0;
|
||||
// let lastSum = null;
|
||||
// const rankinglistCopy = this.rankinglist;
|
||||
// for (let i = rankinglistCopy.length-1; i >= 0; i--) {
|
||||
// if (lastSum === null || ranking.rankingPointsSum >= lastSum) {
|
||||
// rank++;
|
||||
// }
|
||||
// lastSum = ranking.rankingPointsSum;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.0 KiB |
@ -47,9 +47,9 @@ export const RESET_NEW_CACHE = (state) => {
|
||||
};
|
||||
state.endStation = {
|
||||
description: "Endstation",
|
||||
longitude: 0.000,
|
||||
lattitude: 0.000,
|
||||
solution: "",
|
||||
lattitude: 49.1474082,
|
||||
longitude: 9.2065282,
|
||||
solution: "",
|
||||
};
|
||||
|
||||
console.log("resetted new Cache");
|
||||
|
||||
@ -12,8 +12,8 @@ export default {
|
||||
tempStation: {},
|
||||
endStation: {
|
||||
description: "Endstation",
|
||||
longitude: 0.000,
|
||||
lattitude: 0.000,
|
||||
lattitude: 49.1474082,
|
||||
longitude: 9.2065282,
|
||||
solution: "",
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user