Fix haml-lint `InstanceVariables` rule for auth/registrations/status (#27341)
parent
0111e48893
commit
f9abe700e7
|
@ -1,6 +1,6 @@
|
|||
# This configuration was generated by
|
||||
# `haml-lint --auto-gen-config`
|
||||
# on 2023-10-09 10:24:59 -0400 using Haml-Lint version 0.51.0.
|
||||
# on 2023-10-11 10:00:39 -0400 using Haml-Lint version 0.51.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the lints are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
|
@ -26,10 +26,9 @@ linters:
|
|||
- 'app/views/admin/reports/show.html.haml'
|
||||
- 'app/views/disputes/strikes/show.html.haml'
|
||||
|
||||
# Offense count: 11
|
||||
# Offense count: 2
|
||||
InstanceVariables:
|
||||
exclude:
|
||||
- 'app/views/auth/registrations/_status.html.haml'
|
||||
- 'app/views/auth/sessions/two_factor/_otp_authentication_form.html.haml'
|
||||
- 'app/views/relationships/_account.html.haml'
|
||||
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
- if !@user.confirmed?
|
||||
- if !user.confirmed?
|
||||
.flash-message.warning
|
||||
= t('auth.status.confirming')
|
||||
= link_to t('auth.didnt_get_confirmation'), new_user_confirmation_path
|
||||
- elsif !@user.approved?
|
||||
- elsif !user.approved?
|
||||
.flash-message.warning
|
||||
= t('auth.status.pending')
|
||||
- elsif @user.account.moved_to_account_id.present?
|
||||
- elsif user.account.moved_to_account_id.present?
|
||||
.flash-message.warning
|
||||
= t('auth.status.redirecting_to', acct: @user.account.moved_to_account.pretty_acct)
|
||||
= t('auth.status.redirecting_to', acct: user.account.moved_to_account.pretty_acct)
|
||||
= link_to t('migrations.cancel'), settings_migration_path
|
||||
|
||||
%h3= t('auth.status.account_status')
|
||||
|
||||
%p.hint
|
||||
- if @user.account.suspended?
|
||||
- if user.account.suspended?
|
||||
%span.negative-hint= t('user_mailer.warning.explanation.suspend')
|
||||
- elsif @user.disabled?
|
||||
- elsif user.disabled?
|
||||
%span.negative-hint= t('user_mailer.warning.explanation.disable')
|
||||
- elsif @user.account.silenced?
|
||||
- elsif user.account.silenced?
|
||||
%span.warning-hint= t('user_mailer.warning.explanation.silence')
|
||||
- else
|
||||
%span.positive-hint= t('auth.status.functional')
|
||||
|
||||
= render partial: 'account_warning', collection: @strikes
|
||||
= render partial: 'account_warning', collection: strikes
|
||||
|
||||
- if @user.account.strikes.exists?
|
||||
- if user.account.strikes.exists?
|
||||
%hr.spacer/
|
||||
|
||||
%p.muted-hint
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- content_for :page_title do
|
||||
= t('settings.account_settings')
|
||||
|
||||
= render 'status'
|
||||
= render partial: 'status', locals: { user: @user, strikes: @strikes }
|
||||
|
||||
%h3= t('auth.security')
|
||||
|
||||
|
|
Loading…
Reference in New Issue