From cf8f4e1d6f48727db825e908fea58fa7a8c9504c Mon Sep 17 00:00:00 2001 From: Rahul Date: Fri, 20 Dec 2024 02:56:59 +0530 Subject: [PATCH 1/2] UI updates to support social auth extension - #395 --- .../app/views/user_passwords/edit.html.erb | 2 +- .../app/views/user_passwords/new.html.erb | 2 +- .../app/views/user_registrations/new.html.erb | 2 +- .../app/views/user_sessions/new.html.erb | 23 ++++++++++--------- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/templates/app/views/user_passwords/edit.html.erb b/templates/app/views/user_passwords/edit.html.erb index 0f019a65..ce618c01 100644 --- a/templates/app/views/user_passwords/edit.html.erb +++ b/templates/app/views/user_passwords/edit.html.erb @@ -18,7 +18,7 @@
<%= f.button t("spree.update"), name: :commit, - class: 'w-fit py-3 px-7 rounded-full text-body-sm font-bold leading-none uppercase whitespace-nowrap transiton-colors duration-200 bg-red-500 text-white hover:bg-red-700' + class: 'w-full w-fit py-3 px-7 rounded-full text-body-sm font-bold leading-none uppercase whitespace-nowrap transiton-colors duration-200 bg-red-500 text-white hover:bg-red-700' %>
diff --git a/templates/app/views/user_passwords/new.html.erb b/templates/app/views/user_passwords/new.html.erb index 92a20ea4..065683d8 100644 --- a/templates/app/views/user_passwords/new.html.erb +++ b/templates/app/views/user_passwords/new.html.erb @@ -11,7 +11,7 @@
<%= f.button( t("spree.reset_password"), - class: 'w-fit py-3 px-7 rounded-full text-body-sm font-bold leading-none uppercase whitespace-nowrap transiton-colors duration-200 bg-red-500 text-white hover:bg-red-700', + class: 'w-full w-fit py-3 px-7 rounded-full text-body-sm font-bold leading-none uppercase whitespace-nowrap transiton-colors duration-200 bg-red-500 text-white hover:bg-red-700', name: :commit ) %>
diff --git a/templates/app/views/user_registrations/new.html.erb b/templates/app/views/user_registrations/new.html.erb index e961dc69..353ba9e8 100644 --- a/templates/app/views/user_registrations/new.html.erb +++ b/templates/app/views/user_registrations/new.html.erb @@ -23,7 +23,7 @@
<%= f.button t("spree.create"), name: :commit, - class: 'w-fit py-3 px-7 rounded-full text-body-sm font-bold leading-none uppercase whitespace-nowrap transiton-colors duration-200 bg-red-500 text-white hover:bg-red-700' + class: 'w-full w-fit py-3 px-7 rounded-full text-body-sm font-bold leading-none uppercase whitespace-nowrap transiton-colors duration-200 bg-red-500 text-white hover:bg-red-700' %>
diff --git a/templates/app/views/user_sessions/new.html.erb b/templates/app/views/user_sessions/new.html.erb index 442e4b73..7f997d2c 100644 --- a/templates/app/views/user_sessions/new.html.erb +++ b/templates/app/views/user_sessions/new.html.erb @@ -2,7 +2,10 @@
-

<%= I18n.t('spree.login_as_existing') %>

+

<%= I18n.t('spree.login_as_existing') %>

+
+ <%= I18n.t("spree.or") %> <%= link_to I18n.t("spree.create_a_new_account"), signup_path, class:"transition-all duration-300 text-black hover:!text-red-500 dark:text-sand underline" %> +
<%= form_for Spree::User.new, as: :spree_user, url: create_new_session_path, html: { class: "space-y-6 mb-12" } do |f| %>
@@ -15,24 +18,22 @@ <%= f.password_field :password, placeholder: "p455w0rd" %>
-
- <%= f.check_box :remember_me, tabindex: 3 %> - <%= f.label :remember_me, I18n.t("spree.remember_me"), class: "mb-0" %> +
+
+ <%= f.check_box :remember_me, tabindex: 3 %> + <%= f.label :remember_me, I18n.t("spree.remember_me"), class: "mb-0" %> +
+
+ <%= link_to I18n.t("spree.forgot_password"), recover_password_path, class:"transition-all duration-300 text-black hover:!text-red-500 dark:text-sand underline" %>
<%= f.button( t("spree.login"), - class: 'w-fit py-3 px-7 rounded-full text-body-sm font-bold leading-none uppercase whitespace-nowrap transiton-colors duration-200 bg-red-500 text-white hover:bg-red-700', + class: 'w-full py-3 px-7 rounded-full text-body-sm font-bold leading-none uppercase whitespace-nowrap transiton-colors duration-200 bg-red-500 text-white hover:bg-red-700', name: :commit ) %> - <%= link_to I18n.t("spree.forgot_password"), recover_password_path, class:"transition-all duration-300 text-black hover:!text-red-500 dark:text-sand underline" %>
- -
- <%= I18n.t("spree.or") %> <%= link_to I18n.t("spree.create_a_new_account"), signup_path, class:"transition-all duration-300 text-black hover:!text-red-500 dark:text-sand underline" %> -
- <% end %>
From 9297b7fe4bf8400d5f3cd39ea803af17564b62b8 Mon Sep 17 00:00:00 2001 From: Rahul Date: Mon, 23 Dec 2024 23:57:55 +0530 Subject: [PATCH 2/2] Align remember me checkbox and forgot password link --- templates/app/views/user_sessions/new.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/app/views/user_sessions/new.html.erb b/templates/app/views/user_sessions/new.html.erb index 7f997d2c..1e9443db 100644 --- a/templates/app/views/user_sessions/new.html.erb +++ b/templates/app/views/user_sessions/new.html.erb @@ -7,7 +7,7 @@ <%= I18n.t("spree.or") %> <%= link_to I18n.t("spree.create_a_new_account"), signup_path, class:"transition-all duration-300 text-black hover:!text-red-500 dark:text-sand underline" %> - <%= form_for Spree::User.new, as: :spree_user, url: create_new_session_path, html: { class: "space-y-6 mb-12" } do |f| %> + <%= form_for Spree::User.new, as: :spree_user, url: create_new_session_path, html: { class: "space-y-6" } do |f| %>
<%= f.label :email, "#{t("spree.email")}:" %> <%= f.email_field :email, placeholder: 'name@example.com' %> @@ -19,7 +19,7 @@
-
+
<%= f.check_box :remember_me, tabindex: 3 %> <%= f.label :remember_me, I18n.t("spree.remember_me"), class: "mb-0" %>
@@ -34,6 +34,7 @@ name: :commit ) %>
+ <% end %>