Merge branch 'dev' into feature/4-component-interpolation

This commit is contained in:
niggl committed 2021-03-09 16:53:45 +00:00
commit 9da54d15bf
5 files changed
+95 -65

No files matched your search

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><path d="M307.18 117.6c21.3 1.09 42.83 9.39 57.52 22 46.68 39.91 40.22 110.84 5.81 156.19-33.82 44.58-91.54 70.06-147.13 68a153 153 0 01-48.79-9.79c-27.05-10.33-62.88-30.25-73.29-59.11-12.52-34.72 23.7-41.72 47.84-32.89 19.42 7.12 39 19.43 60.05 9.57 23.33-10.91 35.2-36.06 36.4-60.82 1.3-26.77-13.13-55.71 10.43-77.1 13.63-12.33 32.31-17.01 51.16-16.05z" fill="#407bff"/><path d="M307.18 117.6c21.3 1.09 42.83 9.39 57.52 22 46.68 39.91 40.22 110.84 5.81 156.19-33.82 44.58-91.54 70.06-147.13 68a153 153 0 01-48.79-9.79c-27.05-10.33-62.88-30.25-73.29-59.11-12.52-34.72 23.7-41.72 47.84-32.89 19.42 7.12 39 19.43 60.05 9.57 23.33-10.91 35.2-36.06 36.4-60.82 1.3-26.77-13.13-55.71 10.43-77.1 13.63-12.33 32.31-17.01 51.16-16.05z" fill="#fff" opacity=".9"/><ellipse cx="250" cy="416.24" rx="193.89" ry="11.32" fill="#f5f5f5"/><path fill="#407bff" d="M259.8 382.52H79.91L63.12 316H243l16.8 66.52z"/><path fill="#407bff" d="M242.79 316H62.9l-16.8 66.52h179.89l16.8-66.52z"/><path style="isolation:isolate" fill="#fff" opacity=".6" d="M242.79 316H62.9l-16.8 66.52h179.89l16.8-66.52z"/><path fill="#407bff" d="M449.92 382.52H270.03L253.24 316h179.88l16.8 66.52z"/><path fill="#407bff" d="M432.91 316H253.02l-16.8 66.52h179.89l16.8-66.52z"/><path style="isolation:isolate" fill="#fff" opacity=".6" d="M432.91 316H253.02l-16.8 66.52h179.89l16.8-66.52z"/><g><path d="M266 176a11.19 11.19 0 00-11.52-6.35c-9 .83-17.67 12.16-25.83 9.83S221.5 172 221.5 172s-3 7.39 7.17 13.6 24-9.46 35.48-4.8z" fill="#2e353a"/><path d="M266 176a14.65 14.65 0 00-12.52-9.39c-9.62-.75-15.25 11.41-22.62 9.39" fill="none" stroke="#263238" stroke-linecap="round" stroke-linejoin="round" stroke-width=".48"/><path d="M288.12 189.65s3.42-14.12-8.43-17-17.19 4.1-19.19 11.79 3 18.4 13.77 16.63 13.42-8.07 13.85-11.42z" fill="#2e353a"/><path d="M292.51 211.59c9.74-4.53 22.54-14.45 22.3-18.06s-10.06-27.9-10.06-27.9a7.65 7.65 0 01-2.26-1.08c-1-.72-2.17-9.66-.72-10.14a44.09 44.09 0 017.49-1.21c1.2 0 .72 8 .24 9.9 0 0 15.58 21.72 14.55 32.12s-25.18 28.47-33.63 31 2.09-14.63 2.09-14.63zM186.81 329.9l2.76-5.88 8.63 2.88 7.92 2.66-2.14 7.51-9.1-3.79-8.07-3.38z" fill="#e4897b"/><path d="M190.54 322.94c.64.32-3.61 8-3.61 8s-7.29 2.56-10.64 6.79-5 .23-2.46-5.09l6.17-13.11c1.79-3.78 3.89.1 10.54 3.41z" fill="#2e353a"/><path d="M183.72 335.61a.55.55 0 01-.18 0 .84.84 0 01-.76-.59c-.28-1.1 2.2-3.2 2.7-3.61a.19.19 0 01.1-.05.34.34 0 01.14.05c.07.07 1.61 1.61 1.55 2.9a1.37 1.37 0 01-.51 1 .8.8 0 01-.92.2c-.4-.22-.56-1-.6-1.79a3.62 3.62 0 01-1 1.69 1 1 0 01-.52.2zm1.55-3.43c-1.05.94-2.17 2.19-2 2.71 0 0 .05.18.4.25a.5.5 0 00.38-.1c.56-.42 1-1.88 1.22-2.86zm.54-.07c-.11 1.39 0 2.82.33 3 .1.06.29-.08.39-.16a.9.9 0 00.35-.68 3.92 3.92 0 00-1.07-2.16z" fill="#407bff"/><path style="isolation:isolate" opacity=".2" d="M194.7 333.19l3.34-6.36 8 2.69-2.1 7.53-9.24-3.86z"/><path d="M288.12 290.82c-3.62 15.68-19.81 69.19-45 67.19S199.5 342.15 199 335.83s1.44-9.8 7.72-9.82 24.71 5.64 32.74 5.07S255 296.41 255 296.41z" fill="#407bff"/><path d="M288.12 290.82c-3.62 15.68-19.81 69.19-45 67.19S199.5 342.15 199 335.83s1.44-9.8 7.72-9.82 24.71 5.64 32.74 5.07S255 296.41 255 296.41z" style="isolation:isolate" opacity=".4"/><path fill="#e4897b" d="M352.37 403.04l-5.97 2.58-4.56-7.88-4.18-7.23 6.58-4.21 4.3 8.86 3.83 7.88z"/><path d="M345 405.79c-.27-.66 8-3.64 8-3.64s7.15 2.91 12.47 2 3.87 3.11-1.53 5.44l-13.34 5.76c-3.84 1.65-2.85-2.68-5.6-9.56z" fill="#2e353a"/><path d="M355 402.91a5.6 5.6 0 00-.61.09h-.13a.68.68 0 01-.21-.11v-.08a.08.08 0 000-.06v-.06s.05-.06.05-.09c0-.09-.11-2.27.79-3.2a1.33 1.33 0 011.07-.42q.68 0 .84.45c.16.43-.23 1.1-.74 1.74a3.68 3.68 0 011.9-.59 1 1 0 01.67.36.93.93 0 01.18 1c-.48.81-2.69.97-3.81.97zm2.8-1.88a6.36 6.36 0 00-2.73 1.32c1.41 0 3.08-.21 3.33-.68 0 0 .08-.17-.13-.45a.47.47 0 00-.36-.18zm-1.87-2c-.27 0-.49.31-.67.5a4.1 4.1 0 00-.63 2.44c1-1 1.88-2.26 1.74-2.63a.6.6 0 00-.4-.31z" fill="#407bff"/><path style="isolation:isolate" opacity=".2" d="M348.62 395.35l-6.71 2.56-4.22-7.32 6.57-4.25 4.36 9.01z"/><path d="M257.71 259.72s-14 20.78-11.11 36.26c3.4 18.27 47.4 38.84 59.4 47.93s17.62 43.42 32.56 50l8.13-2.91s4.14-5.72 1.05-15.45c-13-40.8-23.74-60.3-59.62-84.73 0 0 2.36-19.78 1.37-29.8z" fill="#407bff"/><path d="M257.71 259.72s-14 20.78-11.11 36.26c3.4 18.27 47.4 38.84 59.4 47.93s17.62 43.42 32.56 50l8.13-2.91s4.14-5.72 1.05-15.45c-13-40.8-23.74-60.3-59.62-84.73 0 0 2.36-19.78 1.37-29.8z" style="isolation:isolate" opacity=".3"/><path d="M342.38 392.54l-2 .72c-4.54-5.78-8.25-16.2-12.14-27.14-4.13-11.59-8.4-23.57-13.43-28.33-3.5-3.31-11.26-8.52-20.25-14.56-18.35-12.33-39.16-26.3-40.55-34.82-1.47-9.06 3.16-22 5.93-28.6l2.14.09c-2.63 6.23-7.53 19.41-6.09 28.19 1.25 7.66 23.46 22.59 39.68 33.48 9.07 6.09 16.89 11.34 20.52 14.77 5.37 5.09 9.53 16.75 13.93 29.11 3.8 10.67 7.72 21.68 12.26 27.09z" fill="#407bff"/><path d="M288.12 290.82S280.75 286 271.5 280l13.5 5.41a55.44 55.44 0 004.71-19.48 236.85 236.85 0 01-1.59 24.89Line truncated

After

Width:  |  Height:  |  Size: 8.9 KiB

+90 -63
View File
@@ -5,8 +5,11 @@
<div <div
class="flex flex-col md:pr-10 md:mb-0 mb-6 pr-0 w-full md:w-auto md:text-left text-center text-black dark:text-gray-200" class="flex flex-col md:pr-10 md:mb-0 mb-6 pr-0 w-full md:w-auto md:text-left text-center text-black dark:text-gray-200"
> >
<p class="text-3xl font-bold whitespace-nowrap">Max Mustermann</p> <p
<p class="text-md whitespace-nowrap">Musterfirma > PR</p> class="text-3xl font-bold whitespace-nowrap"
v-text="(state.firstname || '') + ' ' + (state.middlename || '') + ' ' + (state.lastname || '')"
></p>
<p class="text-md whitespace-nowrap">{{ state.group }}</p>
</div> </div>
<div class="inline-flex md:ml-auto md:mr-0 mx-auto items-center space-x-4"> <div class="inline-flex md:ml-auto md:mr-0 mx-auto items-center space-x-4">
<button <button
@@ -45,77 +48,67 @@
<div class="flex lg:flex-wrap flex-row lg:space-x-2"> <div class="flex lg:flex-wrap flex-row lg:space-x-2">
<div class="flex-none"> <div class="flex-none">
<button <button
@click="() => { activetab = 'profile' }" @click="() => { state.activetab = 'profile' }"
:class="{ 'tab-active border-b-2 font-medium border-blue-500': (activetab === 'profile') }" :class="{ 'tab-active border-b-2 font-medium border-blue-500': (state.activetab === 'profile') }"
class="tab tab-underline py-4 px-6 block" class="tab tab-underline py-4 px-6 block"
type="button" type="button"
>{{ $t('profile') }}</button> >{{ $t('profile') }}</button>
</div> </div>
<div class="flex-none"> <div class="flex-none">
<button <button
@click="() => { activetab = 'laptimes' }" @click="() => { state.activetab = 'laptimes' }"
:class="{ 'tab-active border-b-2 font-medium border-blue-500': (activetab === 'laptimes') }" :class="{ 'tab-active border-b-2 font-medium border-blue-500': (state.activetab === 'laptimes') }"
class="tab tab-underline py-4 px-6 block" class="tab tab-underline py-4 px-6 block"
type="button" type="button"
>{{ $t('lap_times') }}</button> >{{ $t('lap_times') }}</button>
</div> </div>
<div class="flex-none"> <div class="flex-none">
<button <button
@click="() => { activetab = 'sponsorings' }" @click="() => { state.activetab = 'sponsorings' }"
:class="{ 'tab-active border-b-2 font-medium border-blue-500': (activetab === 'sponsorings') }" :class="{ 'tab-active border-b-2 font-medium border-blue-500': (state.activetab === 'sponsorings') }"
class="tab tab-underline py-4 px-6 block" class="tab tab-underline py-4 px-6 block"
type="button" type="button"
>{{ $t('sponsoring') }}</button> >{{ $t('sponsoring') }}</button>
</div> </div>
</div> </div>
<div v-if="(activetab === 'profile')" class="tab-content block"> <div v-if="(state.activetab === 'profile')" class="tab-content block">
<div class="py-4 w-full"> <div class="py-4 w-full">
<div class="flex flex-col"> <div class="flex flex-col">
<form class="form flex flex-wrap w-full"> <form class="form flex flex-wrap w-full">
<div class="w-full"> <div class="w-full">
<div class="form-element"> <div class="form-element">
<div class="form-label">{{ $t('vorname') }}</div> <div class="text-lg">{{ $t('vorname') }}</div>
<input <p
name="first-name" class="w-full dark:bg-gray-800 rounded text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out" v-text="state.firstname"
type="text"
:placeholder="[[$t('vorname')]]"
/> />
</div> </div>
<div class="form-element"> <div class="form-element">
<div class="form-label">{{ $t('mittelname') }}</div> <div class="text-lg">{{ $t('mittelname') }}</div>
<input <p
name="middle-name" class="w-full dark:bg-gray-800 rounded text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out" v-text="state.middlename"
type="text"
:placeholder="[[$t('mittelname')]]"
/> />
</div> </div>
<div class="form-element"> <div class="form-element">
<div class="form-label">{{ $t('nachname') }}</div> <div class="text-lg">{{ $t('nachname') }}</div>
<input <p
name="last-name" class="w-full dark:bg-gray-800 rounded text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
type="text" v-text="state.lastname"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
:placeholder="[[$t('nachname')]]"
/> />
</div> </div>
<div class="form-element"> <div class="form-element">
<div class="form-label">{{ $t('e_mail_adress') }}</div> <div class="text-lg">{{ $t('e_mail_adress') }}</div>
<input <p
name="email" class="w-full dark:bg-gray-800 rounded text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
type="email" v-text="state.email"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
:placeholder="[[$t('e_mail_adress')]]"
/> />
</div> </div>
<div class="form-element"> <div class="form-element">
<div class="form-label">{{ $t('phone_number') }}</div> <div class="text-lg">{{ $t('phone_number') }}</div>
<input <p
name="tel" class="w-full dark:bg-gray-800 rounded text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
type="tel" v-text="state.phone"
class="w-full dark:bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none dark:text-gray-100 text-gray-600 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
:placeholder="[[$t('phone_number')]]"
/> />
</div> </div>
</div> </div>
@@ -123,12 +116,15 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="(activetab === 'laptimes')" class="tab-content block"> <div v-if="(state.activetab === 'laptimes')" class="tab-content block">
<div class="py-4 w-full"> <div class="py-4 w-full">
<section class="text-gray-400 dark:bg-gray-900 body-font"> <section class="text-gray-400 dark:bg-gray-900 body-font">
<div class="container mx-auto"> <div class="container mx-auto">
<div class="lg:w-2/3 w-full mx-auto overflow-auto"> <div class="lg:w-2/3 w-full mx-auto overflow-auto">
<table class="table-auto w-full text-left whitespace-no-wrap"> <table
v-if="state.scans.length > 0"
class="table-auto w-full text-left whitespace-no-wrap"
>
<thead <thead
class="text-black bg-gray-300 dark:text-white text-sm dark:bg-gray-800" class="text-black bg-gray-300 dark:text-white text-sm dark:bg-gray-800"
> >
@@ -142,30 +138,28 @@
</tr> </tr>
</thead> </thead>
<tbody class="text-gray-900 dark:text-gray-50"> <tbody class="text-gray-900 dark:text-gray-50">
<tr class="border-t-2 border-gray-800"> <tr v-for="s in state.scans" :key="s.id">
<td class="px-4 py-3">400m</td> <td class="px-4 py-3">
<td class="px-4 py-3">0min 57s</td> <span v-text="s.distance"></span>m
</tr> </td>
<tr class="border-t-2 border-gray-800"> <td class="px-4 py-3" v-text="s.lapTime"></td>
<td class="px-4 py-3">400m</td>
<td class="px-4 py-3">1min 15s</td>
</tr>
<tr class="border-t-2 border-gray-800">
<td class="px-4 py-3">1km</td>
<td class="px-4 py-3">2min 50s</td>
</tr>
<tr class="border-t-2 border-gray-800">
<td class="px-4 py-3">1km</td>
<td class="px-4 py-3">3min 00s</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div v-else class="text-center font-bold text-black dark:text-white text-2xl">
<img
src="../assets/empty_laps.svg"
style="height:25rem; margin:0 auto;"
:alt="[[$t('no_laps_scans_were_recorded_yet')]]"
/>
{{ $t('no_laps_scans_were_recorded_yet') }}
</div>
</div> </div>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
<div v-if="(activetab === 'sponsorings')" class="tab-content block"> <div v-if="(state.activetab === 'sponsorings')" class="tab-content block">
<div class="py-4 w-full">coming soon...</div> <div class="py-4 w-full">coming soon...</div>
</div> </div>
</div> </div>
@@ -175,12 +169,45 @@
</template> </template>
<script setup> <script setup>
import { computed, ref, reactive, watch } from "vue"; import { ref, reactive } from "vue";
import axios from "redaxios";
import isEmail from 'validator/es/lib/isEmail';
import isMobilePhone from 'validator/es/lib/isMobilePhone';
import isPostalCode from 'validator/es/lib/isPostalCode';
import { useToast } from "vue-toastification"; import { useToast } from "vue-toastification";
import axios from "redaxios";
// import isEmail from 'validator/es/lib/isEmail';
// import isMobilePhone from 'validator/es/lib/isMobilePhone';
// import isPostalCode from 'validator/es/lib/isPostalCode';
// //
let activetab = ref("profile"); const state = reactive({
phone: "",
email: "",
firstname: "",
middlename: "",
lastname: "",
scans: [],
group: "",
activetab: "profile",
})
const toast = useToast();
const token = location.hash.substr(1).split('&')[0].split('=')[1];
axios.get(`${config.baseurl}api/runners/me/${token}`)
.then(({ data }) => {
state.phone = data.phone;
state.email = data.email;
state.firstname = data.firstname;
state.middlename = data.middlename;
state.lastname = data.lastname;
state.group = data.group;
}).catch((error) => {
toast.error("An error occured while loading your profile data");
})
axios.get(`${config.baseurl}api/runners/me/${token}/scans`)
.then(({ data }) => {
data.map(function(s) {
s.lapTime = Math.floor(s.lapTime / 60) + 'min ' + (Math.floor(s.lapTime % 60) + "").padStart(2, "0") + "s"
return s;
})
data.filter(s => s.valid === true);
state.scans = data;
}).catch((error) => {
toast.error("An error occured while loading your profile data");
})
</script> </script>
+1
View File
@@ -15,6 +15,7 @@
"main_page_text": "Hier können Sie sich für den Lauf Für Kaya! registrieren oder ihr Läuferprofil verwalten.", "main_page_text": "Hier können Sie sich für den Lauf Für Kaya! registrieren oder ihr Läuferprofil verwalten.",
"mittelname": "Mittelname", "mittelname": "Mittelname",
"nachname": "Nachname", "nachname": "Nachname",
"no_laps_scans_were_recorded_yet": "Es wurden noch keine Runden / Scans aufgezeichnet ...",
"ort": "Ort", "ort": "Ort",
"phone_number": "Telefonnummer", "phone_number": "Telefonnummer",
"please_provide_a_valid_zipcode": "Bitte geben Sie eine gültige Postleitzahl an...", "please_provide_a_valid_zipcode": "Bitte geben Sie eine gültige Postleitzahl an...",
+1
View File
@@ -15,6 +15,7 @@
"main_page_text": "Here you can register for the Lauf Für Kaya! or manage your runner profile.", "main_page_text": "Here you can register for the Lauf Für Kaya! or manage your runner profile.",
"mittelname": "Middlename", "mittelname": "Middlename",
"nachname": "Lastname", "nachname": "Lastname",
"no_laps_scans_were_recorded_yet": "No laps/ scans were recorded yet...",
"ort": "City", "ort": "City",
"phone_number": "Phone Number", "phone_number": "Phone Number",
"please_provide_a_valid_zipcode": "Please provide a valid zipcode...", "please_provide_a_valid_zipcode": "Please provide a valid zipcode...",
+2 -2
View File
@@ -26,9 +26,9 @@ const Home = import('./components/Home.vue');
const Imprint = import('./components/Imprint.vue'); const Imprint = import('./components/Imprint.vue');
const Privacy = import('./components/Privacy.vue'); const Privacy = import('./components/Privacy.vue');
const Register = import('./components/Register.vue'); const Register = import('./components/Register.vue');
const Profile = import('./components/Profile.vue'); const Profile = () => import('./components/Profile.vue');
// //
let routes = [ { path: '/', component: EnvError } ]; let routes = [ { path: '/:pathMatch(.*)*', component: EnvError } ];
if (typeof config !== 'undefined') { if (typeof config !== 'undefined') {
if (config.baseurl && config.documentserver_key) { if (config.baseurl && config.documentserver_key) {
routes = [ routes = [