Skip to content

Commit

Permalink
feat: Update button and link text for consistency
Browse files Browse the repository at this point in the history
- "Create your MBTA account"
- "Logout" --> "Sign out"
  • Loading branch information
arkadyan committed Aug 21, 2023
1 parent 4720bb2 commit 37f50d3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/concierge_site/lib/helpers/session_helper.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defmodule ConciergeSite.SessionHelper do
end

conn
|> put_flash(:info, "You have been logged out!")
|> put_flash(:info, "You have been signed out.")
|> Guardian.Plug.sign_out(ConciergeSite.Guardian)
|> Conn.clear_session()
|> redirect(redirect_to)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
<% end %>
<div><%= link("Subscriptions", to: trip_path(@conn, :index)) %></div>
<div><%= link("Settings", to: account_path(@conn, :edit)) %></div>
<div><%= link("Logout", to: session_path(@conn, :delete), method: :delete) %></div>
<div><%= link("Sign out", to: session_path(@conn, :delete), method: :delete) %></div>
6 changes: 5 additions & 1 deletion apps/concierge_site/lib/templates/page/landing.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@

<div class="landing-page__buttons row">
<div class="col-12 offset-0 col-lg-8 offset-lg-2">
<%= link "Create an account", to: account_path(@conn, :new), class: "btn btn-primary btn-block" %>
<%= if keycloak_auth?() do %>
<%= link "Create your MBTA account", to: account_path(@conn, :new), class: "btn btn-primary btn-block" %>
<% else %>
<%= link "Create an account", to: account_path(@conn, :new), class: "btn btn-primary btn-block" %>
<% end %>
<%= link "Sign in", to: session_path(@conn, :new), class: "btn btn-outline-primary btn-block" %>

<p class="landing-page__faq">
Expand Down
4 changes: 4 additions & 0 deletions apps/concierge_site/lib/views/page_view.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
defmodule ConciergeSite.PageView do
use ConciergeSite.Web, :view

alias ConciergeSite.SessionHelper

defdelegate keycloak_auth?, to: SessionHelper
end

0 comments on commit 37f50d3

Please sign in to comment.