index.html.haml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. - content_for :page_title do
  2. = t('admin.instances.title')
  3. .filters
  4. .filter-subset
  5. %strong= t('admin.instances.moderation.title')
  6. %ul
  7. %li= filter_link_to t('admin.instances.moderation.all'), limited: nil
  8. %li= filter_link_to t('admin.instances.moderation.limited'), limited: '1'
  9. %div{ style: 'flex: 1 1 auto; text-align: right' }
  10. = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button'
  11. = form_tag admin_instances_url, method: 'GET', class: 'simple_form' do
  12. .fields-group
  13. - Admin::FilterHelper::INSTANCES_FILTERS.each do |key|
  14. - if params[key].present?
  15. = hidden_field_tag key, params[key]
  16. - %i(by_domain).each do |key|
  17. .input.string.optional
  18. = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.instances.#{key}")
  19. .actions
  20. %button= t('admin.accounts.search')
  21. = link_to t('admin.accounts.reset'), admin_instances_path, class: 'button negative'
  22. %hr.spacer/
  23. - @instances.each do |instance|
  24. .directory__tag
  25. = link_to admin_instance_path(instance) do
  26. %h4
  27. = instance.domain
  28. %small
  29. = t('admin.instances.known_accounts', count: instance.cached_accounts_count)
  30. - if instance.domain_block
  31. - if !instance.domain_block.noop?
  32. •
  33. = t("admin.domain_blocks.severity.#{instance.domain_block.severity}")
  34. - if instance.domain_block.reject_media?
  35. •
  36. = t('admin.domain_blocks.rejecting_media')
  37. - if instance.domain_block.reject_reports?
  38. •
  39. = t('admin.domain_blocks.rejecting_reports')
  40. .avatar-stack
  41. - instance.cached_sample_accounts.each do |account|
  42. = image_tag current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url, width: 48, height: 48, alt: '', class: 'account__avatar'
  43. = paginate paginated_instances