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({
|
const axiosInstance = axios.create({
|
||||||
baseURL: process.env.API,
|
baseURL: process.env.API,
|
||||||
timeout: 6000
|
timeout: 10000
|
||||||
});
|
});
|
||||||
console.log("process.env.DEV: "+process.env.DEV);
|
console.log("process.env.DEV: "+process.env.DEV);
|
||||||
console.log("process.env.API: "+process.env.API);
|
console.log("process.env.API: "+process.env.API);
|
||||||
|
|||||||
@ -9,9 +9,9 @@
|
|||||||
<meta name="msapplication-tap-highlight" content="no">
|
<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<% } %>">
|
<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" 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="32x32" href="statics/icons/favicon-32x32.png">-->
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="statics/icons/favicon-16x16.png">
|
<!-- <link rel="icon" type="image/png" sizes="16x16" href="statics/icons/favicon-16x16.png">-->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- DO NOT touch the following DIV -->
|
<!-- DO NOT touch the following DIV -->
|
||||||
|
|||||||
@ -98,7 +98,7 @@
|
|||||||
<q-icon name="list"/>
|
<q-icon name="list"/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<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-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
@ -163,6 +163,7 @@
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
|
|
||||||
<!-- <q-item-->
|
<!-- <q-item-->
|
||||||
<!-- disable-->
|
<!-- disable-->
|
||||||
<!-- class="text-grey-5"-->
|
<!-- class="text-grey-5"-->
|
||||||
@ -173,6 +174,8 @@
|
|||||||
<!-- <q-item-label>dev: {{ clickCounter }} clicks</q-item-label>-->
|
<!-- <q-item-label>dev: {{ clickCounter }} clicks</q-item-label>-->
|
||||||
<!-- </q-item-section>-->
|
<!-- </q-item-section>-->
|
||||||
<!-- </q-item>-->
|
<!-- </q-item>-->
|
||||||
|
|
||||||
|
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-drawer>
|
</q-drawer>
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
max-height="50vh"
|
max-height="50vh"
|
||||||
/>
|
/>
|
||||||
<p class="text-h6">Stationen</p>
|
<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 v-for="(station, index) in computedCache.stationen" :key="index">
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
@ -44,10 +44,10 @@
|
|||||||
<span class="text-grey-8">ID: {{ station.id ? station.id : "keine" }}</span>
|
<span class="text-grey-8">ID: {{ station.id ? station.id : "keine" }}</span>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label lines="1" class="q-mt-xs text-body2">
|
<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>
|
||||||
<q-item-label caption lines="1">
|
<q-item-label caption lines="1">
|
||||||
Code: {{ station.code }}
|
Koordinaten: {{ station.lattitude }}, {{ station.longitude }}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
@ -60,8 +60,9 @@
|
|||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
</q-list>
|
</q-list>
|
||||||
|
<p class=""><b>Hinweis:</b> Ein Cache muss mindestens aus zwei Stationen bestehen (inklusive der Endstation).</p>
|
||||||
<div class="row reverse">
|
<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>
|
</div>
|
||||||
<p class="text-h6">Endstation</p>
|
<p class="text-h6">Endstation</p>
|
||||||
<q-card flat bordered class="rounded-borders">
|
<q-card flat bordered class="rounded-borders">
|
||||||
|
|||||||
@ -82,9 +82,9 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
validationSuccesful() {
|
validationSuccesful() {
|
||||||
if (this.validateUsername(this.user.name)
|
if (this.user.name.length >= 2
|
||||||
&& this.validateEmail(this.user.email)
|
&& 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.length >= 8
|
||||||
&& this.user.password === this.user.checkpassword) {
|
&& this.user.password === this.user.checkpassword) {
|
||||||
return true;
|
return true;
|
||||||
@ -102,7 +102,7 @@
|
|||||||
},
|
},
|
||||||
register: function () {
|
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 = {
|
const data = {
|
||||||
name: this.user.name,
|
name: this.user.name,
|
||||||
password: this.user.password,
|
password: this.user.password,
|
||||||
@ -126,7 +126,7 @@
|
|||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
if (response.status === 201) {
|
if (response.status === 201) {
|
||||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
||||||
message: "Deine Registrierung war erfolgreich!",
|
message: "Deine Registrierung war erfolgreich! Du bist jetzt eingeloggt.",
|
||||||
title: "Registrierungsprozess",
|
title: "Registrierungsprozess",
|
||||||
color: "blue"
|
color: "blue"
|
||||||
});
|
});
|
||||||
|
|||||||
@ -50,8 +50,8 @@
|
|||||||
latlang: "",
|
latlang: "",
|
||||||
station: {
|
station: {
|
||||||
description: "Rätsel, Aufgabe und Informationen zur Station.",
|
description: "Rätsel, Aufgabe und Informationen zur Station.",
|
||||||
lattitude: "0.000",
|
lattitude: 49.1474082,
|
||||||
longitude: "0.000",
|
longitude: 9.2065282,
|
||||||
solution: "",
|
solution: "",
|
||||||
code: ""
|
code: ""
|
||||||
},
|
},
|
||||||
|
|||||||
@ -37,8 +37,8 @@
|
|||||||
latlang: "",
|
latlang: "",
|
||||||
station: {
|
station: {
|
||||||
description: "Beschreibung",
|
description: "Beschreibung",
|
||||||
lattitude: "0.000",
|
lattitude: 49.1474082,
|
||||||
longitude: "0.000",
|
longitude: 9.2065282,
|
||||||
solution: "",
|
solution: "",
|
||||||
code: ""
|
code: ""
|
||||||
},
|
},
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
import qrscanner from "../components/qrscanner";
|
import qrscanner from "../components/qrscanner";
|
||||||
export default {
|
export default {
|
||||||
name: "Station",
|
name: "Station",
|
||||||
components: {qrscanner},
|
components: { qrscanner },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
cacheID: "",
|
cacheID: "",
|
||||||
|
|||||||
@ -11,8 +11,8 @@
|
|||||||
indicator-color="cyan-14"
|
indicator-color="cyan-14"
|
||||||
switch-indicator
|
switch-indicator
|
||||||
>
|
>
|
||||||
<q-tab name="solo" label="Solo-Cacher" icon="person"/>
|
<q-tab name="solo" label="Solo" icon="person"/>
|
||||||
<q-tab name="team" label="Cacher-Team" icon="group"/>
|
<q-tab name="team" label="Team" icon="group"/>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
<q-separator color="grey-4"/>
|
<q-separator color="grey-4"/>
|
||||||
</div>
|
</div>
|
||||||
@ -86,26 +86,6 @@
|
|||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
this.rankinglist = response.data;
|
this.rankinglist = response.data;
|
||||||
}).catch((error) => {
|
}).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() {
|
fetchTeamRankinglist() {
|
||||||
@ -115,27 +95,19 @@
|
|||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
this.teamRankinglist = response.data;
|
this.teamRankinglist = response.data;
|
||||||
}).catch((error) => {
|
}).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 = {
|
state.endStation = {
|
||||||
description: "Endstation",
|
description: "Endstation",
|
||||||
longitude: 0.000,
|
lattitude: 49.1474082,
|
||||||
lattitude: 0.000,
|
longitude: 9.2065282,
|
||||||
solution: "",
|
solution: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("resetted new Cache");
|
console.log("resetted new Cache");
|
||||||
|
|||||||
@ -12,8 +12,8 @@ export default {
|
|||||||
tempStation: {},
|
tempStation: {},
|
||||||
endStation: {
|
endStation: {
|
||||||
description: "Endstation",
|
description: "Endstation",
|
||||||
longitude: 0.000,
|
lattitude: 49.1474082,
|
||||||
lattitude: 0.000,
|
longitude: 9.2065282,
|
||||||
solution: "",
|
solution: "",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user