-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
237 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: Login | ||
desctiption: Login to the site | ||
desctiption: Get in touch with community through contributions | ||
--- | ||
|
||
LOGIN PAGE | ||
<auth-login /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script setup> | ||
import { useUser } from '../../composables/useUser.js'; | ||
const { userRead, user, userDB, email, password, authData, access_token, submitLogin, refreshToken, logoutUser } = useUser() | ||
</script> | ||
|
||
<template lang='pug'> | ||
form.flex.flex-col.gap-4(@submit.prevent="submitLogin" v-if="!access_token") | ||
.text-4xl Login to your account | ||
label.text-xl(for="email") E-mail*: | ||
input.text-lg.rounded-lg.p-4.border-2.border-solid.dark-border-light-300.border-dark-800.shadow-inner.dark-bg-dark-200(id="email" type="text" v-model="email") | ||
label.text-xl(for="email") Password: | ||
input.rounded-lg.p-4.border-2.border-solid.dark-border-light-300.border-dark-800.shadow-inner.dark-bg-dark-200(type="password" v-model="password") | ||
button.text-xl.font-bold.rounded-lg.p-4.border-2.border-solid.dark-border-light-300.border-dark-800.shadow-lg.dark-bg-dark-200(type="submit" @click="submitLogin") Sign In | ||
|
||
.flex.flex-col.gap-2(v-else) | ||
p.font-mono.text-xs .{{ access_token.split('.')[2] }} | ||
pre.text-sm {{ authData }} | ||
.flex | ||
button.text-xl.font-bold.rounded-lg.p-4.border-2.border-solid.dark-border-light-300.border-dark-800.shadow-lg.dark-bg-dark-200(type="submit" @click="refreshToken()") Refresh | ||
button.text-xl.font-bold.rounded-lg.p-4.border-2.border-solid.dark-border-light-300.border-dark-800.shadow-lg.dark-bg-dark-200(type="submit" @click="logoutUser()") Log out | ||
button.text-xl.font-bold.rounded-lg.p-4.border-2.border-solid.dark-border-light-300.border-dark-800.shadow-lg.dark-bg-dark-200(type="submit" @click="userRead()") Read user | ||
AuthProfile | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup> | ||
import { useUser } from '../../composables/useUser.js'; | ||
const { user } = useUser() | ||
</script> | ||
|
||
<template lang='pug'> | ||
.flex.flex-col.gap-4.p-4 | ||
.text-xl Profile | ||
pre.text-sm {{ user }} | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.