kaze 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kaze/commands/install_command.rb +8 -0
  3. data/lib/kaze/commands/installs_hotwire_stack.rb +5 -2
  4. data/lib/kaze/commands/installs_inertia_stacks.rb +13 -3
  5. data/lib/kaze/version.rb +1 -1
  6. data/stubs/default/app/forms/auth/login_form.rb +2 -8
  7. data/stubs/default/app/forms/update_profile_information_form.rb +1 -1
  8. data/stubs/default/app/models/auth.rb +57 -0
  9. data/stubs/default/app/models/current.rb +1 -1
  10. data/stubs/default/app/validators/current_password_validator.rb +1 -1
  11. data/stubs/default/app/views/layouts/mailer.html.erb +367 -372
  12. data/stubs/default/app/views/layouts/mailer.text.erb +1 -4
  13. data/stubs/default/app/views/user_mailer/reset_password.html.erb +21 -26
  14. data/stubs/default/test/factories/users.rb +7 -0
  15. data/stubs/default/test/integration/auth/authentication_test.rb +43 -0
  16. data/stubs/default/test/integration/auth/password_reset_test.rb +41 -0
  17. data/stubs/default/test/integration/auth/registration_test.rb +21 -0
  18. data/stubs/default/test/integration/password_update_test.rb +28 -0
  19. data/stubs/default/test/integration/profile_test.rb +51 -0
  20. data/stubs/default/test/test_helper.rb +38 -0
  21. data/stubs/hotwire/app/components/dropdown_component.html.erb +17 -18
  22. data/stubs/hotwire/app/components/modal_component.html.erb +55 -59
  23. data/stubs/hotwire/app/controllers/application_controller.rb +1 -0
  24. data/stubs/hotwire/app/controllers/auth/authenticated_session_controller.rb +10 -7
  25. data/stubs/hotwire/app/controllers/auth/new_password_controller.rb +3 -1
  26. data/stubs/hotwire/app/controllers/auth/password_reset_link_controller.rb +3 -1
  27. data/stubs/hotwire/app/controllers/auth/registered_user_controller.rb +4 -2
  28. data/stubs/hotwire/app/controllers/concerns/authenticate.rb +5 -20
  29. data/stubs/hotwire/app/controllers/concerns/redirect_if_authenticated.rb +19 -0
  30. data/stubs/hotwire/app/controllers/concerns/set_current_auth.rb +9 -0
  31. data/stubs/hotwire/app/controllers/password_controller.rb +1 -1
  32. data/stubs/hotwire/app/controllers/profile_controller.rb +6 -4
  33. data/stubs/hotwire/app/controllers/welcome_controller.rb +1 -1
  34. data/stubs/hotwire/app/javascript/application.js +3 -3
  35. data/stubs/hotwire/app/views/auth/forgot_password.html.erb +12 -17
  36. data/stubs/hotwire/app/views/auth/login.html.erb +0 -9
  37. data/stubs/hotwire/app/views/auth/register.html.erb +0 -13
  38. data/stubs/hotwire/app/views/auth/reset_password.html.erb +0 -7
  39. data/stubs/hotwire/app/views/dashboard/index.html.erb +9 -10
  40. data/stubs/hotwire/app/views/layouts/_navigation.html.erb +77 -87
  41. data/stubs/hotwire/app/views/layouts/application.html.erb +0 -9
  42. data/stubs/hotwire/app/views/layouts/guest.html.erb +0 -6
  43. data/stubs/hotwire/app/views/profile/edit.html.erb +19 -22
  44. data/stubs/hotwire/app/views/profile/partials/_delete_user_form.html.erb +32 -42
  45. data/stubs/hotwire/app/views/profile/partials/_update_password_form.html.erb +42 -55
  46. data/stubs/hotwire/app/views/profile/partials/_update_profile_information_form.html.erb +36 -46
  47. data/stubs/hotwire/app/views/welcome/index.html.erb +34 -46
  48. data/stubs/hotwire/config/tailwind.config.js +2 -2
  49. data/stubs/inertia-common/app/controllers/application_controller.rb +1 -0
  50. data/stubs/inertia-common/app/controllers/auth/authenticated_session_controller.rb +10 -7
  51. data/stubs/inertia-common/app/controllers/auth/new_password_controller.rb +3 -1
  52. data/stubs/inertia-common/app/controllers/auth/password_reset_link_controller.rb +3 -1
  53. data/stubs/inertia-common/app/controllers/auth/registered_user_controller.rb +4 -2
  54. data/stubs/inertia-common/app/controllers/concerns/authenticate.rb +5 -20
  55. data/stubs/inertia-common/app/controllers/concerns/handle_inertia_requests.rb +1 -1
  56. data/stubs/inertia-common/app/controllers/concerns/redirect_if_authenticated.rb +19 -0
  57. data/stubs/inertia-common/app/controllers/concerns/set_current_auth.rb +9 -0
  58. data/stubs/inertia-common/app/controllers/password_controller.rb +1 -1
  59. data/stubs/inertia-common/app/controllers/profile_controller.rb +5 -3
  60. data/stubs/inertia-common/app/controllers/welcome_controller.rb +1 -1
  61. data/stubs/inertia-common/test/integration/password_update_test.rb +28 -0
  62. data/stubs/inertia-common/test/integration/profile_test.rb +51 -0
  63. data/stubs/inertia-react-ts/app/javascript/Components/ApplicationLogo.tsx +13 -9
  64. data/stubs/inertia-react-ts/app/javascript/Components/Checkbox.tsx +15 -12
  65. data/stubs/inertia-react-ts/app/javascript/Components/DangerButton.tsx +20 -15
  66. data/stubs/inertia-react-ts/app/javascript/Components/Dropdown.tsx +119 -87
  67. data/stubs/inertia-react-ts/app/javascript/Components/InputError.tsx +14 -7
  68. data/stubs/inertia-react-ts/app/javascript/Components/InputLabel.tsx +18 -7
  69. data/stubs/inertia-react-ts/app/javascript/Components/Modal.tsx +60 -60
  70. data/stubs/inertia-react-ts/app/javascript/Components/NavLink.tsx +21 -16
  71. data/stubs/inertia-react-ts/app/javascript/Components/PrimaryButton.tsx +20 -15
  72. data/stubs/inertia-react-ts/app/javascript/Components/ResponsiveNavLink.tsx +19 -14
  73. data/stubs/inertia-react-ts/app/javascript/Components/SecondaryButton.tsx +22 -16
  74. data/stubs/inertia-react-ts/app/javascript/Components/TextInput.tsx +35 -24
  75. data/stubs/inertia-react-ts/app/javascript/Layouts/AuthenticatedLayout.tsx +157 -117
  76. data/stubs/inertia-react-ts/app/javascript/Layouts/GuestLayout.tsx +15 -15
  77. data/stubs/inertia-react-ts/app/javascript/Pages/Auth/ForgotPassword.tsx +52 -49
  78. data/stubs/inertia-react-ts/app/javascript/Pages/Auth/Login.tsx +90 -82
  79. data/stubs/inertia-react-ts/app/javascript/Pages/Auth/Register.tsx +118 -115
  80. data/stubs/inertia-react-ts/app/javascript/Pages/Auth/ResetPassword.tsx +63 -60
  81. data/stubs/inertia-react-ts/app/javascript/Pages/Dashboard.tsx +23 -17
  82. data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Edit.tsx +31 -27
  83. data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/DeleteUserForm.tsx +109 -99
  84. data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/UpdatePasswordForm.tsx +121 -113
  85. data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/UpdateProfileInformationForm.tsx +76 -69
  86. data/stubs/inertia-react-ts/app/javascript/Pages/Welcome.tsx +87 -63
  87. data/stubs/inertia-react-ts/app/javascript/entrypoints/application.tsx +32 -25
  88. data/stubs/inertia-react-ts/app/views/layouts/application.html.erb +0 -4
  89. data/stubs/inertia-react-ts/config/tailwind.config.js +2 -2
  90. data/stubs/inertia-react-ts/vite.config.ts +2 -5
  91. data/stubs/inertia-vue-ts/app/javascript/Components/ApplicationLogo.vue +10 -6
  92. data/stubs/inertia-vue-ts/app/javascript/Components/Checkbox.vue +18 -18
  93. data/stubs/inertia-vue-ts/app/javascript/Components/DangerButton.vue +5 -5
  94. data/stubs/inertia-vue-ts/app/javascript/Components/Dropdown.vue +60 -57
  95. data/stubs/inertia-vue-ts/app/javascript/Components/DropdownLink.vue +9 -9
  96. data/stubs/inertia-vue-ts/app/javascript/Components/InputError.vue +7 -7
  97. data/stubs/inertia-vue-ts/app/javascript/Components/InputLabel.vue +6 -6
  98. data/stubs/inertia-vue-ts/app/javascript/Components/Modal.vue +84 -74
  99. data/stubs/inertia-vue-ts/app/javascript/Components/NavLink.vue +12 -12
  100. data/stubs/inertia-vue-ts/app/javascript/Components/PrimaryButton.vue +5 -5
  101. data/stubs/inertia-vue-ts/app/javascript/Components/ResponsiveNavLink.vue +12 -12
  102. data/stubs/inertia-vue-ts/app/javascript/Components/SecondaryButton.vue +13 -13
  103. data/stubs/inertia-vue-ts/app/javascript/Components/TextInput.vue +13 -13
  104. data/stubs/inertia-vue-ts/app/javascript/Layouts/AuthenticatedLayout.vue +168 -136
  105. data/stubs/inertia-vue-ts/app/javascript/Layouts/GuestLayout.vue +15 -13
  106. data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/ForgotPassword.vue +56 -49
  107. data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/Login.vue +78 -72
  108. data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/Register.vue +101 -97
  109. data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/ResetPassword.vue +71 -68
  110. data/stubs/inertia-vue-ts/app/javascript/Pages/Dashboard.vue +22 -14
  111. data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Edit.vue +34 -30
  112. data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/DeleteUserForm.vue +87 -83
  113. data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/UpdatePasswordForm.vue +105 -98
  114. data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/UpdateProfileInformationForm.vue +69 -59
  115. data/stubs/inertia-vue-ts/app/javascript/Pages/Welcome.vue +74 -47
  116. data/stubs/inertia-vue-ts/app/views/layouts/application.html.erb +0 -4
  117. data/stubs/inertia-vue-ts/config/tailwind.config.js +2 -2
  118. data/stubs/inertia-vue-ts/vite.config.ts +2 -5
  119. metadata +18 -6
  120. data/stubs/hotwire/bin/vite +0 -27
  121. data/stubs/inertia-common/Procfile.dev +0 -3
  122. /data/stubs/{hotwire → default}/Procfile.dev +0 -0
  123. /data/stubs/hotwire/app/javascript/{alpinejs.js → alpinejs.stub} +0 -0
@@ -1,155 +1,187 @@
1
1
  <script setup lang="ts">
2
- import { ref } from 'vue';
3
- import ApplicationLogo from '@/Components/ApplicationLogo.vue';
4
- import Dropdown from '@/Components/Dropdown.vue';
5
- import DropdownLink from '@/Components/DropdownLink.vue';
6
- import NavLink from '@/Components/NavLink.vue';
7
- import ResponsiveNavLink from '@/Components/ResponsiveNavLink.vue';
8
- import { Link } from '@inertiajs/vue3';
9
- import { dashboard_path, logout_path, profile_edit_path } from '@/routes';
2
+ import { ref } from 'vue'
3
+ import ApplicationLogo from '@/Components/ApplicationLogo.vue'
4
+ import Dropdown from '@/Components/Dropdown.vue'
5
+ import DropdownLink from '@/Components/DropdownLink.vue'
6
+ import NavLink from '@/Components/NavLink.vue'
7
+ import ResponsiveNavLink from '@/Components/ResponsiveNavLink.vue'
8
+ import { Link } from '@inertiajs/vue3'
9
+ import { dashboard_path, logout_path, profile_edit_path } from '@/routes'
10
10
 
11
- const showingNavigationDropdown = ref(false);
11
+ const showingNavigationDropdown = ref(false)
12
12
 
13
- const { pathname = '' } = typeof window !== 'undefined' ? window.location : {};
13
+ const { pathname = '' } = typeof window !== 'undefined' ? window.location : {}
14
14
  </script>
15
15
 
16
16
  <template>
17
- <div>
18
- <div class="min-h-screen bg-gray-100 dark:bg-gray-900">
19
- <nav class="bg-white dark:bg-gray-800 border-b border-gray-100 dark:border-gray-700">
20
- <!-- Primary Navigation Menu -->
21
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
22
- <div class="flex justify-between h-16">
23
- <div class="flex">
24
- <!-- Logo -->
25
- <div class="shrink-0 flex items-center">
26
- <Link :href="dashboard_path()">
27
- <ApplicationLogo
28
- class="block h-9 w-auto fill-current text-gray-800 dark:text-gray-200"
29
- />
30
- </Link>
31
- </div>
17
+ <div>
18
+ <div class="min-h-screen bg-gray-100 dark:bg-gray-900">
19
+ <nav
20
+ class="bg-white dark:bg-gray-800 border-b border-gray-100 dark:border-gray-700"
21
+ >
22
+ <!-- Primary Navigation Menu -->
23
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
24
+ <div class="flex justify-between h-16">
25
+ <div class="flex">
26
+ <!-- Logo -->
27
+ <div class="shrink-0 flex items-center">
28
+ <Link href="/">
29
+ <ApplicationLogo
30
+ class="block h-9 w-auto fill-current text-gray-800 dark:text-gray-200"
31
+ />
32
+ </Link>
33
+ </div>
32
34
 
33
- <!-- Navigation Links -->
34
- <div class="hidden space-x-8 sm:-my-px sm:ms-10 sm:flex">
35
- <NavLink :href="dashboard_path()" :active="pathname.match(/dashboard/) != null">
36
- Dashboard
37
- </NavLink>
38
- </div>
39
- </div>
40
-
41
- <div class="hidden sm:flex sm:items-center sm:ms-6">
42
- <!-- Settings Dropdown -->
43
- <div class="ms-3 relative">
44
- <Dropdown align="right" width="48">
45
- <template #trigger>
46
- <span class="inline-flex rounded-md">
47
- <button
48
- type="button"
49
- class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none transition ease-in-out duration-150"
50
- >
51
- {{ $page.props.auth.user.name }}
35
+ <!-- Navigation Links -->
36
+ <div class="hidden space-x-8 sm:-my-px sm:ms-10 sm:flex">
37
+ <NavLink
38
+ :href="dashboard_path()"
39
+ :active="pathname.match(/dashboard/) != null"
40
+ >
41
+ Dashboard
42
+ </NavLink>
43
+ </div>
44
+ </div>
52
45
 
53
- <svg
54
- class="ms-2 -me-0.5 h-4 w-4"
55
- xmlns="http://www.w3.org/2000/svg"
56
- viewBox="0 0 20 20"
57
- fill="currentColor"
58
- >
59
- <path
60
- fill-rule="evenodd"
61
- d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
62
- clip-rule="evenodd"
63
- />
64
- </svg>
65
- </button>
66
- </span>
67
- </template>
46
+ <div class="hidden sm:flex sm:items-center sm:ms-6">
47
+ <!-- Settings Dropdown -->
48
+ <div class="ms-3 relative">
49
+ <Dropdown align="right" width="48">
50
+ <template #trigger>
51
+ <span class="inline-flex rounded-md">
52
+ <button
53
+ type="button"
54
+ class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none transition ease-in-out duration-150"
55
+ >
56
+ {{ $page.props.auth.user.name }}
68
57
 
69
- <template #content>
70
- <DropdownLink :href="profile_edit_path()"> Profile </DropdownLink>
71
- <DropdownLink :href="logout_path()" method="post" as="button">
72
- Log Out
73
- </DropdownLink>
74
- </template>
75
- </Dropdown>
76
- </div>
77
- </div>
58
+ <svg
59
+ class="ms-2 -me-0.5 h-4 w-4"
60
+ xmlns="http://www.w3.org/2000/svg"
61
+ viewBox="0 0 20 20"
62
+ fill="currentColor"
63
+ >
64
+ <path
65
+ fill-rule="evenodd"
66
+ d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
67
+ clip-rule="evenodd"
68
+ />
69
+ </svg>
70
+ </button>
71
+ </span>
72
+ </template>
78
73
 
79
- <!-- Hamburger -->
80
- <div class="-me-2 flex items-center sm:hidden">
81
- <button
82
- @click="showingNavigationDropdown = !showingNavigationDropdown"
83
- class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-900 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-900 focus:text-gray-500 dark:focus:text-gray-400 transition duration-150 ease-in-out"
84
- >
85
- <svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
86
- <path
87
- :class="{
88
- hidden: showingNavigationDropdown,
89
- 'inline-flex': !showingNavigationDropdown,
90
- }"
91
- stroke-linecap="round"
92
- stroke-linejoin="round"
93
- stroke-width="2"
94
- d="M4 6h16M4 12h16M4 18h16"
95
- />
96
- <path
97
- :class="{
98
- hidden: !showingNavigationDropdown,
99
- 'inline-flex': showingNavigationDropdown,
100
- }"
101
- stroke-linecap="round"
102
- stroke-linejoin="round"
103
- stroke-width="2"
104
- d="M6 18L18 6M6 6l12 12"
105
- />
106
- </svg>
107
- </button>
108
- </div>
109
- </div>
110
- </div>
74
+ <template #content>
75
+ <DropdownLink :href="profile_edit_path()">
76
+ Profile
77
+ </DropdownLink>
78
+ <DropdownLink
79
+ :href="logout_path()"
80
+ method="post"
81
+ as="button"
82
+ >
83
+ Log Out
84
+ </DropdownLink>
85
+ </template>
86
+ </Dropdown>
87
+ </div>
88
+ </div>
111
89
 
112
- <!-- Responsive Navigation Menu -->
113
- <div
114
- :class="{ block: showingNavigationDropdown, hidden: !showingNavigationDropdown }"
115
- class="sm:hidden"
90
+ <!-- Hamburger -->
91
+ <div class="-me-2 flex items-center sm:hidden">
92
+ <button
93
+ @click="showingNavigationDropdown = !showingNavigationDropdown"
94
+ class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-900 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-900 focus:text-gray-500 dark:focus:text-gray-400 transition duration-150 ease-in-out"
95
+ >
96
+ <svg
97
+ class="h-6 w-6"
98
+ stroke="currentColor"
99
+ fill="none"
100
+ viewBox="0 0 24 24"
116
101
  >
117
- <div class="pt-2 pb-3 space-y-1">
118
- <ResponsiveNavLink :href="dashboard_path()" :active="pathname.match(/dashboard/) != null">
119
- Dashboard
120
- </ResponsiveNavLink>
121
- </div>
102
+ <path
103
+ :class="{
104
+ hidden: showingNavigationDropdown,
105
+ 'inline-flex': !showingNavigationDropdown,
106
+ }"
107
+ stroke-linecap="round"
108
+ stroke-linejoin="round"
109
+ stroke-width="2"
110
+ d="M4 6h16M4 12h16M4 18h16"
111
+ />
112
+ <path
113
+ :class="{
114
+ hidden: !showingNavigationDropdown,
115
+ 'inline-flex': showingNavigationDropdown,
116
+ }"
117
+ stroke-linecap="round"
118
+ stroke-linejoin="round"
119
+ stroke-width="2"
120
+ d="M6 18L18 6M6 6l12 12"
121
+ />
122
+ </svg>
123
+ </button>
124
+ </div>
125
+ </div>
126
+ </div>
122
127
 
123
- <!-- Responsive Settings Options -->
124
- <div class="pt-4 pb-1 border-t border-gray-200 dark:border-gray-600">
125
- <div class="px-4">
126
- <div class="font-medium text-base text-gray-800 dark:text-gray-200">
127
- {{ $page.props.auth.user.name }}
128
- </div>
129
- <div class="font-medium text-sm text-gray-500">{{ $page.props.auth.user.email }}</div>
130
- </div>
128
+ <!-- Responsive Navigation Menu -->
129
+ <div
130
+ :class="{
131
+ block: showingNavigationDropdown,
132
+ hidden: !showingNavigationDropdown,
133
+ }"
134
+ class="sm:hidden"
135
+ >
136
+ <div class="pt-2 pb-3 space-y-1">
137
+ <ResponsiveNavLink
138
+ :href="dashboard_path()"
139
+ :active="pathname.match(/dashboard/) != null"
140
+ >
141
+ Dashboard
142
+ </ResponsiveNavLink>
143
+ </div>
131
144
 
132
- <div class="mt-3 space-y-1">
133
- <ResponsiveNavLink :href="profile_edit_path()"> Profile </ResponsiveNavLink>
134
- <ResponsiveNavLink :href="logout_path()" method="post" as="button">
135
- Log Out
136
- </ResponsiveNavLink>
137
- </div>
138
- </div>
139
- </div>
140
- </nav>
145
+ <!-- Responsive Settings Options -->
146
+ <div class="pt-4 pb-1 border-t border-gray-200 dark:border-gray-600">
147
+ <div class="px-4">
148
+ <div
149
+ class="font-medium text-base text-gray-800 dark:text-gray-200"
150
+ >
151
+ {{ $page.props.auth.user.name }}
152
+ </div>
153
+ <div class="font-medium text-sm text-gray-500">
154
+ {{ $page.props.auth.user.email }}
155
+ </div>
156
+ </div>
141
157
 
142
- <!-- Page Heading -->
143
- <header class="bg-white dark:bg-gray-800 shadow" v-if="$slots.header">
144
- <div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
145
- <slot name="header" />
146
- </div>
147
- </header>
158
+ <div class="mt-3 space-y-1">
159
+ <ResponsiveNavLink :href="profile_edit_path()">
160
+ Profile
161
+ </ResponsiveNavLink>
162
+ <ResponsiveNavLink
163
+ :href="logout_path()"
164
+ method="post"
165
+ as="button"
166
+ >
167
+ Log Out
168
+ </ResponsiveNavLink>
169
+ </div>
170
+ </div>
171
+ </div>
172
+ </nav>
148
173
 
149
- <!-- Page Content -->
150
- <main>
151
- <slot />
152
- </main>
174
+ <!-- Page Heading -->
175
+ <header class="bg-white dark:bg-gray-800 shadow" v-if="$slots.header">
176
+ <div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
177
+ <slot name="header" />
153
178
  </div>
179
+ </header>
180
+
181
+ <!-- Page Content -->
182
+ <main>
183
+ <slot />
184
+ </main>
154
185
  </div>
186
+ </div>
155
187
  </template>
@@ -1,20 +1,22 @@
1
1
  <script setup lang="ts">
2
- import ApplicationLogo from '@/Components/ApplicationLogo.vue';
3
- import { Link } from '@inertiajs/vue3';
2
+ import ApplicationLogo from '@/Components/ApplicationLogo.vue'
3
+ import { Link } from '@inertiajs/vue3'
4
4
  </script>
5
5
 
6
6
  <template>
7
- <div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100 dark:bg-gray-900">
8
- <div>
9
- <Link href="/">
10
- <ApplicationLogo class="w-20 h-20 fill-current text-gray-500" />
11
- </Link>
12
- </div>
7
+ <div
8
+ class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100 dark:bg-gray-900"
9
+ >
10
+ <div>
11
+ <Link href="/">
12
+ <ApplicationLogo class="w-20 h-20 fill-current text-gray-500" />
13
+ </Link>
14
+ </div>
13
15
 
14
- <div
15
- class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg"
16
- >
17
- <slot />
18
- </div>
16
+ <div
17
+ class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg"
18
+ >
19
+ <slot />
19
20
  </div>
21
+ </div>
20
22
  </template>
@@ -1,60 +1,67 @@
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_email_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_email_path } from '@/routes'
9
9
 
10
10
  defineProps<{
11
- status?: string;
12
- }>();
11
+ status?: string
12
+ }>()
13
13
 
14
14
  const form = useForm({
15
- email: '',
16
- });
15
+ email: '',
16
+ })
17
17
 
18
18
  const submit = () => {
19
- form.post(password_email_path());
20
- };
19
+ form.post(password_email_path())
20
+ }
21
21
  </script>
22
22
 
23
23
  <template>
24
- <GuestLayout>
25
- <Head title="Forgot Password" />
26
-
27
- <div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
28
- Forgot your password? No problem. Just let us know your email address and we will email you a password reset
29
- link that will allow you to choose a new one.
30
- </div>
31
-
32
- <div v-if="status" class="mb-4 font-medium text-sm text-green-600 dark:text-green-400">
33
- {{ status }}
34
- </div>
35
-
36
- <form @submit.prevent="submit">
37
- <div>
38
- <InputLabel for="email" value="Email" />
39
-
40
- <TextInput
41
- id="email"
42
- type="email"
43
- class="mt-1 block w-full"
44
- v-model="form.email"
45
- required
46
- autofocus
47
- autocomplete="username"
48
- />
49
-
50
- <InputError class="mt-2" :message="form.errors.email" />
51
- </div>
52
-
53
- <div class="flex items-center justify-end mt-4">
54
- <PrimaryButton :class="{ 'opacity-25': form.processing }" :disabled="form.processing">
55
- Email Password Reset Link
56
- </PrimaryButton>
57
- </div>
58
- </form>
59
- </GuestLayout>
24
+ <GuestLayout>
25
+ <Head title="Forgot Password" />
26
+
27
+ <div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
28
+ Forgot your password? No problem. Just let us know your email address and
29
+ we will email you a password reset link that will allow you to choose a
30
+ new one.
31
+ </div>
32
+
33
+ <div
34
+ v-if="status"
35
+ class="mb-4 font-medium text-sm text-green-600 dark:text-green-400"
36
+ >
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
+ />
53
+
54
+ <InputError class="mt-2" :message="form.errors.email" />
55
+ </div>
56
+
57
+ <div class="flex items-center justify-end mt-4">
58
+ <PrimaryButton
59
+ :class="{ 'opacity-25': form.processing }"
60
+ :disabled="form.processing"
61
+ >
62
+ Email Password Reset Link
63
+ </PrimaryButton>
64
+ </div>
65
+ </form>
66
+ </GuestLayout>
60
67
  </template>