Many Changes

This commit is contained in:
2024-02-01 21:00:59 +01:00
parent fe74e7d91b
commit 34d1eb9c71
18 changed files with 493 additions and 374 deletions

View File

@@ -7,7 +7,18 @@ definePageMeta({
const supabase = useSupabaseClient()
const user = useSupabaseUser()
const router = useRouter()
const {fetchData} = useDataStore()
const colorMode = useColorMode()
const dataStore = useDataStore()
const isLight = computed({
get () {
return colorMode.value !== 'dark'
},
set () {
colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'
}
})
const email = ref("")
const password = ref("")
@@ -36,7 +47,7 @@ const onSubmit = async (data) => {
alert(error.toString())
} else {
console.log("Login Successful")
fetchData()
dataStore.changeTenant()
router.push("/")
@@ -74,11 +85,16 @@ const onSubmit = async (data) => {
</div>-->
<UCard class="max-w-sm w-full mx-auto mt-5">
<img
:src="!isLight ? '/spaces.svg' : '/spaces_hell.svg'"
alt="Logo"
class="w-full mx-auto"
/>
<UAuthForm
title="Login"
description="Geben Sie Ihre Anmeldedaten ein um Zugriff auf Ihren Account zu bekommen"
align="bottom"
icon="i-heroicons-user-circle"
:fields="fields"
:loading="false"
@submit="onSubmit"