mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Fix contrast between background and form elements on some pages (#31266)
This commit is contained in:
parent
cc453f2221
commit
2ec1181ee5
9 changed files with 1 additions and 37 deletions
|
@ -5,7 +5,6 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
|
||||||
|
|
||||||
layout 'auth'
|
layout 'auth'
|
||||||
|
|
||||||
before_action :set_body_classes
|
|
||||||
before_action :set_confirmation_user!, only: [:show, :confirm_captcha]
|
before_action :set_confirmation_user!, only: [:show, :confirm_captcha]
|
||||||
before_action :redirect_confirmed_user, if: :signed_in_confirmed_user?
|
before_action :redirect_confirmed_user, if: :signed_in_confirmed_user?
|
||||||
|
|
||||||
|
@ -73,10 +72,6 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
|
||||||
user_signed_in? && current_user.confirmed? && current_user.unconfirmed_email.blank?
|
user_signed_in? && current_user.confirmed? && current_user.unconfirmed_email.blank?
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_body_classes
|
|
||||||
@body_classes = 'lighter'
|
|
||||||
end
|
|
||||||
|
|
||||||
def after_resending_confirmation_instructions_path_for(_resource_name)
|
def after_resending_confirmation_instructions_path_for(_resource_name)
|
||||||
if user_signed_in?
|
if user_signed_in?
|
||||||
if current_user.confirmed? && current_user.approved?
|
if current_user.confirmed? && current_user.approved?
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
class Auth::PasswordsController < Devise::PasswordsController
|
class Auth::PasswordsController < Devise::PasswordsController
|
||||||
skip_before_action :check_self_destruct!
|
skip_before_action :check_self_destruct!
|
||||||
before_action :redirect_invalid_reset_token, only: :edit, unless: :reset_password_token_is_valid?
|
before_action :redirect_invalid_reset_token, only: :edit, unless: :reset_password_token_is_valid?
|
||||||
before_action :set_body_classes
|
|
||||||
|
|
||||||
layout 'auth'
|
layout 'auth'
|
||||||
|
|
||||||
|
@ -24,10 +23,6 @@ class Auth::PasswordsController < Devise::PasswordsController
|
||||||
redirect_to new_password_path(resource_name)
|
redirect_to new_password_path(resource_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_body_classes
|
|
||||||
@body_classes = 'lighter'
|
|
||||||
end
|
|
||||||
|
|
||||||
def reset_password_token_is_valid?
|
def reset_password_token_is_valid?
|
||||||
resource_class.with_reset_password_token(params[:reset_password_token]).present?
|
resource_class.with_reset_password_token(params[:reset_password_token]).present?
|
||||||
end
|
end
|
||||||
|
|
|
@ -105,7 +105,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_body_classes
|
def set_body_classes
|
||||||
@body_classes = %w(edit update).include?(action_name) ? 'admin' : 'lighter'
|
@body_classes = 'admin' if %w(edit update).include?(action_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_invite
|
def set_invite
|
||||||
|
|
|
@ -16,8 +16,6 @@ class Auth::SessionsController < Devise::SessionsController
|
||||||
|
|
||||||
include Auth::TwoFactorAuthenticationConcern
|
include Auth::TwoFactorAuthenticationConcern
|
||||||
|
|
||||||
before_action :set_body_classes
|
|
||||||
|
|
||||||
content_security_policy only: :new do |p|
|
content_security_policy only: :new do |p|
|
||||||
p.form_action(false)
|
p.form_action(false)
|
||||||
end
|
end
|
||||||
|
@ -103,10 +101,6 @@ class Auth::SessionsController < Devise::SessionsController
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_body_classes
|
|
||||||
@body_classes = 'lighter'
|
|
||||||
end
|
|
||||||
|
|
||||||
def home_paths(resource)
|
def home_paths(resource)
|
||||||
paths = [about_path, '/explore']
|
paths = [about_path, '/explore']
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ class Auth::SetupController < ApplicationController
|
||||||
|
|
||||||
before_action :authenticate_user!
|
before_action :authenticate_user!
|
||||||
before_action :require_unconfirmed_or_pending!
|
before_action :require_unconfirmed_or_pending!
|
||||||
before_action :set_body_classes
|
|
||||||
before_action :set_user
|
before_action :set_user
|
||||||
|
|
||||||
skip_before_action :require_functional!
|
skip_before_action :require_functional!
|
||||||
|
@ -35,10 +34,6 @@ class Auth::SetupController < ApplicationController
|
||||||
@user = current_user
|
@user = current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_body_classes
|
|
||||||
@body_classes = 'lighter'
|
|
||||||
end
|
|
||||||
|
|
||||||
def user_params
|
def user_params
|
||||||
params.require(:user).permit(:email)
|
params.require(:user).permit(:email)
|
||||||
end
|
end
|
||||||
|
|
|
@ -83,7 +83,6 @@ module Auth::TwoFactorAuthenticationConcern
|
||||||
def prompt_for_two_factor(user)
|
def prompt_for_two_factor(user)
|
||||||
register_attempt_in_session(user)
|
register_attempt_in_session(user)
|
||||||
|
|
||||||
@body_classes = 'lighter'
|
|
||||||
@webauthn_enabled = user.webauthn_enabled?
|
@webauthn_enabled = user.webauthn_enabled?
|
||||||
@scheme_type = if user.webauthn_enabled? && user_params[:otp_attempt].blank?
|
@scheme_type = if user.webauthn_enabled? && user_params[:otp_attempt].blank?
|
||||||
'webauthn'
|
'webauthn'
|
||||||
|
|
|
@ -42,7 +42,6 @@ module ChallengableConcern
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_challenge
|
def render_challenge
|
||||||
@body_classes = 'lighter'
|
|
||||||
render 'auth/challenges/new', layout: 'auth'
|
render 'auth/challenges/new', layout: 'auth'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ class MailSubscriptionsController < ApplicationController
|
||||||
|
|
||||||
skip_before_action :require_functional!
|
skip_before_action :require_functional!
|
||||||
|
|
||||||
before_action :set_body_classes
|
|
||||||
before_action :set_user
|
before_action :set_user
|
||||||
before_action :set_type
|
before_action :set_type
|
||||||
|
|
||||||
|
@ -25,10 +24,6 @@ class MailSubscriptionsController < ApplicationController
|
||||||
not_found unless @user
|
not_found unless @user
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_body_classes
|
|
||||||
@body_classes = 'lighter'
|
|
||||||
end
|
|
||||||
|
|
||||||
def set_type
|
def set_type
|
||||||
@type = email_type_from_param
|
@type = email_type_from_param
|
||||||
end
|
end
|
||||||
|
|
|
@ -66,10 +66,6 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.lighter {
|
|
||||||
background: $ui-base-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.with-modals {
|
&.with-modals {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
@ -109,7 +105,6 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
&.embed {
|
&.embed {
|
||||||
background: lighten($ui-base-color, 4%);
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
|
||||||
|
@ -122,15 +117,12 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
&.admin {
|
&.admin {
|
||||||
background: var(--background-color);
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.error {
|
&.error {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $darker-text-color;
|
|
||||||
background: $ui-base-color;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
Loading…
Reference in a new issue