All pages now in Nuxt, work next on nav.

DB connected, check issues with writing.

Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
This commit is contained in:
Louis Hollingworth 2023-05-16 20:17:33 +01:00
parent f9e7e5480c
commit 14659122c3
Signed by: lucxjo
GPG key ID: A11415CB3DC7809B
17 changed files with 375 additions and 56 deletions

22
pages/dash/index.vue Normal file
View file

@ -0,0 +1,22 @@
<script setup lang="ts">
const router = useRouter()
definePageMeta({
middleware: 'auth'
})
async function logout() {
router.push('/login')
}
</script>
<template>
<div class="grid h-screen place-items-center">
<div class="grid place-items-center">
<h1 class="text-6xl font-bold underline">Vänner Bästa | Dash</h1>
<div class="mt-10 mx-4 place-items-center">
<p>Logged in as {{ user?.user_metadata?.full_name }}</p>
<button @click="logout" >Logout</button>
</div>
</div>
</div>
</template>

View file

@ -1,5 +1,6 @@
<template>
<div class="grid h-screen place-items-center">
<NavHeader :links="false" class="h-screen-1/20" />
<div class="grid h-screen-19/20 place-items-center">
<div class="grid place-items-center">
<h1 class="text-6xl font-bold underline">Vänner Bästa</h1>
<div class="mt-10 mx-4 place-items-center">
@ -14,6 +15,7 @@
</template>
<script setup lang="ts">
const links: Array<{href: string, title: string}> = [
{
href: "https://netflix.com",
@ -34,6 +36,10 @@ const links: Array<{href: string, title: string}> = [
{
href: "/utilities",
title: "Discord Utilities"
},
{
href: "/dash",
title: "Dashboard"
}
]
</script>

13
pages/login.vue Normal file
View file

@ -0,0 +1,13 @@
<template>
<div class="grid h-screen place-items-center">
<div class="grid place-items-center">
<h1 class="text-6xl font-bold underline">Vänner Bästa | Login</h1>
<div class="mt-10 mx-4 place-items-center">
<a href="https://discord.com/api/oauth2/authorize?client_id=1105533416377688174&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fv1%2Fcallback&response_type=code&scope=identify%20guilds%20guilds.members.read" >Login with Discord</a>
</div>
</div>
</div>
</template>
<script setup lang="ts">
</script>

View file

@ -1,6 +1,7 @@
<template>
<div>
<div class="grid h-screen place-items-center">
<NavHeader class="h-screen-1/20" />
<div class="grid h-screen-19/20 place-items-center">
<div class="grid place-items-center">
<h1 class="text-6xl font-bold underline p-4">Birthdays</h1>
<p class="p-4">

View file

@ -1,6 +1,7 @@
<template>
<div>
<div class="grid h-screen place-items-center">
<NavHeader class="h-screen-1/20" />
<div class="grid h-screen-19/20 place-items-center">
<div class="grid place-items-center">
<h1 class="text-6xl font-bold underline">Vänner Bästa</h1>
<div class="grid grid-cols-2 mt-10">

View file

@ -1,6 +1,7 @@
<template>
<div>
<div class="grid h-screen place-items-center">
<NavHeader class="h-screen-1/20" />
<div class="grid h-screen-19/20 place-items-center">
<div class="grid place-items-center">
<h1 class="text-6xl font-bold underline p-4">Time Utilities</h1>
<p class="p-4" >Your current timezone: {{ timezone }}</p>