mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-16 12:12:14 +00:00
Fix haml-lint InstanceVariables
rule for auth/registrations/edit (#26061)
This commit is contained in:
parent
f6dda59e5d
commit
6657695ec6
|
@ -1,6 +1,6 @@
|
|||
# This configuration was generated by
|
||||
# `haml-lint --auto-gen-config`
|
||||
# on 2023-07-18 11:29:47 -0400 using Haml-Lint version 0.48.0.
|
||||
# on 2023-07-18 11:56:05 -0400 using Haml-Lint version 0.48.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,13 +26,12 @@ linters:
|
|||
- 'app/views/admin/reports/show.html.haml'
|
||||
- 'app/views/disputes/strikes/show.html.haml'
|
||||
|
||||
# Offense count: 41
|
||||
# Offense count: 40
|
||||
InstanceVariables:
|
||||
exclude:
|
||||
- 'app/views/admin/reports/_actions.html.haml'
|
||||
- 'app/views/admin/roles/_form.html.haml'
|
||||
- 'app/views/admin/webhooks/_form.html.haml'
|
||||
- 'app/views/auth/registrations/_sessions.html.haml'
|
||||
- 'app/views/auth/registrations/_status.html.haml'
|
||||
- 'app/views/auth/sessions/two_factor/_otp_authentication_form.html.haml'
|
||||
- 'app/views/authorize_interactions/_post_follow_actions.html.haml'
|
||||
|
|
16
app/views/auth/registrations/_session.html.haml
Normal file
16
app/views/auth/registrations/_session.html.haml
Normal file
|
@ -0,0 +1,16 @@
|
|||
%tr
|
||||
%td
|
||||
%span{ title: session.user_agent }<
|
||||
= fa_icon "#{session_device_icon(session)} fw", 'aria-label': session_device_icon(session)
|
||||
= ' '
|
||||
= t 'sessions.description', browser: t("sessions.browsers.#{session.browser}", default: session.browser.to_s), platform: t("sessions.platforms.#{session.platform}", default: session.platform.to_s)
|
||||
%td
|
||||
%samp= session.ip
|
||||
%td
|
||||
- if current_session.session_id == session.session_id
|
||||
= t 'sessions.current_session'
|
||||
- else
|
||||
%time.time-ago{ datetime: session.updated_at.iso8601, title: l(session.updated_at) }= l(session.updated_at)
|
||||
%td
|
||||
- if current_session.session_id != session.session_id && !current_account.suspended?
|
||||
= table_link_to 'times', t('sessions.revoke'), settings_session_path(session), method: :delete
|
|
@ -14,21 +14,4 @@
|
|||
%th= t 'sessions.activity'
|
||||
%th
|
||||
%tbody
|
||||
- @sessions.each do |session|
|
||||
%tr
|
||||
%td
|
||||
%span{ title: session.user_agent }<
|
||||
= fa_icon "#{session_device_icon(session)} fw", 'aria-label': session_device_icon(session)
|
||||
= ' '
|
||||
= t 'sessions.description', browser: t("sessions.browsers.#{session.browser}", default: session.browser.to_s), platform: t("sessions.platforms.#{session.platform}", default: session.platform.to_s)
|
||||
%td
|
||||
%samp= session.ip
|
||||
%td
|
||||
- if current_session.session_id == session.session_id
|
||||
= t 'sessions.current_session'
|
||||
- else
|
||||
%time.time-ago{ datetime: session.updated_at.iso8601, title: l(session.updated_at) }= l(session.updated_at)
|
||||
%td
|
||||
- if current_session.session_id != session.session_id && !current_account.suspended?
|
||||
= table_link_to 'times', t('sessions.revoke'), settings_session_path(session), method: :delete
|
||||
|
||||
= render partial: 'session', collection: sessions
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
%hr.spacer/
|
||||
|
||||
= render 'sessions'
|
||||
= render partial: 'sessions', object: @sessions
|
||||
|
||||
- unless current_account.suspended?
|
||||
%hr.spacer/
|
||||
|
|
Loading…
Reference in a new issue