diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 73a9cf9c..d1f18758 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -73,6 +73,13 @@ module ApplicationHelper "matchu@openneo.net" end + # SVG icon source from Chakra UI! + EXTERNAL_LINK_SVG_SOURCE = ''.html_safe + def external_link_icon + content_tag :svg, EXTERNAL_LINK_SVG_SOURCE, alt: "(external link)", + viewBox: "0 0 24 24", style: "width: 1em; height: 1em" + end + def flashes raw(flash.inject('') do |html, pair| key, value = pair diff --git a/app/views/auth_users/edit.html.erb b/app/views/auth_users/edit.html.erb index a7f22210..c48ef4cf 100644 --- a/app/views/auth_users/edit.html.erb +++ b/app/views/auth_users/edit.html.erb @@ -106,6 +106,17 @@

If you connect a NeoPass, you can use it to log into this DTI account! +

+

+ When you click below, you'll be connected to + <%= link_to "https://account.neopets.com/", target: "_blank" do %> + whatever NeoPass is already logged in + <%= external_link_icon %><% end %>. + If it's your first time connecting, you'll be asked for 3 permissions: + OpenID and Email tell us who you are, and + Linkage tells us your Neopets username. +

+

You'll still be able to use your password to log in too, and you can disconnect this later if you'd like.

diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 90528f6f..22b67728 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -42,20 +42,24 @@
How does it work?

- If this is your first time using NeoPass at Dress to Impress, we'll - create a new DTI account for you automatically! -

+ When you click the button above, we'll connect with + <%= link_to "https://account.neopets.com/", target: "_blank" do %> + your currently logged-in NeoPass + <%= external_link_icon %><% end %>. If this is your first time here, + we'll create a new DTI account for you automatically! +

You'll be asked for 3 permissions: OpenID and Email tell us who you are, and Linkage tells us your Neopets username.

- After that, you'll be able to one-click log in here, any time! + After that, you'll be able to one-click log in here, any time! You'll + never be asked for these permissions again.

To connect an existing DTI account, don't start here! Log in with - your password first, then check the Settings page. + your password first, then connect via the Settings page.