diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 4e7878b62..884e0d240 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,5 +1,5 @@ class ApplicationMailer < ActionMailer::Base - default from: "The Fizzy team " + default from: "Fizzy " layout "mailer" append_view_path Rails.root.join("app/views/mailers") diff --git a/app/mailers/magic_link_mailer.rb b/app/mailers/magic_link_mailer.rb index c56872f4a..f23cc4fbf 100644 --- a/app/mailers/magic_link_mailer.rb +++ b/app/mailers/magic_link_mailer.rb @@ -3,7 +3,7 @@ class MagicLinkMailer < ApplicationMailer @magic_link = magic_link @identity = @magic_link.identity - mail to: @identity.email_address, subject: "Confirm your email" + mail to: @identity.email_address, subject: "Your Fizzy verification code" end private diff --git a/app/views/mailers/magic_link_mailer/sign_in_instructions.html.erb b/app/views/mailers/magic_link_mailer/sign_in_instructions.html.erb index 6033b6165..87b4180d0 100644 --- a/app/views/mailers/magic_link_mailer/sign_in_instructions.html.erb +++ b/app/views/mailers/magic_link_mailer/sign_in_instructions.html.erb @@ -1,10 +1,13 @@ -

Hit the button below to confirm your email.

-<%= link_to "Confirm and return to Fizzy", session_magic_link_url(code: @magic_link.code), class: "btn" %> +<% if !@identity.memberships.any? %> +

Fizzy verification code

+

Please enter this 6-character verification code on the Fizzy sign-in page:

+<% else %> +

Welcome to Fizzy!

+

Please enter this 6-character verification code on the Fizzy sign-up page to create your new account:

+<% end %> -

If Fizzy is on another device, enter this special code instead: -
<%= @magic_link.code %> -

+<%= @magic_link.code %> diff --git a/app/views/mailers/magic_link_mailer/sign_in_instructions.text.erb b/app/views/mailers/magic_link_mailer/sign_in_instructions.text.erb index 215508029..2de3e5533 100644 --- a/app/views/mailers/magic_link_mailer/sign_in_instructions.text.erb +++ b/app/views/mailers/magic_link_mailer/sign_in_instructions.text.erb @@ -1,6 +1,7 @@ -Hit the button below to confirm your email: +<% if @identity.memberships.any? %> +Please enter this 6-character verification code on the Fizzy sign-in page: +<% else %> +Please enter this 6-character verification code on the Fizzy sign-up page to create your new account: +<% end %> -<%= session_magic_link_url(code: @magic_link.code) %> - -If Fizzy is on another device, enter this special code instead: <%= @magic_link.code %> diff --git a/app/views/sessions/magic_links/show.html.erb b/app/views/sessions/magic_links/show.html.erb index 445b3233a..69a9f6cbd 100644 --- a/app/views/sessions/magic_links/show.html.erb +++ b/app/views/sessions/magic_links/show.html.erb @@ -3,14 +3,12 @@
">

<%= @page_title %>

-

Then hit the link to continue

+

Then enter the verfifcation code included in the email below:

-

If your email is on a different device, enter the code included in the email below.

- <%= form_with url: session_magic_link_path, method: :post, html: { data: { controller: token_list("form", "auto-submit" => params[:code].present?)} } do |form| %> - <%= form.text_field :code, required: true, class: "input center txt-align-enter txt-normal", - autofocus: false, autocorrect: "off", autocapitalize: "off", spellcheck: "false", "data-1p-ignore": true, + <%= form.text_field :code, required: true, class: "input center txt-align-enter txt-large", + autofocus: true, autocorrect: "off", autocapitalize: "off", spellcheck: "false", "data-1p-ignore": true, autocomplete: "one-time-code", maxlength: "6", placeholder: "••••••", value: params[:code], data: { form_target: "input", action: "paste->form#debouncedSubmit" } %> <% end %> diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 78430b4f3..b4d0ae45b 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -1,16 +1,16 @@ <% @page_title = "Enter your email" %>
-

Hi! Let’s get you in to Fizzy

+

Let’s get you in to Fizzy

<%= form_with url: session_path, class: "flex flex-column gap txt-medium" do |form| %>
-

If you’ve already got a Fizzy account we’ll get you signed in. If you’re new here, we’ll set you up with your own Fizzy account.

+

If you’ve already got an account we’ll get you signed in. If you’re new here, we’ll set you up with your own Fizzy account.