UX: Hide login/signup header buttons during authentication flows
This commit is contained in:
parent
3b8c468832
commit
6d3d08daad
|
@ -387,7 +387,7 @@ class SessionController < ApplicationController
|
||||||
@error = I18n.t('user_api_key.invalid_token')
|
@error = I18n.t('user_api_key.invalid_token')
|
||||||
end
|
end
|
||||||
|
|
||||||
render layout: 'no_ember'
|
render layout: 'no_ember', locals: { hide_auth_buttons: true }
|
||||||
end
|
end
|
||||||
|
|
||||||
def forgot_password
|
def forgot_password
|
||||||
|
|
|
@ -20,6 +20,7 @@ class Users::OmniauthCallbacksController < ApplicationController
|
||||||
|
|
||||||
def confirm_request
|
def confirm_request
|
||||||
self.class.find_authenticator(params[:provider])
|
self.class.find_authenticator(params[:provider])
|
||||||
|
render locals: { hide_auth_buttons: true }
|
||||||
end
|
end
|
||||||
|
|
||||||
def complete
|
def complete
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<%- end %>
|
<%- end %>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<%- unless current_user %>
|
<%- unless current_user || local_assigns[:hide_auth_buttons] %>
|
||||||
<div class='auth-buttons'>
|
<div class='auth-buttons'>
|
||||||
<%- if can_sign_up? %>
|
<%- if can_sign_up? %>
|
||||||
<a href="<%= path "/signup"%>" class='btn btn-primary btn-small signup-button'><%= I18n.t('sign_up') %></a>
|
<a href="<%= path "/signup"%>" class='btn btn-primary btn-small signup-button'><%= I18n.t('sign_up') %></a>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<%= theme_lookup("header") %>
|
<%= theme_lookup("header") %>
|
||||||
<%= build_plugin_html 'server:header' %>
|
<%= build_plugin_html 'server:header' %>
|
||||||
<section id='main'>
|
<section id='main'>
|
||||||
<%= render partial: 'header' %>
|
<%= render partial: 'header', locals: { hide_auth_buttons: local_assigns[:hide_auth_buttons] } %>
|
||||||
<div id="main-outlet" class="<%= @container_class ? @container_class : 'wrap' %>">
|
<div id="main-outlet" class="<%= @container_class ? @container_class : 'wrap' %>">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue