page registro
This commit is contained in:
101
src/views/RegistroView.vue
Normal file
101
src/views/RegistroView.vue
Normal file
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<!-- https://www.creative-tim.com/twcomponents/component/simple-login-form-3 -->
|
||||
<div
|
||||
class="min-h-screen flex items-center justify-center w-full dark:bg-gray-950"
|
||||
>
|
||||
<div
|
||||
class="bg-white dark:bg-gray-900 shadow-md rounded-lg px-8 py-6 ancho min-w-[300px]"
|
||||
>
|
||||
<h1 class="text-2xl font-bold text-center mb-4 dark:text-gray-200">
|
||||
Crea una cuenta!
|
||||
</h1>
|
||||
<form action="#">
|
||||
<div class="mb-4">
|
||||
<label
|
||||
for="email"
|
||||
class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
|
||||
>Correo electrónico</label
|
||||
>
|
||||
<input
|
||||
type="email"
|
||||
id="email"
|
||||
v-model="email"
|
||||
class="shadow-sm rounded-md w-full px-3 py-2 border border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
|
||||
placeholder="your@email.com"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label
|
||||
for="password"
|
||||
class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
|
||||
>Contraseña</label
|
||||
>
|
||||
<input
|
||||
type="password"
|
||||
id="password"
|
||||
v-model="password"
|
||||
class="shadow-sm rounded-md w-full px-3 py-2 border border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 mb-4"
|
||||
placeholder="Enter your password"
|
||||
required
|
||||
/>
|
||||
<label
|
||||
for="passwordRepeat"
|
||||
class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"
|
||||
>Repita su contraseña</label
|
||||
>
|
||||
<input
|
||||
type="password"
|
||||
id="passwordRepeat"
|
||||
v-model="passwordRepeat"
|
||||
class="shadow-sm rounded-md w-full px-3 py-2 border border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
|
||||
placeholder="Enter your password again"
|
||||
required
|
||||
/>
|
||||
|
||||
</div>
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex items-center"></div>
|
||||
<router-link
|
||||
to="/"
|
||||
class="text-xs text-indigo-500 hover:text-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
|
||||
>Logueate</router-link
|
||||
>
|
||||
</div>
|
||||
<button
|
||||
@click="login"
|
||||
type="button"
|
||||
class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
|
||||
>
|
||||
Registrar
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { onMounted, ref } from "vue";
|
||||
import PocketBase from "pocketbase";
|
||||
import router from "@/router";
|
||||
|
||||
// access the `store` variable anywhere in the component ✨
|
||||
const storeUser = useUserStore();
|
||||
|
||||
let pb = null;
|
||||
let email = ref("");
|
||||
let password = ref("");
|
||||
let passwordRepeat = ref("");
|
||||
|
||||
onMounted(() => {
|
||||
pb = new PocketBase("http://127.0.0.1:8090");
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.ancho {
|
||||
width: 30%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user