diff --git a/package.json b/package.json index db9b0fc..97685c0 100644 --- a/package.json +++ b/package.json @@ -20,13 +20,13 @@ }, "devDependencies": { "@vitejs/plugin-vue": "^1.1.5", - "@vue/compiler-sfc": "^3.0.6", - "autoprefixer": "^10.2.4", - "postcss": "^8.2.6", - "release-it": "^14.4.1", - "tailwindcss": "^2.0.3", - "vite": "^2.0.3", - "vite-plugin-windicss": "^0.5.4" + "@vue/compiler-sfc": "^3.0.7", + "autoprefixer": "^10.2.5", + "postcss": "^8.2.8", + "release-it": "^14.5.0", + "tailwindcss": "^2.0.4", + "vite": "^2.1.2", + "vite-plugin-windicss": "^0.9.11" }, "release-it": { "git": { diff --git a/src/components/Login.vue b/src/components/Login.vue index ef0c89a..e1f680f 100644 --- a/src/components/Login.vue +++ b/src/components/Login.vue @@ -97,11 +97,8 @@ import Toastify from "toastify-js"; let mail = ref(""); let loading = ref(false); function login() { - console.log("ihi"); - console.log(mail.value); loading.value = true; axios.get("").then((res) => { - console.log(res.data); loading.value = false; Toastify({ text: "This is a toast", diff --git a/src/components/LoginForm.vue b/src/components/LoginForm.vue index 9444c6e..49ed64b 100644 --- a/src/components/LoginForm.vue +++ b/src/components/LoginForm.vue @@ -97,11 +97,8 @@ import Toastify from "toastify-js"; let mail = ref(""); let loading = ref(false); function login() { - console.log("ihi"); - console.log(mail.value); loading.value = true; axios.get("").then((res) => { - console.log(res.data); loading.value = false; Toastify({ text: "This is a toast", diff --git a/src/components/Profile.vue b/src/components/Profile.vue index 47fe1ff..1b6fdff 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -187,8 +187,11 @@ const state = reactive({ activetab: "profile", }) const toast = useToast(); -const token = location.hash.substr(1).split('&')[0].split('=')[1]; -axios.get(`${config.baseurl}api/runners/me/${token}`) +const props = defineProps({ + token: String +}) +const accesstoken = atob(props.token); +axios.get(`${config.baseurl}api/runners/me/${accesstoken}`) .then(({ data }) => { state.phone = data.phone; state.email = data.email; @@ -199,7 +202,7 @@ axios.get(`${config.baseurl}api/runners/me/${token}`) }).catch((error) => { toast.error("An error occured while loading your profile data"); }) -axios.get(`${config.baseurl}api/runners/me/${token}/scans`) +axios.get(`${config.baseurl}api/runners/me/${accesstoken}/scans`) .then(({ data }) => { data.map(function(s) { s.lapTime = Math.floor(s.lapTime / 60) + 'min ' + (Math.floor(s.lapTime % 60) + "").padStart(2, "0") + "s" diff --git a/src/components/Register.vue b/src/components/Register.vue index 9de89c4..7394087 100644 --- a/src/components/Register.vue +++ b/src/components/Register.vue @@ -6,6 +6,11 @@ class="sm:text-3xl text-2xl font-medium title-font mb-4 text-center" >Lauf für Kaya! - {{ $t('registrieren') }}

{{ $t('register.register_now') }}

+

Organization: {{ state.org_name }}

+

Bürgerlauf