Compare commits
No commits in common. "753863585d23b2e6ffce9cf4e3fe9564ef60d6cf" and "3d4d56f616cb26075ff691b42f5ad6173b43126e" have entirely different histories.
753863585d
...
3d4d56f616
@ -46,7 +46,7 @@ onMounted(async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="form-signin w-100 m-auto position-absolute top-50 start-50 translate-middle">
|
||||
<main class="form-signin w-100 m-auto">
|
||||
<form onsubmit="event.preventDefault();">
|
||||
<IconLogo />
|
||||
<h1 class="h3 mb-3 fw-normal">Please sign in</h1>
|
||||
@ -65,7 +65,7 @@ onMounted(async () => {
|
||||
|
||||
<button type="submit" @click="login" class="btn btn-primary w-100 py-2">Sign in</button>
|
||||
|
||||
<p class="mt-5 mb-3 text-body-secondary">© 2023 Lucas Schumacher</p>
|
||||
<p class="mt-5 mb-3 text-body-secondary">© 2023</p>
|
||||
</form>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@ -10,7 +10,6 @@ const err = ref('')
|
||||
|
||||
async function signup(ev) {
|
||||
ev.preventDefault()
|
||||
console.log(ev)
|
||||
const api_url = '/api/user'
|
||||
const payload = { username: user.value, password: pass.value, referral: refe.value }
|
||||
const fetch_options = {
|
||||
@ -30,7 +29,6 @@ async function signup(ev) {
|
||||
let resp = await fetch(api_url, fetch_options)
|
||||
console.log(resp)
|
||||
if (resp.ok) {
|
||||
err.value = ''
|
||||
let ans = await resp.json()
|
||||
console.log(ans)
|
||||
|
||||
@ -43,7 +41,7 @@ async function signup(ev) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="form-signin w-100 m-auto my-auto position-absolute top-50 start-50 translate-middle">
|
||||
<main class="form-signin w-100 m-auto my-auto">
|
||||
<form onsubmit="event.preventDefault();">
|
||||
<IconLogo />
|
||||
<h1 class="h3 mb-3 fw-normal">Sign up</h1>
|
||||
@ -56,29 +54,30 @@ async function signup(ev) {
|
||||
<input type="password" v-model="pass" class="form-control" id="floatingPassword" placeholder="Password">
|
||||
<label for="floatingPassword">Password</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<div class="form-floating">
|
||||
<input type="text" v-model="refe" class="form-control" id="floatingCode" placeholder="">
|
||||
<label for="floatingCode">Referral Code</label>
|
||||
</div>
|
||||
|
||||
<div v-if="err != ''" class="form-floating alert alert-danger" role="alert">
|
||||
<div class="me-3">{{ err }}</div>
|
||||
<button @click="err = ''" type="button" class="btn-close me-2 position-absolute top-50 end-0 translate-middle-y"
|
||||
aria-label="close"></button>
|
||||
<div class="form-floating">
|
||||
<p> {{ err }} </p>
|
||||
</div>
|
||||
|
||||
<button type="submit" @click="signup" class="btn btn-primary w-100 py-2">Sign up</button>
|
||||
|
||||
<div class="form-floating m-2">
|
||||
<div class="form-floating mb-3">
|
||||
Already have an account?
|
||||
<a href="#/login">Log in</a>
|
||||
</div>
|
||||
<p class="mt-5 mb-3 text-body-secondary">© 2023 Lucas Schumacher</p>
|
||||
|
||||
<button type="submit" @click="signup" class="btn btn-primary w-100 py-2">Sign up</button>
|
||||
<p class="mt-5 mb-3 text-body-secondary">© 2023</p>
|
||||
</form>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* html,
|
||||
body {
|
||||
height: 100%;
|
||||
} */
|
||||
|
||||
.form-signin {
|
||||
max-width: 330px;
|
||||
padding: 1rem;
|
||||
@ -88,7 +87,15 @@ async function signup(ev) {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.form-signin input[type="email"] {
|
||||
margin-bottom: -1px;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.form-signin input[type="password"] {
|
||||
margin-bottom: 10px;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user