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