-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
33 lines (30 loc) · 782 Bytes
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<template>
<div>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
</template>
<script setup>
useHead({
title: "Stundenplan",
meta: [
{
name: "description",
content: "Einfache, mobile-first WebApp für den CampusDual-Stundenplan. Support für Firefox und Chromium.",
},
],
});
const username = useCookie("username");
const password = useCookie("password");
const isLoggedIn = useState("isLoggedIn", () => false);
onMounted(async () => {
try {
const test_url = `https://corsproxy.io/?https%3A%2F%2Fselfservice.campus-dual.de%2Fdash%2Fgetcp%3Fuser%3D${username.value}%26hash%3D${password.value}`;
const response = await $fetch(test_url);
isLoggedIn.value = !!(typeof response === 'number');
} catch (error) {
isLoggedIn.value = false;
}
});
</script>