diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index d8602b1..490129e 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb @@ -1,20 +1,25 @@ -
-

Resend confirmation instructions

+
- <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> - <%= render "devise/shared/error_messages", resource: resource %> +
-
- <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> -
+

Resend confirmation instructions

-
- <%= f.submit "Resend confirmation instructions" %> -
- <% end %> + <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: "space-y-2 flex flex-col" }) do |f| %> + <%= render "devise/shared/error_messages", resource: resource %> - <%= render "devise/shared/links" %> +
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> +
+ +
+ <%= f.submit "Resend confirmation instructions" %> +
+ <% end %> + + <%= render "devise/shared/links" %> + +
\ No newline at end of file diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index 1499316..41babe5 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -1,9 +1,12 @@ +
+

Change your password

- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %> + <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { + method: :put, class: "space-y-2 flex flex-col" }) do |f| %> <%= render "devise/shared/error_messages", resource: resource %> <%= f.hidden_field :reset_password_token %> @@ -27,4 +30,5 @@ <%= render "devise/shared/links" %> +
\ No newline at end of file diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 4687c10..5a016a0 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -1,20 +1,25 @@ -
+
-

Forgot your password?

+
- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> - <%= render "devise/shared/error_messages", resource: resource %> +

Forgot your password?

-
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %> -
+ <%= form_for(resource, + as: resource_name, + url: password_path(resource_name), + html: { method: :post, class: "space-y-2 flex flex-col" }) do |f| %> + <%= render "devise/shared/error_messages", resource: resource %> -
- <%= f.submit "Send me reset password instructions" %> -
- <% end %> +
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %> +
- <%= render "devise/shared/links" %> +
+ <%= f.submit "Send me reset password instructions" %> +
+ <% end %> + <%= render "devise/shared/links" %> + +
\ No newline at end of file diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 9fa71d1..7e759a0 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -93,11 +93,10 @@
- <%= f.label :password %> - <% if @minimum_password_length %> - (<%= @minimum_password_length %> characters minimum) - <% end %>
- <%= f.password_field :password, autocomplete: "new-password" %> + <%= f.password_field :password, + autocomplete: "new-password", + hint: "#{@minimum_password_length} characters minimum" + %>
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 0d83a99..26091b9 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -15,7 +15,8 @@
- <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> + <%= form_for(resource, as: resource_name, + url: session_path(resource_name), html: { class: "space-y-2 flex flex-col" }) do |f| %>
<%= f.email_field :email, diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index 931745d..fe61889 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -1,57 +1,58 @@ -<%- if controller_name != 'sessions' %> - <%= link_to "Log in", new_session_path(resource_name) %> -<% end %> - -<%- if devise_mapping.registerable? && controller_name != 'registrations' %> - <%= link_to "Sign up", new_registration_path(resource_name) %> -<% end %> - -<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> - <%= link_to "Forgot your password?", new_password_path(resource_name) %> -<% end %> - -<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> - <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %> -<% end %> - -<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> - <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %> -<% end %> - +
+
+
+
+
+
+ + <%= link_to gettext("Register"), new_user_registration_path %> + <%= gettext("Or continue with") %> + +
+
+ +
+ + <%- if devise_mapping.omniauthable? %> + <%- resource_class.omniauth_providers.each do |provider| %> + + +
+ <%= button_to omniauth_authorize_path(resource_name, provider), data: { turbo: false }, + class: "w-full inline-flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-800 rounded-md shadow-sm bg-white dark:bg-black text-sm font-medium text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-900" do %> + <%= gettext("Sign in with #{OmniAuth::Utils.camelize(provider)}") %> + <%= raw icon_for(provider) %> + <% end %> +
+ <% end %> + <% end %> +
+
-
-
-
-
-
-
- - <%= link_to gettext("Register"), new_user_registration_path %> - <%= gettext("Or continue with") %> - -
-
-
+
+ <%- if controller_name != 'sessions' %> + <%= link_to "Log in", new_session_path(resource_name) %> + <% end %> - <%- if devise_mapping.omniauthable? %> - <%- resource_class.omniauth_providers.each do |provider| %> + <%- if devise_mapping.registerable? && controller_name != 'registrations' %> + <%= link_to "Sign up", new_registration_path(resource_name) %> + <% end %> + <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> + <%= link_to "Forgot your password?", new_password_path(resource_name) %> + <% end %> -
- <%= button_to omniauth_authorize_path(resource_name, provider), data: { turbo: false }, - class: "w-full inline-flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-800 rounded-md shadow-sm bg-white dark:bg-black text-sm font-medium text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-900" do %> - <%= gettext("Sign in with #{OmniAuth::Utils.camelize(provider)}") %> - <%= raw icon_for(provider) %> - <% end %> -
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> + <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %> + <% end %> - <% end %> - <% end %> + <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> + <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %> + <% end %> +
-
-
diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb index ffc34de..1ab901f 100644 --- a/app/views/devise/unlocks/new.html.erb +++ b/app/views/devise/unlocks/new.html.erb @@ -1,16 +1,21 @@ -

Resend unlock instructions

-<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> - <%= render "devise/shared/error_messages", resource: resource %> +
-
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %> -
+

Resend unlock instructions

-
- <%= f.submit "Resend unlock instructions" %> -
-<% end %> + <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post, class: "space-y-2 flex flex-col" }) do |f| %> + <%= render "devise/shared/error_messages", resource: resource %> -<%= render "devise/shared/links" %> +
+ <%= f.label :email %>
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %> +
+ +
+ <%= f.submit "Resend unlock instructions" %> +
+ <% end %> + + <%= render "devise/shared/links" %> + +
\ No newline at end of file diff --git a/app/views/shared/_user_menu.html.erb b/app/views/shared/_user_menu.html.erb index 1db24dc..dfe6e21 100644 --- a/app/views/shared/_user_menu.html.erb +++ b/app/views/shared/_user_menu.html.erb @@ -219,7 +219,7 @@ - <%= link_to "Routes.user_session_path(@conn, :delete)}", + <%= button_to destroy_user_session_path, method: :delete, class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> <%= gettext("Log out") %> @@ -262,11 +262,11 @@ <% # end %> <% if !current_user %> - <%= link_to "Routes.user_registration_path(@conn, :new)}", class: "block rounded-md py-2 px-3 text-base font-medium text-white hover:text-white hover:bg-gray-800" do %> + <%= link_to new_user_registration_path, class: "block rounded-md py-2 px-3 text-base font-medium text-white hover:text-white hover:bg-gray-800" do %> <%= gettext("Register") %> <% end %> - <%= link_to "Routes.user_session_path(@conn, :new)}", class: + <%= link_to new_user_session_path, class: "block rounded-md py-2 px-3 text-base font-medium text-white hover:text-white hover:bg-gray-800" do %> <%= gettext("Log in") %> <% end %> @@ -343,7 +343,7 @@
Support License - <%= link_to "Routes.user_session_path(@conn, :delete)}", method: :delete, class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> + <%= button_to destroy_user_session_path, method: :delete, class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> <%= gettext("Log out") %> <% end %>