kaze 0.5.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kaze/commands/install_command.rb +18 -4
- data/lib/kaze/commands/installs_hotwire_stack.rb +5 -2
- data/lib/kaze/commands/installs_inertia_stacks.rb +13 -3
- data/lib/kaze/version.rb +1 -1
- data/stubs/default/app/forms/auth/login_form.rb +2 -8
- data/stubs/default/app/forms/update_profile_information_form.rb +1 -1
- data/stubs/default/app/models/auth.rb +57 -0
- data/stubs/default/app/models/current.rb +1 -1
- data/stubs/default/app/validators/current_password_validator.rb +1 -1
- data/stubs/default/app/views/layouts/mailer.html.erb +367 -372
- data/stubs/default/app/views/layouts/mailer.text.erb +1 -4
- data/stubs/default/app/views/user_mailer/reset_password.html.erb +21 -26
- data/stubs/default/test/factories/users.rb +7 -0
- data/stubs/default/test/integration/auth/authentication_test.rb +43 -0
- data/stubs/default/test/integration/auth/password_reset_test.rb +41 -0
- data/stubs/default/test/integration/auth/registration_test.rb +21 -0
- data/stubs/default/test/integration/password_update_test.rb +28 -0
- data/stubs/default/test/integration/profile_test.rb +51 -0
- data/stubs/default/test/test_helper.rb +38 -0
- data/stubs/hotwire/app/components/dropdown_component.html.erb +17 -18
- data/stubs/hotwire/app/components/modal_component.html.erb +55 -59
- data/stubs/hotwire/app/controllers/application_controller.rb +1 -0
- data/stubs/hotwire/app/controllers/auth/authenticated_session_controller.rb +10 -7
- data/stubs/hotwire/app/controllers/auth/new_password_controller.rb +3 -1
- data/stubs/hotwire/app/controllers/auth/password_reset_link_controller.rb +3 -1
- data/stubs/hotwire/app/controllers/auth/registered_user_controller.rb +4 -2
- data/stubs/hotwire/app/controllers/concerns/authenticate.rb +5 -20
- data/stubs/hotwire/app/controllers/concerns/redirect_if_authenticated.rb +19 -0
- data/stubs/hotwire/app/controllers/concerns/set_current_auth.rb +9 -0
- data/stubs/hotwire/app/controllers/password_controller.rb +1 -1
- data/stubs/hotwire/app/controllers/profile_controller.rb +6 -4
- data/stubs/hotwire/app/controllers/welcome_controller.rb +1 -1
- data/stubs/hotwire/app/javascript/application.js +3 -3
- data/stubs/hotwire/app/views/auth/forgot_password.html.erb +12 -17
- data/stubs/hotwire/app/views/auth/login.html.erb +0 -9
- data/stubs/hotwire/app/views/auth/register.html.erb +0 -13
- data/stubs/hotwire/app/views/auth/reset_password.html.erb +0 -7
- data/stubs/hotwire/app/views/dashboard/index.html.erb +9 -10
- data/stubs/hotwire/app/views/layouts/_navigation.html.erb +77 -87
- data/stubs/hotwire/app/views/layouts/application.html.erb +0 -9
- data/stubs/hotwire/app/views/layouts/guest.html.erb +0 -6
- data/stubs/hotwire/app/views/profile/edit.html.erb +19 -22
- data/stubs/hotwire/app/views/profile/partials/_delete_user_form.html.erb +32 -42
- data/stubs/hotwire/app/views/profile/partials/_update_password_form.html.erb +42 -55
- data/stubs/hotwire/app/views/profile/partials/_update_profile_information_form.html.erb +36 -46
- data/stubs/hotwire/app/views/welcome/index.html.erb +34 -46
- data/stubs/hotwire/config/tailwind.config.js +2 -2
- data/stubs/inertia-common/app/controllers/application_controller.rb +1 -0
- data/stubs/inertia-common/app/controllers/auth/authenticated_session_controller.rb +10 -7
- data/stubs/inertia-common/app/controllers/auth/new_password_controller.rb +3 -1
- data/stubs/inertia-common/app/controllers/auth/password_reset_link_controller.rb +3 -1
- data/stubs/inertia-common/app/controllers/auth/registered_user_controller.rb +4 -2
- data/stubs/inertia-common/app/controllers/concerns/authenticate.rb +5 -20
- data/stubs/inertia-common/app/controllers/concerns/handle_inertia_requests.rb +1 -1
- data/stubs/inertia-common/app/controllers/concerns/redirect_if_authenticated.rb +19 -0
- data/stubs/inertia-common/app/controllers/concerns/set_current_auth.rb +9 -0
- data/stubs/inertia-common/app/controllers/password_controller.rb +1 -1
- data/stubs/inertia-common/app/controllers/profile_controller.rb +5 -3
- data/stubs/inertia-common/app/controllers/welcome_controller.rb +1 -1
- data/stubs/inertia-common/test/integration/password_update_test.rb +28 -0
- data/stubs/inertia-common/test/integration/profile_test.rb +51 -0
- data/stubs/inertia-react-ts/app/javascript/Components/ApplicationLogo.tsx +13 -9
- data/stubs/inertia-react-ts/app/javascript/Components/Checkbox.tsx +12 -12
- data/stubs/inertia-react-ts/app/javascript/Components/DangerButton.tsx +20 -15
- data/stubs/inertia-react-ts/app/javascript/Components/Dropdown.tsx +115 -88
- data/stubs/inertia-react-ts/app/javascript/Components/InputError.tsx +14 -7
- data/stubs/inertia-react-ts/app/javascript/Components/InputLabel.tsx +15 -7
- data/stubs/inertia-react-ts/app/javascript/Components/Modal.tsx +60 -60
- data/stubs/inertia-react-ts/app/javascript/Components/NavLink.tsx +21 -16
- data/stubs/inertia-react-ts/app/javascript/Components/PrimaryButton.tsx +20 -15
- data/stubs/inertia-react-ts/app/javascript/Components/ResponsiveNavLink.tsx +19 -14
- data/stubs/inertia-react-ts/app/javascript/Components/SecondaryButton.tsx +22 -16
- data/stubs/inertia-react-ts/app/javascript/Components/TextInput.tsx +32 -24
- data/stubs/inertia-react-ts/app/javascript/Layouts/AuthenticatedLayout.tsx +157 -117
- data/stubs/inertia-react-ts/app/javascript/Layouts/GuestLayout.tsx +15 -15
- data/stubs/inertia-react-ts/app/javascript/Pages/Auth/ForgotPassword.tsx +52 -49
- data/stubs/inertia-react-ts/app/javascript/Pages/Auth/Login.tsx +90 -82
- data/stubs/inertia-react-ts/app/javascript/Pages/Auth/Register.tsx +118 -115
- data/stubs/inertia-react-ts/app/javascript/Pages/Auth/ResetPassword.tsx +63 -60
- data/stubs/inertia-react-ts/app/javascript/Pages/Dashboard.tsx +23 -17
- data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Edit.tsx +31 -27
- data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/DeleteUserForm.tsx +109 -99
- data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/UpdatePasswordForm.tsx +121 -113
- data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/UpdateProfileInformationForm.tsx +76 -69
- data/stubs/inertia-react-ts/app/javascript/Pages/Welcome.tsx +87 -63
- data/stubs/inertia-react-ts/app/javascript/entrypoints/application.tsx +32 -25
- data/stubs/inertia-react-ts/app/views/layouts/application.html.erb +0 -4
- data/stubs/inertia-react-ts/config/tailwind.config.js +2 -2
- data/stubs/inertia-react-ts/vite.config.ts +2 -5
- data/stubs/inertia-vue-ts/app/javascript/Components/ApplicationLogo.vue +10 -6
- data/stubs/inertia-vue-ts/app/javascript/Components/Checkbox.vue +18 -18
- data/stubs/inertia-vue-ts/app/javascript/Components/DangerButton.vue +5 -5
- data/stubs/inertia-vue-ts/app/javascript/Components/Dropdown.vue +60 -57
- data/stubs/inertia-vue-ts/app/javascript/Components/DropdownLink.vue +9 -9
- data/stubs/inertia-vue-ts/app/javascript/Components/InputError.vue +7 -7
- data/stubs/inertia-vue-ts/app/javascript/Components/InputLabel.vue +6 -6
- data/stubs/inertia-vue-ts/app/javascript/Components/Modal.vue +84 -74
- data/stubs/inertia-vue-ts/app/javascript/Components/NavLink.vue +12 -12
- data/stubs/inertia-vue-ts/app/javascript/Components/PrimaryButton.vue +5 -5
- data/stubs/inertia-vue-ts/app/javascript/Components/ResponsiveNavLink.vue +12 -12
- data/stubs/inertia-vue-ts/app/javascript/Components/SecondaryButton.vue +13 -13
- data/stubs/inertia-vue-ts/app/javascript/Components/TextInput.vue +13 -13
- data/stubs/inertia-vue-ts/app/javascript/Layouts/AuthenticatedLayout.vue +168 -136
- data/stubs/inertia-vue-ts/app/javascript/Layouts/GuestLayout.vue +15 -13
- data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/ForgotPassword.vue +56 -49
- data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/Login.vue +78 -72
- data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/Register.vue +101 -97
- data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/ResetPassword.vue +71 -68
- data/stubs/inertia-vue-ts/app/javascript/Pages/Dashboard.vue +22 -14
- data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Edit.vue +34 -30
- data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/DeleteUserForm.vue +87 -83
- data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/UpdatePasswordForm.vue +105 -98
- data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/UpdateProfileInformationForm.vue +69 -59
- data/stubs/inertia-vue-ts/app/javascript/Pages/Welcome.vue +74 -47
- data/stubs/inertia-vue-ts/app/views/layouts/application.html.erb +0 -4
- data/stubs/inertia-vue-ts/config/tailwind.config.js +2 -2
- data/stubs/inertia-vue-ts/vite.config.ts +2 -5
- metadata +18 -6
- data/stubs/hotwire/bin/vite +0 -27
- data/stubs/inertia-common/Procfile.dev +0 -3
- /data/stubs/{hotwire → default}/Procfile.dev +0 -0
- /data/stubs/hotwire/app/javascript/{alpinejs.js → alpinejs.stub} +0 -0
@@ -1,93 +1,99 @@
|
|
1
1
|
<script setup lang="ts">
|
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
|
-
import { Head, Link, useForm } from '@inertiajs/vue3'
|
9
|
-
import { login_path, password_request_path } from '@/routes'
|
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
|
+
import { Head, Link, useForm } from '@inertiajs/vue3'
|
9
|
+
import { login_path, password_request_path } from '@/routes'
|
10
10
|
|
11
11
|
defineProps<{
|
12
|
-
|
13
|
-
|
14
|
-
}>()
|
12
|
+
canResetPassword?: boolean
|
13
|
+
status?: string
|
14
|
+
}>()
|
15
15
|
|
16
16
|
const form = useForm({
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
})
|
17
|
+
email: '',
|
18
|
+
password: '',
|
19
|
+
remember: false,
|
20
|
+
})
|
21
21
|
|
22
22
|
const submit = () => {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
23
|
+
form.post(login_path(), {
|
24
|
+
onFinish: () => {
|
25
|
+
form.reset('password')
|
26
|
+
},
|
27
|
+
})
|
28
|
+
}
|
29
29
|
</script>
|
30
30
|
|
31
31
|
<template>
|
32
|
-
|
33
|
-
|
32
|
+
<GuestLayout>
|
33
|
+
<Head title="Log in" />
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
<div v-if="status" class="mb-4 font-medium text-sm text-green-600">
|
36
|
+
{{ status }}
|
37
|
+
</div>
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
<form @submit.prevent="submit">
|
40
|
+
<div>
|
41
|
+
<InputLabel for="email" value="Email" />
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
43
|
+
<TextInput
|
44
|
+
id="email"
|
45
|
+
type="email"
|
46
|
+
class="mt-1 block w-full"
|
47
|
+
v-model="form.email"
|
48
|
+
required
|
49
|
+
autofocus
|
50
|
+
autocomplete="username"
|
51
|
+
/>
|
52
52
|
|
53
|
-
|
54
|
-
|
53
|
+
<InputError class="mt-2" :message="form.errors.email" />
|
54
|
+
</div>
|
55
55
|
|
56
|
-
|
57
|
-
|
56
|
+
<div class="mt-4">
|
57
|
+
<InputLabel for="password" value="Password" />
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
59
|
+
<TextInput
|
60
|
+
id="password"
|
61
|
+
type="password"
|
62
|
+
class="mt-1 block w-full"
|
63
|
+
v-model="form.password"
|
64
|
+
required
|
65
|
+
autocomplete="current-password"
|
66
|
+
/>
|
67
67
|
|
68
|
-
|
69
|
-
|
68
|
+
<InputError class="mt-2" :message="form.errors.password" />
|
69
|
+
</div>
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
<div class="block mt-4">
|
72
|
+
<label class="flex items-center">
|
73
|
+
<Checkbox name="remember" v-model:checked="form.remember" />
|
74
|
+
<span class="ms-2 text-sm text-gray-600 dark:text-gray-400"
|
75
|
+
>Remember me</span
|
76
|
+
>
|
77
|
+
</label>
|
78
|
+
</div>
|
77
79
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
80
|
+
<div class="flex items-center justify-end mt-4">
|
81
|
+
<Link
|
82
|
+
v-if="canResetPassword"
|
83
|
+
:href="password_request_path()"
|
84
|
+
class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
|
85
|
+
>
|
86
|
+
Forgot your password?
|
87
|
+
</Link>
|
86
88
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
<PrimaryButton
|
90
|
+
class="ms-4"
|
91
|
+
:class="{ 'opacity-25': form.processing }"
|
92
|
+
:disabled="form.processing"
|
93
|
+
>
|
94
|
+
Log in
|
95
|
+
</PrimaryButton>
|
96
|
+
</div>
|
97
|
+
</form>
|
98
|
+
</GuestLayout>
|
93
99
|
</template>
|
@@ -1,106 +1,110 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
import GuestLayout from '@/Layouts/GuestLayout.vue'
|
3
|
-
import InputError from '@/Components/InputError.vue'
|
4
|
-
import InputLabel from '@/Components/InputLabel.vue'
|
5
|
-
import PrimaryButton from '@/Components/PrimaryButton.vue'
|
6
|
-
import TextInput from '@/Components/TextInput.vue'
|
7
|
-
import { Head, Link, useForm } from '@inertiajs/vue3'
|
8
|
-
import { login_path, register_path } from '@/routes'
|
2
|
+
import GuestLayout from '@/Layouts/GuestLayout.vue'
|
3
|
+
import InputError from '@/Components/InputError.vue'
|
4
|
+
import InputLabel from '@/Components/InputLabel.vue'
|
5
|
+
import PrimaryButton from '@/Components/PrimaryButton.vue'
|
6
|
+
import TextInput from '@/Components/TextInput.vue'
|
7
|
+
import { Head, Link, useForm } from '@inertiajs/vue3'
|
8
|
+
import { login_path, register_path } from '@/routes'
|
9
9
|
|
10
10
|
const form = useForm({
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
})
|
11
|
+
name: '',
|
12
|
+
email: '',
|
13
|
+
password: '',
|
14
|
+
password_confirmation: '',
|
15
|
+
})
|
16
16
|
|
17
17
|
const submit = () => {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
}
|
18
|
+
form.post(register_path(), {
|
19
|
+
onFinish: () => {
|
20
|
+
form.reset('password', 'password_confirmation')
|
21
|
+
},
|
22
|
+
})
|
23
|
+
}
|
24
24
|
</script>
|
25
25
|
|
26
26
|
<template>
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
27
|
+
<GuestLayout>
|
28
|
+
<Head title="Register" />
|
29
|
+
|
30
|
+
<form @submit.prevent="submit">
|
31
|
+
<div>
|
32
|
+
<InputLabel for="name" value="Name" />
|
33
|
+
|
34
|
+
<TextInput
|
35
|
+
id="name"
|
36
|
+
type="text"
|
37
|
+
class="mt-1 block w-full"
|
38
|
+
v-model="form.name"
|
39
|
+
required
|
40
|
+
autofocus
|
41
|
+
autocomplete="name"
|
42
|
+
/>
|
43
|
+
|
44
|
+
<InputError class="mt-2" :message="form.errors.name" />
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div class="mt-4">
|
48
|
+
<InputLabel for="email" value="Email" />
|
49
|
+
|
50
|
+
<TextInput
|
51
|
+
id="email"
|
52
|
+
type="email"
|
53
|
+
class="mt-1 block w-full"
|
54
|
+
v-model="form.email"
|
55
|
+
required
|
56
|
+
autocomplete="username"
|
57
|
+
/>
|
58
|
+
|
59
|
+
<InputError class="mt-2" :message="form.errors.email" />
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="mt-4">
|
63
|
+
<InputLabel for="password" value="Password" />
|
64
|
+
|
65
|
+
<TextInput
|
66
|
+
id="password"
|
67
|
+
type="password"
|
68
|
+
class="mt-1 block w-full"
|
69
|
+
v-model="form.password"
|
70
|
+
required
|
71
|
+
autocomplete="new-password"
|
72
|
+
/>
|
73
|
+
|
74
|
+
<InputError class="mt-2" :message="form.errors.password" />
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<div class="mt-4">
|
78
|
+
<InputLabel for="password_confirmation" value="Confirm Password" />
|
79
|
+
|
80
|
+
<TextInput
|
81
|
+
id="password_confirmation"
|
82
|
+
type="password"
|
83
|
+
class="mt-1 block w-full"
|
84
|
+
v-model="form.password_confirmation"
|
85
|
+
required
|
86
|
+
autocomplete="new-password"
|
87
|
+
/>
|
88
|
+
|
89
|
+
<InputError class="mt-2" :message="form.errors.password_confirmation" />
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div class="flex items-center justify-end mt-4">
|
93
|
+
<Link
|
94
|
+
:href="login_path()"
|
95
|
+
class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
|
96
|
+
>
|
97
|
+
Already registered?
|
98
|
+
</Link>
|
99
|
+
|
100
|
+
<PrimaryButton
|
101
|
+
class="ms-4"
|
102
|
+
:class="{ 'opacity-25': form.processing }"
|
103
|
+
:disabled="form.processing"
|
104
|
+
>
|
105
|
+
Register
|
106
|
+
</PrimaryButton>
|
107
|
+
</div>
|
108
|
+
</form>
|
109
|
+
</GuestLayout>
|
106
110
|
</template>
|
@@ -1,89 +1,92 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
import GuestLayout from '@/Layouts/GuestLayout.vue'
|
3
|
-
import InputError from '@/Components/InputError.vue'
|
4
|
-
import InputLabel from '@/Components/InputLabel.vue'
|
5
|
-
import PrimaryButton from '@/Components/PrimaryButton.vue'
|
6
|
-
import TextInput from '@/Components/TextInput.vue'
|
7
|
-
import { Head, useForm } from '@inertiajs/vue3'
|
8
|
-
import { password_store_path } from '@/routes'
|
2
|
+
import GuestLayout from '@/Layouts/GuestLayout.vue'
|
3
|
+
import InputError from '@/Components/InputError.vue'
|
4
|
+
import InputLabel from '@/Components/InputLabel.vue'
|
5
|
+
import PrimaryButton from '@/Components/PrimaryButton.vue'
|
6
|
+
import TextInput from '@/Components/TextInput.vue'
|
7
|
+
import { Head, useForm } from '@inertiajs/vue3'
|
8
|
+
import { password_store_path } from '@/routes'
|
9
9
|
|
10
10
|
const props = defineProps<{
|
11
|
-
|
12
|
-
|
13
|
-
}>()
|
11
|
+
email: string
|
12
|
+
token: string
|
13
|
+
}>()
|
14
14
|
|
15
15
|
const form = useForm({
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
})
|
16
|
+
token: props.token,
|
17
|
+
email: props.email,
|
18
|
+
password: '',
|
19
|
+
password_confirmation: '',
|
20
|
+
})
|
21
21
|
|
22
22
|
const submit = () => {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
23
|
+
form.post(password_store_path(), {
|
24
|
+
onFinish: () => {
|
25
|
+
form.reset('password', 'password_confirmation')
|
26
|
+
},
|
27
|
+
})
|
28
|
+
}
|
29
29
|
</script>
|
30
30
|
|
31
31
|
<template>
|
32
|
-
|
33
|
-
|
32
|
+
<GuestLayout>
|
33
|
+
<Head title="Reset Password" />
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
<form @submit.prevent="submit">
|
36
|
+
<div>
|
37
|
+
<InputLabel for="email" value="Email" />
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
<TextInput
|
40
|
+
id="email"
|
41
|
+
type="email"
|
42
|
+
class="mt-1 block w-full"
|
43
|
+
v-model="form.email"
|
44
|
+
required
|
45
|
+
autofocus
|
46
|
+
autocomplete="username"
|
47
|
+
/>
|
48
48
|
|
49
|
-
|
50
|
-
|
49
|
+
<InputError class="mt-2" :message="form.errors.email" />
|
50
|
+
</div>
|
51
51
|
|
52
|
-
|
53
|
-
|
52
|
+
<div class="mt-4">
|
53
|
+
<InputLabel for="password" value="Password" />
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
55
|
+
<TextInput
|
56
|
+
id="password"
|
57
|
+
type="password"
|
58
|
+
class="mt-1 block w-full"
|
59
|
+
v-model="form.password"
|
60
|
+
required
|
61
|
+
autocomplete="new-password"
|
62
|
+
/>
|
63
63
|
|
64
|
-
|
65
|
-
|
64
|
+
<InputError class="mt-2" :message="form.errors.password" />
|
65
|
+
</div>
|
66
66
|
|
67
|
-
|
68
|
-
|
67
|
+
<div class="mt-4">
|
68
|
+
<InputLabel for="password_confirmation" value="Confirm Password" />
|
69
69
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
70
|
+
<TextInput
|
71
|
+
id="password_confirmation"
|
72
|
+
type="password"
|
73
|
+
class="mt-1 block w-full"
|
74
|
+
v-model="form.password_confirmation"
|
75
|
+
required
|
76
|
+
autocomplete="new-password"
|
77
|
+
/>
|
78
78
|
|
79
|
-
|
80
|
-
|
79
|
+
<InputError class="mt-2" :message="form.errors.password_confirmation" />
|
80
|
+
</div>
|
81
81
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
82
|
+
<div class="flex items-center justify-end mt-4">
|
83
|
+
<PrimaryButton
|
84
|
+
:class="{ 'opacity-25': form.processing }"
|
85
|
+
:disabled="form.processing"
|
86
|
+
>
|
87
|
+
Reset Password
|
88
|
+
</PrimaryButton>
|
89
|
+
</div>
|
90
|
+
</form>
|
91
|
+
</GuestLayout>
|
89
92
|
</template>
|
@@ -1,22 +1,30 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout.vue'
|
3
|
-
import { Head } from '@inertiajs/vue3'
|
2
|
+
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout.vue'
|
3
|
+
import { Head } from '@inertiajs/vue3'
|
4
4
|
</script>
|
5
5
|
|
6
6
|
<template>
|
7
|
-
|
7
|
+
<Head title="Dashboard" />
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
<AuthenticatedLayout>
|
10
|
+
<template #header>
|
11
|
+
<h2
|
12
|
+
class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight"
|
13
|
+
>
|
14
|
+
Dashboard
|
15
|
+
</h2>
|
16
|
+
</template>
|
13
17
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
<div class="py-12">
|
19
|
+
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
20
|
+
<div
|
21
|
+
class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg"
|
22
|
+
>
|
23
|
+
<div class="p-6 text-gray-900 dark:text-gray-100">
|
24
|
+
You're logged in!
|
25
|
+
</div>
|
20
26
|
</div>
|
21
|
-
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</AuthenticatedLayout>
|
22
30
|
</template>
|