about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-03-15 15:07:43 -0400
committerGitHub <noreply@github.com>2023-03-15 20:07:43 +0100
commit65669d3c5719e72000bf26849d0ee1eaec1f9d1b (patch)
tree10ee37c8188e69516bd5e9a045f966b6e1124699 /app/views
parent0b8b0ef65221e5341cd81b212f0e40722ffd5ef7 (diff)
Fix more haml-lint Rubocop (#24107)
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/account_actions/new.html.haml2
-rw-r--r--app/views/admin/accounts/show.html.haml2
-rw-r--r--app/views/admin/action_logs/index.html.haml2
-rw-r--r--app/views/admin/change_emails/show.html.haml2
-rw-r--r--app/views/admin/custom_emojis/index.html.haml4
-rw-r--r--app/views/admin/dashboard/index.html.haml2
-rw-r--r--app/views/application/_card.html.haml2
-rw-r--r--app/views/auth/registrations/_sessions.html.haml2
-rw-r--r--app/views/auth/sessions/new.html.haml2
-rw-r--r--app/views/layouts/mailer.html.haml2
-rw-r--r--app/views/notification_mailer/_status.html.haml2
-rw-r--r--app/views/notification_mailer/favourite.html.haml2
-rw-r--r--app/views/notification_mailer/follow_request.html.haml2
-rw-r--r--app/views/settings/login_activities/_login_activity.html.haml2
-rw-r--r--app/views/settings/preferences/appearance/show.html.haml4
-rw-r--r--app/views/statuses/_detailed_status.html.haml6
-rw-r--r--app/views/statuses/_og_image.html.haml2
-rw-r--r--app/views/statuses/_status.html.haml2
-rw-r--r--app/views/user_mailer/suspicious_sign_in.html.haml2
-rw-r--r--app/views/user_mailer/webauthn_credential_added.html.haml2
-rw-r--r--app/views/user_mailer/webauthn_credential_deleted.html.haml2
21 files changed, 25 insertions, 25 deletions
diff --git a/app/views/admin/account_actions/new.html.haml b/app/views/admin/account_actions/new.html.haml
index c7bb618df..2a0cae15a 100644
--- a/app/views/admin/account_actions/new.html.haml
+++ b/app/views/admin/account_actions/new.html.haml
@@ -5,7 +5,7 @@
   = f.input :report_id, as: :hidden
 
   .fields-group
-    = f.input :type, as: :radio_buttons, collection: Admin::AccountAction.types_for_account(@account), include_blank: false, wrapper: :with_block_label, label_method: ->(type) { safe_join([I18n.t("simple_form.labels.admin_account_action.types.#{type}"), content_tag(:span, I18n.t("simple_form.hints.admin_account_action.types.#{type}"), class: 'hint')])}, hint: t('simple_form.hints.admin_account_action.type_html', acct: @account.pretty_acct)
+    = f.input :type, as: :radio_buttons, collection: Admin::AccountAction.types_for_account(@account), include_blank: false, wrapper: :with_block_label, label_method: ->(type) { safe_join([I18n.t("simple_form.labels.admin_account_action.types.#{type}"), content_tag(:span, I18n.t("simple_form.hints.admin_account_action.types.#{type}"), class: 'hint')]) }, hint: t('simple_form.hints.admin_account_action.type_html', acct: @account.pretty_acct)
 
   - if @account.local?
     %hr.spacer/
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index f5ae88379..44867d0a2 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -187,7 +187,7 @@
             %th= t('admin.accounts.shared_inbox_url')
             %td
               = @account.shared_inbox_url
-              = fa_icon DeliveryFailureTracker.available?(@account.shared_inbox_url) ? 'check': 'times'
+              = fa_icon DeliveryFailureTracker.available?(@account.shared_inbox_url) ? 'check' : 'times'
             %td
               - if @domain_block.nil?
                 = table_link_to 'ban', t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @account.domain)
diff --git a/app/views/admin/action_logs/index.html.haml b/app/views/admin/action_logs/index.html.haml
index e2992fb80..4c78797c1 100644
--- a/app/views/admin/action_logs/index.html.haml
+++ b/app/views/admin/action_logs/index.html.haml
@@ -16,7 +16,7 @@
     .filter-subset.filter-subset--with-select
       %strong= t('admin.action_logs.filter_by_action')
       .input.select.optional
-        = select_tag :action_type, options_for_select(Admin::ActionLogFilter::ACTION_TYPE_MAP.keys.map { |key| [I18n.t("admin.action_logs.action_types.#{key}"), key]}, params[:action_type]), prompt: I18n.t('admin.accounts.moderation.all')
+        = select_tag :action_type, options_for_select(Admin::ActionLogFilter::ACTION_TYPE_MAP.keys.map { |key| [I18n.t("admin.action_logs.action_types.#{key}"), key] }, params[:action_type]), prompt: I18n.t('admin.accounts.moderation.all')
 
 - if @action_logs.empty?
   .muted-hint.center-text
diff --git a/app/views/admin/change_emails/show.html.haml b/app/views/admin/change_emails/show.html.haml
index bc00d6114..8536a18d2 100644
--- a/app/views/admin/change_emails/show.html.haml
+++ b/app/views/admin/change_emails/show.html.haml
@@ -9,4 +9,4 @@
     = f.input :unconfirmed_email, wrapper: :with_label, label: t('admin.accounts.change_email.new_email')
 
   .actions
-    = f.button :submit, class: "button", value: t('admin.accounts.change_email.submit')
+    = f.button :submit, class: 'button', value: t('admin.accounts.change_email.submit')
diff --git a/app/views/admin/custom_emojis/index.html.haml b/app/views/admin/custom_emojis/index.html.haml
index bfec0407e..6ded4b433 100644
--- a/app/views/admin/custom_emojis/index.html.haml
+++ b/app/views/admin/custom_emojis/index.html.haml
@@ -15,12 +15,12 @@
       %li= filter_link_to t('admin.accounts.location.all'), local: nil, remote: nil
       %li
         - if selected? local: '1', remote: nil
-          = filter_link_to t('admin.accounts.location.local'), {local: nil, remote: nil}, {local: '1', remote: nil}
+          = filter_link_to t('admin.accounts.location.local'), { local: nil, remote: nil }, { local: '1', remote: nil }
         - else
           = filter_link_to t('admin.accounts.location.local'), local: '1', remote: nil
       %li
         - if selected? remote: '1', local: nil
-          = filter_link_to t('admin.accounts.location.remote'), {remote: nil, local: nil}, {remote: '1', local: nil}
+          = filter_link_to t('admin.accounts.location.remote'), { remote: nil, local: nil }, { remote: '1', local: nil }
         - else
           = filter_link_to t('admin.accounts.location.remote'), remote: '1', local: nil
 
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml
index 8354f0b9f..e05215327 100644
--- a/app/views/admin/dashboard/index.html.haml
+++ b/app/views/admin/dashboard/index.html.haml
@@ -59,7 +59,7 @@
     = react_admin_component :dimension, dimension: 'servers', start_at: @time_period.first, end_at: @time_period.last, limit: 8, label: t('admin.dashboard.top_servers')
 
   .dashboard__item.dashboard__item--span-double-column
-    = react_admin_component :retention, start_at: @time_period.last - 6.months,   end_at: @time_period.last, frequency: 'month'
+    = react_admin_component :retention, start_at: @time_period.last - 6.months, end_at: @time_period.last, frequency: 'month'
 
   .dashboard__item.dashboard__item--span-double-row
     = react_admin_component :trends, limit: 7
diff --git a/app/views/application/_card.html.haml b/app/views/application/_card.html.haml
index 3d0e6b1da..719856d49 100644
--- a/app/views/application/_card.html.haml
+++ b/app/views/application/_card.html.haml
@@ -13,4 +13,4 @@
           %strong.emojify.p-name= display_name(account, custom_emojify: true)
         %span
           = acct(account)
-          = fa_icon('lock', { data: ({hidden: true} unless account.locked?)})
+          = fa_icon('lock', { data: ({ hidden: true } unless account.locked?) })
diff --git a/app/views/auth/registrations/_sessions.html.haml b/app/views/auth/registrations/_sessions.html.haml
index c094dfd25..55d753c18 100644
--- a/app/views/auth/registrations/_sessions.html.haml
+++ b/app/views/auth/registrations/_sessions.html.haml
@@ -20,7 +20,7 @@
             %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}"), platform: t("sessions.platforms.#{session.platform}", default: "#{session.platform}")
+              = 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
diff --git a/app/views/auth/sessions/new.html.haml b/app/views/auth/sessions/new.html.haml
index e98c1ff3d..7914e0157 100644
--- a/app/views/auth/sessions/new.html.haml
+++ b/app/views/auth/sessions/new.html.haml
@@ -19,7 +19,7 @@
     .actions
       = f.button :button, t('auth.login'), type: :submit
 
-- if devise_mapping.omniauthable? and resource_class.omniauth_providers.any?
+- if devise_mapping.omniauthable? && resource_class.omniauth_providers.any?
   .simple_form.alternative-login
     %h4= omniauth_only? ? t('auth.log_in_with') : t('auth.or_log_in_with')
 
diff --git a/app/views/layouts/mailer.html.haml b/app/views/layouts/mailer.html.haml
index d816f1b8c..43c855927 100644
--- a/app/views/layouts/mailer.html.haml
+++ b/app/views/layouts/mailer.html.haml
@@ -35,7 +35,7 @@
                 %tbody
                   %tr
                     %td.content-cell.content-end
-                      != "&nbsp; "
+                      != '&nbsp; '
                   %tr
                     %td.blank-cell.footer
                       .email-row
diff --git a/app/views/notification_mailer/_status.html.haml b/app/views/notification_mailer/_status.html.haml
index 03f49c73d..fd65039ae 100644
--- a/app/views/notification_mailer/_status.html.haml
+++ b/app/views/notification_mailer/_status.html.haml
@@ -20,7 +20,7 @@
                                 %tbody
                                   %tr
                                     %td{ align: 'left', width: 48 }
-                                      = image_tag full_asset_url(status.account.avatar.url), alt:''
+                                      = image_tag full_asset_url(status.account.avatar.url), alt: ''
                                     %td{ align: 'left' }
                                       %bdi= display_name(status.account)
                                       = "@#{status.account.pretty_acct}"
diff --git a/app/views/notification_mailer/favourite.html.haml b/app/views/notification_mailer/favourite.html.haml
index 5d9be3f57..4ec89172d 100644
--- a/app/views/notification_mailer/favourite.html.haml
+++ b/app/views/notification_mailer/favourite.html.haml
@@ -17,7 +17,7 @@
                                 %tbody
                                   %tr
                                     %td
-                                      = image_tag full_pack_url('media/images/mailer/icon_grade.png'), alt:''
+                                      = image_tag full_pack_url('media/images/mailer/icon_grade.png'), alt: ''
 
                               %h1= t 'notification_mailer.favourite.title'
                               %p.lead= t('notification_mailer.favourite.body', name: @account.pretty_acct)
diff --git a/app/views/notification_mailer/follow_request.html.haml b/app/views/notification_mailer/follow_request.html.haml
index 4c32c831e..3885a411d 100644
--- a/app/views/notification_mailer/follow_request.html.haml
+++ b/app/views/notification_mailer/follow_request.html.haml
@@ -39,5 +39,5 @@
                             %tbody
                               %tr
                                 %td.button-primary
-                                  = link_to web_url("follow_requests") do
+                                  = link_to web_url('follow_requests') do
                                     %span= t 'notification_mailer.follow_request.action'
diff --git a/app/views/settings/login_activities/_login_activity.html.haml b/app/views/settings/login_activities/_login_activity.html.haml
index 0c2c7087d..9f4c24d87 100644
--- a/app/views/settings/login_activities/_login_activity.html.haml
+++ b/app/views/settings/login_activities/_login_activity.html.haml
@@ -1,6 +1,6 @@
 - method_str = content_tag(:span, login_activity.omniauth? ? t(login_activity.provider, scope: 'auth.providers') : t(login_activity.authentication_method, scope: 'login_activities.authentication_methods'), class: 'target')
 - ip_str = content_tag(:span, login_activity.ip, class: 'target')
-- browser_str = content_tag(:span, t('sessions.description', browser: t("sessions.browsers.#{login_activity.browser}", default: "#{login_activity.browser}"), platform: t("sessions.platforms.#{login_activity.platform}", default: "#{login_activity.platform}")), class: 'target', title: login_activity.user_agent)
+- browser_str = content_tag(:span, t('sessions.description', browser: t("sessions.browsers.#{login_activity.browser}", default: login_activity.browser.to_s), platform: t("sessions.platforms.#{login_activity.platform}", default: login_activity.platform.to_)), class: 'target', title: login_activity.user_agent)
 
 .log-entry
   .log-entry__header
diff --git a/app/views/settings/preferences/appearance/show.html.haml b/app/views/settings/preferences/appearance/show.html.haml
index 9e3964f21..bc23df647 100644
--- a/app/views/settings/preferences/appearance/show.html.haml
+++ b/app/views/settings/preferences/appearance/show.html.haml
@@ -13,7 +13,7 @@
 
   - unless I18n.locale == :en
     .flash-message.translation-prompt
-      #{t 'appearance.localization.body'} #{content_tag(:a, t('appearance.localization.guide_link_text'), href: t('appearance.localization.guide_link'), target: "_blank", rel: "noopener")}
+      #{t 'appearance.localization.body'} #{content_tag(:a, t('appearance.localization.guide_link_text'), href: t('appearance.localization.guide_link'), target: '_blank', rel: 'noopener')}
 
   %h4= t 'appearance.advanced_web_interface'
 
@@ -53,7 +53,7 @@
   %h4= t 'appearance.sensitive_content'
 
   .fields-group
-    = f.input :setting_display_media, collection: ['default', 'show_all', 'hide_all'],label_method: lambda { |item| t("simple_form.hints.defaults.setting_display_media_#{item}") }, hint: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', wrapper: :with_floating_label
+    = f.input :setting_display_media, collection: ['default', 'show_all', 'hide_all'], label_method: lambda { |item| t("simple_form.hints.defaults.setting_display_media_#{item}") }, hint: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', wrapper: :with_floating_label
 
   .fields-group
     = f.input :setting_use_blurhash, as: :boolean, wrapper: :with_label
diff --git a/app/views/statuses/_detailed_status.html.haml b/app/views/statuses/_detailed_status.html.haml
index bf498e33d..70cfbd6b8 100644
--- a/app/views/statuses/_detailed_status.html.haml
+++ b/app/views/statuses/_detailed_status.html.haml
@@ -62,18 +62,18 @@
       - else
         = fa_icon('reply-all')
       %span.detailed-status__reblogs>= friendly_number_to_human status.replies_count
-      = " "
+      = ' '
     ·
     - if status.public_visibility? || status.unlisted_visibility?
       %span.detailed-status__link
         = fa_icon('retweet')
         %span.detailed-status__reblogs>= friendly_number_to_human status.reblogs_count
-        = " "
+        = ' '
       ·
     %span.detailed-status__link
       = fa_icon('star')
       %span.detailed-status__favorites>= friendly_number_to_human status.favourites_count
-      = " "
+      = ' '
 
     - if user_signed_in?
       ·
diff --git a/app/views/statuses/_og_image.html.haml b/app/views/statuses/_og_image.html.haml
index 39f390fdf..1ae97adff 100644
--- a/app/views/statuses/_og_image.html.haml
+++ b/app/views/statuses/_og_image.html.haml
@@ -31,7 +31,7 @@
       - player_card = true
       = opengraph 'og:image', full_asset_url(account.avatar.url(:original))
       = opengraph 'og:image:width', '400'
-      = opengraph 'og:image:height','400'
+      = opengraph 'og:image:height', '400'
       = opengraph 'og:audio', full_asset_url(media.file.url(:original))
       = opengraph 'og:audio:secure_url', full_asset_url(media.file.url(:original))
       = opengraph 'og:audio:type', media.file_content_type
diff --git a/app/views/statuses/_status.html.haml b/app/views/statuses/_status.html.haml
index 3b7152753..afeb55faf 100644
--- a/app/views/statuses/_status.html.haml
+++ b/app/views/statuses/_status.html.haml
@@ -11,7 +11,7 @@
   h_class           = microformats_h_class(status, is_predecessor, is_successor, include_threads)
   style_classes     = style_classes(status, is_predecessor, is_successor, include_threads)
   mf_classes        = microformats_classes(status, is_direct_parent, is_direct_child)
-  entry_classes     = h_class + ' ' + mf_classes + ' ' + style_classes
+  entry_classes     = "#{h_class} #{mf_classes} #{style_classes}"
 
 - if status.reply? && include_threads
   - if @next_ancestor
diff --git a/app/views/user_mailer/suspicious_sign_in.html.haml b/app/views/user_mailer/suspicious_sign_in.html.haml
index 856f9fb7c..e4ad500c3 100644
--- a/app/views/user_mailer/suspicious_sign_in.html.haml
+++ b/app/views/user_mailer/suspicious_sign_in.html.haml
@@ -45,7 +45,7 @@
                                 = @remote_ip
                                 %br/
                                 %strong= "#{t('sessions.browser')}:"
-                                %span{ title: @user_agent }= t 'sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: "#{@detection.id}"), platform: t("sessions.platforms.#{@detection.platform.id}", default: "#{@detection.platform.id}")
+                                %span{ title: @user_agent }= t 'sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: @detection.id.to_s), platform: t("sessions.platforms.#{@detection.platform.id}", default: @detection.platform.id.to_s)
                                 %br/
                                 = l(@timestamp)
 
diff --git a/app/views/user_mailer/webauthn_credential_added.html.haml b/app/views/user_mailer/webauthn_credential_added.html.haml
index 81de84b56..c91c96d6f 100644
--- a/app/views/user_mailer/webauthn_credential_added.html.haml
+++ b/app/views/user_mailer/webauthn_credential_added.html.haml
@@ -20,7 +20,7 @@
                                       = image_tag full_pack_url('media/images/mailer/icon_lock_open.png'), alt: ''
 
                               %h1= t 'devise.mailer.webauthn_credential.added.title'
-                              %p.lead= "#{t 'devise.mailer.webauthn_credential.added.explanation' }:"
+                              %p.lead= "#{t('devise.mailer.webauthn_credential.added.explanation')}:"
                               %p.lead= @webauthn_credential.nickname
 
 %table.email-table{ cellspacing: 0, cellpadding: 0 }
diff --git a/app/views/user_mailer/webauthn_credential_deleted.html.haml b/app/views/user_mailer/webauthn_credential_deleted.html.haml
index 7b47f0c88..578a08022 100644
--- a/app/views/user_mailer/webauthn_credential_deleted.html.haml
+++ b/app/views/user_mailer/webauthn_credential_deleted.html.haml
@@ -20,7 +20,7 @@
                                       = image_tag full_pack_url('media/images/mailer/icon_lock_open.png'), alt: ''
 
                               %h1= t 'devise.mailer.webauthn_credential.deleted.title'
-                              %p.lead= "#{t 'devise.mailer.webauthn_credential.deleted.explanation' }:"
+                              %p.lead= "#{t('devise.mailer.webauthn_credential.deleted.explanation')}:"
                               %p.lead= @webauthn_credential.nickname
 
 %table.email-table{ cellspacing: 0, cellpadding: 0 }