Redesign admin instances area (#9645)
parent
9a38357111
commit
1c6588accc
@ -1,13 +0,0 @@ |
|||||||
%tr |
|
||||||
%td |
|
||||||
%samp= domain_block.domain |
|
||||||
%td.severity |
|
||||||
= t("admin.domain_blocks.severities.#{domain_block.severity}") |
|
||||||
%td.reject_media |
|
||||||
- if domain_block.reject_media? || domain_block.suspend? |
|
||||||
%i.fa.fa-check |
|
||||||
%td.reject_reports |
|
||||||
- if domain_block.reject_reports? || domain_block.suspend? |
|
||||||
%i.fa.fa-check |
|
||||||
%td |
|
||||||
= table_link_to 'undo', t('admin.domain_blocks.undo'), admin_domain_block_path(domain_block) |
|
@ -1,17 +0,0 @@ |
|||||||
- content_for :page_title do |
|
||||||
= t('admin.domain_blocks.title') |
|
||||||
|
|
||||||
.table-wrapper |
|
||||||
%table.table |
|
||||||
%thead |
|
||||||
%tr |
|
||||||
%th= t('admin.domain_blocks.domain') |
|
||||||
%th= t('admin.domain_blocks.severity') |
|
||||||
%th= t('admin.domain_blocks.reject_media') |
|
||||||
%th= t('admin.domain_blocks.reject_reports') |
|
||||||
%th |
|
||||||
%tbody |
|
||||||
= render @domain_blocks |
|
||||||
|
|
||||||
= paginate @domain_blocks |
|
||||||
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button' |
|
@ -1,23 +1,39 @@ |
|||||||
- content_for :page_title do |
- content_for :page_title do |
||||||
= t('admin.instances.title') |
= t('admin.instances.title') |
||||||
|
|
||||||
= form_tag admin_instances_url, method: 'GET', class: 'simple_form' do |
.filters |
||||||
.fields-group |
.filter-subset |
||||||
- %i(domain_name).each do |key| |
%strong= t('admin.instances.moderation.title') |
||||||
.input.string.optional |
%ul |
||||||
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.instances.#{key}") |
%li= filter_link_to t('admin.instances.moderation.all'), limited: nil |
||||||
|
%li= filter_link_to t('admin.instances.moderation.limited'), limited: '1' |
||||||
|
|
||||||
.actions |
%div{ style: 'flex: 1 1 auto; text-align: right' } |
||||||
%button= t('admin.instances.search') |
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button' |
||||||
= link_to t('admin.instances.reset'), admin_instances_path, class: 'button negative' |
|
||||||
|
|
||||||
.table-wrapper |
%hr.spacer/ |
||||||
%table.table |
|
||||||
%thead |
- @instances.each do |instance| |
||||||
%tr |
.directory__tag |
||||||
%th= t('admin.instances.domain_name') |
= link_to admin_instance_path(instance) do |
||||||
%th= t('admin.instances.account_count') |
%h4 |
||||||
%tbody |
= instance.domain |
||||||
= render @instances |
%small |
||||||
|
= t('admin.instances.known_accounts', count: instance.accounts_count) |
||||||
|
|
||||||
|
- if instance.domain_block |
||||||
|
- if !instance.domain_block.noop? |
||||||
|
• |
||||||
|
= t("admin.domain_blocks.severity.#{instance.domain_block.severity}") |
||||||
|
- if instance.domain_block.reject_media? |
||||||
|
• |
||||||
|
= t('admin.domain_blocks.rejecting_media') |
||||||
|
- if instance.domain_block.reject_reports? |
||||||
|
• |
||||||
|
= t('admin.domain_blocks.rejecting_reports') |
||||||
|
|
||||||
|
.avatar-stack |
||||||
|
- instance.cached_sample_accounts.each do |account| |
||||||
|
= 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' |
||||||
|
|
||||||
= paginate paginated_instances |
= paginate paginated_instances |
||||||
|
@ -0,0 +1,44 @@ |
|||||||
|
- content_for :page_title do |
||||||
|
= @instance.domain |
||||||
|
|
||||||
|
.dashboard__counters |
||||||
|
%div |
||||||
|
%div |
||||||
|
.dashboard__counters__num= number_with_delimiter @following_count |
||||||
|
.dashboard__counters__label= t 'admin.instances.total_followed_by_them' |
||||||
|
%div |
||||||
|
%div |
||||||
|
.dashboard__counters__num= number_with_delimiter @followers_count |
||||||
|
.dashboard__counters__label= t 'admin.instances.total_followed_by_us' |
||||||
|
%div |
||||||
|
%div |
||||||
|
.dashboard__counters__num= number_to_human_size @media_storage |
||||||
|
.dashboard__counters__label= t 'admin.instances.total_storage' |
||||||
|
%div |
||||||
|
%div |
||||||
|
.dashboard__counters__num= number_with_delimiter @blocks_count |
||||||
|
.dashboard__counters__label= t 'admin.instances.total_blocked_by_us' |
||||||
|
%div |
||||||
|
%div |
||||||
|
.dashboard__counters__num= number_with_delimiter @reports_count |
||||||
|
.dashboard__counters__label= t 'admin.instances.total_reported' |
||||||
|
%div |
||||||
|
%div |
||||||
|
.dashboard__counters__num |
||||||
|
- if @available |
||||||
|
= fa_icon 'check' |
||||||
|
- else |
||||||
|
= fa_icon 'times' |
||||||
|
.dashboard__counters__label= t 'admin.instances.delivery_available' |
||||||
|
|
||||||
|
%hr.spacer/ |
||||||
|
|
||||||
|
%div{ style: 'overflow: hidden' } |
||||||
|
%div{ style: 'float: left' } |
||||||
|
= link_to t('admin.accounts.title'), admin_accounts_path(remote: '1', by_domain: @instance.domain), class: 'button' |
||||||
|
|
||||||
|
%div{ style: 'float: right' } |
||||||
|
- if @domain_block |
||||||
|
= link_to t('admin.domain_blocks.undo'), admin_domain_block_path(@domain_block), class: 'button' |
||||||
|
- else |
||||||
|
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @instance.domain), class: 'button' |
Loading…
Reference in new issue