formatting

This commit is contained in:
Hayden 2022-08-30 21:22:26 -08:00
parent ec170f9b93
commit 939d0a429d

View file

@ -78,10 +78,7 @@
async function login() { async function login() {
loading.value = true; loading.value = true;
const { data, error } = await api.login( const { data, error } = await api.login(loginFields[0].value, loginFields[1].value);
loginFields[0].value,
loginFields[1].value
);
if (error) { if (error) {
toast.error('Invalid email or password'); toast.error('Invalid email or password');
@ -108,21 +105,13 @@
<template> <template>
<header class="sm:px-6 py-2 lg:p-14 sm:py-6"> <header class="sm:px-6 py-2 lg:p-14 sm:py-6">
<h2 <h2 class="mt-1 text-4xl font-bold tracking-tight text-base-content sm:text-5xl lg:text-6xl">Homebox</h2>
class="mt-1 text-4xl font-bold tracking-tight text-gray-200 sm:text-5xl lg:text-6xl" <p class="ml-1 text-lg text-base-content/50">Track, Organize, and Manage your Shit.</p>
>
Homebox
</h2>
<p class="ml-1 text-lg text-gray-400">
Track, Organize, and Manage your Shit.
</p>
</header> </header>
<div class="grid p-6 sm:place-items-center min-h-[50vh]"> <div class="grid p-6 sm:place-items-center min-h-[50vh]">
<Transition name="slide-fade"> <Transition name="slide-fade">
<form v-if="registerForm" @submit.prevent="registerUser"> <form v-if="registerForm" @submit.prevent="registerUser">
<div <div class="card w-max-[500px] md:w-[500px] bg-base-100 shadow-xl">
class="card w-max-[500px] md:w-[500px] bg-base-100 shadow-xl"
>
<div class="card-body"> <div class="card-body">
<h2 class="card-title">Register</h2> <h2 class="card-title">Register</h2>
<TextField <TextField
@ -133,12 +122,7 @@
:type="field.type" :type="field.type"
/> />
<div class="card-actions justify-end"> <div class="card-actions justify-end">
<button <button type="submit" class="btn btn-primary mt-2" :class="loading ? 'loading' : ''" :disabled="loading">
type="submit"
class="btn btn-primary mt-2"
:class="loading ? 'loading' : ''"
:disabled="loading"
>
Register Register
</button> </button>
</div> </div>
@ -146,9 +130,7 @@
</div> </div>
</form> </form>
<form v-else @submit.prevent="login"> <form v-else @submit.prevent="login">
<div <div class="card w-max-[500px] md:w-[500px] bg-base-100 shadow-xl">
class="card w-max-[500px] md:w-[500px] bg-base-100 shadow-xl"
>
<div class="card-body"> <div class="card-body">
<h2 class="card-title">Login</h2> <h2 class="card-title">Login</h2>
<TextField <TextField
@ -159,12 +141,7 @@
:type="field.type" :type="field.type"
/> />
<div class="card-actions justify-end mt-2"> <div class="card-actions justify-end mt-2">
<button <button type="submit" class="btn btn-primary" :class="loading ? 'loading' : ''" :disabled="loading">
type="submit"
class="btn btn-primary"
:class="loading ? 'loading' : ''"
:disabled="loading"
>
Login Login
</button> </button>
</div> </div>
@ -174,31 +151,20 @@
</Transition> </Transition>
<div class="text-center mt-2"> <div class="text-center mt-2">
<button @click="toggleLogin"> <button @click="toggleLogin">
{{ {{ registerForm ? 'Already a User? Login' : 'Not a User? Register' }}
registerForm
? 'Already a User? Login'
: 'Not a User? Register'
}}
</button> </button>
</div> </div>
</div> </div>
<div class="min-w-full absolute bottom-0 z-[-1]"> <div class="min-w-full absolute bottom-0 z-[-1]">
<svg <svg class="fill-primary" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 1440 320">
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="none"
viewBox="0 0 1440 320"
>
<path <path
fill="#0099ff9b"
fill-opacity="1" fill-opacity="1"
d="M0,32L30,42.7C60,53,120,75,180,80C240,85,300,75,360,80C420,85,480,107,540,128C600,149,660,171,720,160C780,149,840,107,900,90.7C960,75,1020,85,1080,122.7C1140,160,1200,224,1260,234.7C1320,245,1380,203,1410,181.3L1440,160L1440,320L1410,320C1380,320,1320,320,1260,320C1200,320,1140,320,1080,320C1020,320,960,320,900,320C840,320,780,320,720,320C660,320,600,320,540,320C480,320,420,320,360,320C300,320,240,320,180,320C120,320,60,320,30,320L0,320Z" d="M0,32L30,42.7C60,53,120,75,180,80C240,85,300,75,360,80C420,85,480,107,540,128C600,149,660,171,720,160C780,149,840,107,900,90.7C960,75,1020,85,1080,122.7C1140,160,1200,224,1260,234.7C1320,245,1380,203,1410,181.3L1440,160L1440,320L1410,320C1380,320,1320,320,1260,320C1200,320,1140,320,1080,320C1020,320,960,320,900,320C840,320,780,320,720,320C660,320,600,320,540,320C480,320,420,320,360,320C300,320,240,320,180,320C120,320,60,320,30,320L0,320Z"
/> />
</svg> </svg>
<div class="bg-[#0099ff9b] flex-col flex min-h-[32vh]"> <div class="bg-primary flex-col flex min-h-[32vh]">
<div class="mt-auto mx-auto mb-8"> <div class="mt-auto mx-auto mb-8">
<p class="text-center text-gray-200"> <p class="text-center text-gray-200">&copy; 2022 Contents. All Rights Reserved. Haybytes LLC</p>
&copy; 2022 Contents. All Rights Reserved. Haybytes LLC
</p>
</div> </div>
</div> </div>
</div> </div>