1
1
<script setup>
2
- import Checkbox from ' @/Components/Checkbox.vue' ;
3
- import GuestLayout from ' @/Layouts/GuestLayout.vue' ;
4
- import InputError from ' @/Components/InputError.vue' ;
5
- import InputLabel from ' @/Components/InputLabel.vue' ;
6
- import PrimaryButton from ' @/Components/PrimaryButton.vue' ;
7
- import TextInput from ' @/Components/TextInput.vue' ;
8
2
import { Head , Link , useForm } from ' @inertiajs/vue3' ;
9
3
10
4
defineProps ({
@@ -30,71 +24,60 @@ const submit = () => {
30
24
</script >
31
25
32
26
<template >
33
- <GuestLayout >
34
- <Head title =" Log in" />
27
+ <Head title =" Iniciar Sesión" />
35
28
36
- <div v-if =" status" class =" mb-4 text-sm font-medium text-green-600" >
37
- {{ status }}
38
- </div >
39
-
40
- <form @submit.prevent =" submit" >
41
- <div >
42
- <InputLabel for =" email" value =" Email" />
43
-
44
- <TextInput
45
- id =" email"
46
- type =" email"
47
- class =" mt-1 block w-full"
48
- v-model =" form.email"
49
- required
50
- autofocus
51
- autocomplete =" username"
52
- />
29
+ <div class =" min-h-screen flex items-center justify-center bg-gray-100" >
30
+ <div class =" w-96" >
31
+ <div class =" text-center mb-8" >
32
+ <h1 class =" text-2xl font-bold text-gray-800" >Neumatrans</h1 >
33
+ <p class =" text-gray-600 mt-2" >Inicia sesión en tu cuenta</p >
34
+ </div >
53
35
54
- <InputError class =" mt-2" :message =" form.errors.email" />
36
+ <div v-if =" status" class =" mb-4 p-4 bg-green-100 rounded-lg text-green-700 text-sm" >
37
+ {{ status }}
55
38
</div >
56
39
57
- <div class =" mt-4" >
58
- <InputLabel for =" password" value =" Password" />
40
+ <form @submit.prevent =" submit" class =" space-y-6" >
41
+ <div >
42
+ <input id =" email" type =" email" class =" w-full px-4 py-2 border border-gray-300 rounded-lg"
43
+ v-model =" form.email" placeholder =" Email" required autofocus />
44
+ <div v-if =" form.errors.email" class =" mt-2 text-sm text-red-600" >
45
+ {{ form.errors.email }}
46
+ </div >
47
+ </div >
59
48
60
- <TextInput
61
- id =" password"
62
- type =" password"
63
- class =" mt-1 block w-full"
64
- v-model =" form.password"
65
- required
66
- autocomplete =" current-password"
67
- />
49
+ <div >
50
+ <input id =" password" type =" password" class =" w-full px-4 py-2 border border-gray-300 rounded-lg"
51
+ v-model =" form.password" placeholder =" Contraseña" required />
52
+ <div v-if =" form.errors.password" class =" mt-2 text-sm text-red-600" >
53
+ {{ form.errors.password }}
54
+ </div >
55
+ </div >
68
56
69
- <InputError class =" mt-2" :message =" form.errors.password" />
70
- </div >
57
+ <div class =" flex items-center justify-between" >
58
+ <label class =" flex items-center" >
59
+ <input type =" checkbox" class =" rounded border-gray-300 text-red-600" v-model =" form.remember" />
60
+ <span class =" ml-2 text-sm text-gray-600" >Recordarme</span >
61
+ </label >
71
62
72
- <div class =" mt-4 block" >
73
- <label class =" flex items-center" >
74
- <Checkbox name =" remember" v-model:checked =" form.remember" />
75
- <span class =" ms-2 text-sm text-gray-600"
76
- >Remember me</span
77
- >
78
- </label >
79
- </div >
63
+ <Link v-if =" canResetPassword" :href =" route('password.request')"
64
+ class =" text-sm text-red-600 hover:text-red-800" >
65
+ ¿Olvidaste tu contraseña?
66
+ </Link >
67
+ </div >
80
68
81
- <div class =" mt-4 flex items-center justify-end" >
82
- <Link
83
- v-if =" canResetPassword"
84
- :href =" route('password.request')"
85
- class =" rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
86
- >
87
- Forgot your password?
88
- </Link >
69
+ <button type =" submit"
70
+ class =" w-full bg-red-600 text-white py-2 px-4 rounded-lg hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2"
71
+ :disabled =" form.processing" >
72
+ {{ form.processing ? 'Iniciando sesión...' : 'Iniciar Sesión' }}
73
+ </button >
89
74
90
- <PrimaryButton
91
- class =" ms-4"
92
- :class =" { 'opacity-25': form.processing }"
93
- :disabled =" form.processing"
94
- >
95
- Log in
96
- </PrimaryButton >
97
- </div >
98
- </form >
99
- </GuestLayout >
75
+ <div class =" text-center mt-4" >
76
+ <Link :href =" route('register')" class =" text-sm text-gray-600 hover:text-red-600" >
77
+ ¿No tienes cuenta? Regístrate
78
+ </Link >
79
+ </div >
80
+ </form >
81
+ </div >
82
+ </div >
100
83
</template >
0 commit comments