kaze 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kaze/commands/install_command.rb +25 -13
  3. data/lib/kaze/commands/installs_hotwire_stack.rb +11 -8
  4. data/lib/kaze/commands/installs_inertia_stacks.rb +34 -24
  5. data/lib/kaze/commands/version_command.rb +6 -0
  6. data/lib/kaze/version.rb +1 -1
  7. data/lib/kaze.rb +1 -3
  8. data/stubs/default/app/forms/auth/login_form.rb +2 -8
  9. data/stubs/default/app/forms/auth/new_password_form.rb +1 -1
  10. data/stubs/default/app/forms/update_profile_information_form.rb +1 -1
  11. data/stubs/default/app/mailers/application_mailer.rb +4 -4
  12. data/stubs/default/app/mailers/user_mailer.rb +1 -1
  13. data/stubs/default/app/models/auth.rb +57 -0
  14. data/stubs/default/app/models/current.rb +1 -1
  15. data/stubs/default/app/validators/current_password_validator.rb +1 -1
  16. data/stubs/default/app/validators/email_validator.rb +1 -1
  17. data/stubs/default/app/validators/lowercase_validator.rb +2 -2
  18. data/stubs/default/app/views/layouts/mailer.html.erb +367 -372
  19. data/stubs/default/app/views/layouts/mailer.text.erb +1 -4
  20. data/stubs/default/app/views/user_mailer/reset_password.html.erb +21 -26
  21. data/stubs/default/config/routes.rb +16 -16
  22. data/stubs/default/db/migrate/20240101000001_create_delayed_jobs.rb +1 -1
  23. data/stubs/default/test/factories/users.rb +7 -0
  24. data/stubs/default/test/integration/auth/authentication_test.rb +43 -0
  25. data/stubs/default/test/integration/auth/password_reset_test.rb +41 -0
  26. data/stubs/default/test/integration/auth/registration_test.rb +21 -0
  27. data/stubs/default/test/integration/password_update_test.rb +28 -0
  28. data/stubs/default/test/integration/profile_test.rb +51 -0
  29. data/stubs/default/test/test_helper.rb +38 -0
  30. data/stubs/hotwire/app/components/danger_button_component.rb +1 -1
  31. data/stubs/hotwire/app/components/dropdown_component.html.erb +17 -18
  32. data/stubs/hotwire/app/components/dropdown_component.rb +7 -7
  33. data/stubs/hotwire/app/components/modal_component.html.erb +55 -59
  34. data/stubs/hotwire/app/components/modal_component.rb +6 -6
  35. data/stubs/hotwire/app/components/primary_button_component.rb +1 -1
  36. data/stubs/hotwire/app/components/secondary_button_component.rb +1 -1
  37. data/stubs/hotwire/app/controllers/application_controller.rb +1 -0
  38. data/stubs/hotwire/app/controllers/auth/authenticated_session_controller.rb +12 -9
  39. data/stubs/hotwire/app/controllers/auth/new_password_controller.rb +7 -5
  40. data/stubs/hotwire/app/controllers/auth/password_reset_link_controller.rb +7 -5
  41. data/stubs/hotwire/app/controllers/auth/registered_user_controller.rb +7 -5
  42. data/stubs/hotwire/app/controllers/concerns/authenticate.rb +5 -20
  43. data/stubs/hotwire/app/controllers/concerns/redirect_if_authenticated.rb +19 -0
  44. data/stubs/hotwire/app/controllers/concerns/set_current_auth.rb +9 -0
  45. data/stubs/hotwire/app/controllers/password_controller.rb +3 -3
  46. data/stubs/hotwire/app/controllers/profile_controller.rb +11 -9
  47. data/stubs/hotwire/app/controllers/welcome_controller.rb +1 -1
  48. data/stubs/hotwire/app/javascript/application.js +3 -3
  49. data/stubs/hotwire/app/views/auth/forgot_password.html.erb +12 -17
  50. data/stubs/hotwire/app/views/auth/login.html.erb +0 -9
  51. data/stubs/hotwire/app/views/auth/register.html.erb +0 -13
  52. data/stubs/hotwire/app/views/auth/reset_password.html.erb +0 -7
  53. data/stubs/hotwire/app/views/dashboard/index.html.erb +9 -10
  54. data/stubs/hotwire/app/views/layouts/_navigation.html.erb +77 -87
  55. data/stubs/hotwire/app/views/layouts/application.html.erb +0 -9
  56. data/stubs/hotwire/app/views/layouts/guest.html.erb +0 -6
  57. data/stubs/hotwire/app/views/profile/edit.html.erb +19 -22
  58. data/stubs/hotwire/app/views/profile/partials/_delete_user_form.html.erb +32 -42
  59. data/stubs/hotwire/app/views/profile/partials/_update_password_form.html.erb +42 -55
  60. data/stubs/hotwire/app/views/profile/partials/_update_profile_information_form.html.erb +36 -46
  61. data/stubs/hotwire/app/views/welcome/index.html.erb +34 -46
  62. data/stubs/hotwire/config/importmap.rb +3 -3
  63. data/stubs/hotwire/config/tailwind.config.js +2 -2
  64. data/stubs/inertia-common/app/controllers/application_controller.rb +1 -0
  65. data/stubs/inertia-common/app/controllers/auth/authenticated_session_controller.rb +11 -8
  66. data/stubs/inertia-common/app/controllers/auth/new_password_controller.rb +5 -3
  67. data/stubs/inertia-common/app/controllers/auth/password_reset_link_controller.rb +5 -3
  68. data/stubs/inertia-common/app/controllers/auth/registered_user_controller.rb +5 -3
  69. data/stubs/inertia-common/app/controllers/concerns/authenticate.rb +5 -20
  70. data/stubs/inertia-common/app/controllers/concerns/handle_inertia_requests.rb +1 -1
  71. data/stubs/inertia-common/app/controllers/concerns/redirect_if_authenticated.rb +19 -0
  72. data/stubs/inertia-common/app/controllers/concerns/set_current_auth.rb +9 -0
  73. data/stubs/inertia-common/app/controllers/concerns/verify_csrf_token.rb +4 -4
  74. data/stubs/inertia-common/app/controllers/dashboard_controller.rb +1 -1
  75. data/stubs/inertia-common/app/controllers/password_controller.rb +1 -1
  76. data/stubs/inertia-common/app/controllers/profile_controller.rb +7 -5
  77. data/stubs/inertia-common/app/controllers/welcome_controller.rb +2 -2
  78. data/stubs/inertia-common/bin/vite +6 -6
  79. data/stubs/inertia-common/test/integration/password_update_test.rb +28 -0
  80. data/stubs/inertia-common/test/integration/profile_test.rb +51 -0
  81. data/stubs/inertia-react-ts/app/javascript/Components/ApplicationLogo.tsx +13 -9
  82. data/stubs/inertia-react-ts/app/javascript/Components/Checkbox.tsx +15 -12
  83. data/stubs/inertia-react-ts/app/javascript/Components/DangerButton.tsx +20 -15
  84. data/stubs/inertia-react-ts/app/javascript/Components/Dropdown.tsx +119 -87
  85. data/stubs/inertia-react-ts/app/javascript/Components/InputError.tsx +14 -7
  86. data/stubs/inertia-react-ts/app/javascript/Components/InputLabel.tsx +18 -7
  87. data/stubs/inertia-react-ts/app/javascript/Components/Modal.tsx +60 -60
  88. data/stubs/inertia-react-ts/app/javascript/Components/NavLink.tsx +21 -16
  89. data/stubs/inertia-react-ts/app/javascript/Components/PrimaryButton.tsx +20 -15
  90. data/stubs/inertia-react-ts/app/javascript/Components/ResponsiveNavLink.tsx +19 -14
  91. data/stubs/inertia-react-ts/app/javascript/Components/SecondaryButton.tsx +22 -16
  92. data/stubs/inertia-react-ts/app/javascript/Components/TextInput.tsx +35 -24
  93. data/stubs/inertia-react-ts/app/javascript/Layouts/AuthenticatedLayout.tsx +157 -117
  94. data/stubs/inertia-react-ts/app/javascript/Layouts/GuestLayout.tsx +15 -15
  95. data/stubs/inertia-react-ts/app/javascript/Pages/Auth/ForgotPassword.tsx +52 -49
  96. data/stubs/inertia-react-ts/app/javascript/Pages/Auth/Login.tsx +90 -82
  97. data/stubs/inertia-react-ts/app/javascript/Pages/Auth/Register.tsx +118 -115
  98. data/stubs/inertia-react-ts/app/javascript/Pages/Auth/ResetPassword.tsx +63 -60
  99. data/stubs/inertia-react-ts/app/javascript/Pages/Dashboard.tsx +23 -17
  100. data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Edit.tsx +31 -27
  101. data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/DeleteUserForm.tsx +109 -99
  102. data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/UpdatePasswordForm.tsx +121 -113
  103. data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/UpdateProfileInformationForm.tsx +76 -69
  104. data/stubs/inertia-react-ts/app/javascript/Pages/Welcome.tsx +87 -63
  105. data/stubs/inertia-react-ts/app/javascript/entrypoints/application.tsx +32 -25
  106. data/stubs/inertia-react-ts/app/views/layouts/application.html.erb +0 -4
  107. data/stubs/inertia-react-ts/config/tailwind.config.js +2 -2
  108. data/stubs/inertia-react-ts/vite.config.ts +2 -5
  109. data/stubs/inertia-vue-ts/app/javascript/Components/ApplicationLogo.vue +10 -6
  110. data/stubs/inertia-vue-ts/app/javascript/Components/Checkbox.vue +18 -18
  111. data/stubs/inertia-vue-ts/app/javascript/Components/DangerButton.vue +5 -5
  112. data/stubs/inertia-vue-ts/app/javascript/Components/Dropdown.vue +60 -57
  113. data/stubs/inertia-vue-ts/app/javascript/Components/DropdownLink.vue +9 -9
  114. data/stubs/inertia-vue-ts/app/javascript/Components/InputError.vue +7 -7
  115. data/stubs/inertia-vue-ts/app/javascript/Components/InputLabel.vue +6 -6
  116. data/stubs/inertia-vue-ts/app/javascript/Components/Modal.vue +84 -74
  117. data/stubs/inertia-vue-ts/app/javascript/Components/NavLink.vue +12 -12
  118. data/stubs/inertia-vue-ts/app/javascript/Components/PrimaryButton.vue +5 -5
  119. data/stubs/inertia-vue-ts/app/javascript/Components/ResponsiveNavLink.vue +12 -12
  120. data/stubs/inertia-vue-ts/app/javascript/Components/SecondaryButton.vue +13 -13
  121. data/stubs/inertia-vue-ts/app/javascript/Components/TextInput.vue +13 -13
  122. data/stubs/inertia-vue-ts/app/javascript/Layouts/AuthenticatedLayout.vue +168 -136
  123. data/stubs/inertia-vue-ts/app/javascript/Layouts/GuestLayout.vue +15 -13
  124. data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/ForgotPassword.vue +56 -49
  125. data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/Login.vue +78 -72
  126. data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/Register.vue +101 -97
  127. data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/ResetPassword.vue +71 -68
  128. data/stubs/inertia-vue-ts/app/javascript/Pages/Dashboard.vue +22 -14
  129. data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Edit.vue +34 -30
  130. data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/DeleteUserForm.vue +87 -83
  131. data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/UpdatePasswordForm.vue +105 -98
  132. data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/UpdateProfileInformationForm.vue +69 -59
  133. data/stubs/inertia-vue-ts/app/javascript/Pages/Welcome.vue +74 -47
  134. data/stubs/inertia-vue-ts/app/views/layouts/application.html.erb +0 -4
  135. data/stubs/inertia-vue-ts/config/tailwind.config.js +2 -2
  136. data/stubs/inertia-vue-ts/vite.config.ts +2 -5
  137. metadata +19 -6
  138. data/stubs/hotwire/bin/vite +0 -27
  139. data/stubs/inertia-common/Procfile.dev +0 -3
  140. /data/stubs/{hotwire → default}/Procfile.dev +0 -0
  141. /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>