diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-31 01:25:10 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-31 01:25:10 -0500 |
commit | 80a81fe223415525811c0c3ef62b8853624e9a6a (patch) | |
tree | a5438b0d28dd9a872ad0223b2a130dee59ab92b7 /app/views/admin | |
parent | 964054b6dbabf119c9dea9cfa0b71011ace8df07 (diff) |
ability to add domain moderation notes, edit existing domain policies in-place, and process asynchronously
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/domain_blocks/new.html.haml | 3 | ||||
-rw-r--r-- | app/views/admin/domain_blocks/show.html.haml | 31 | ||||
-rw-r--r-- | app/views/admin/instances/index.html.haml | 3 | ||||
-rw-r--r-- | app/views/admin/instances/show.html.haml | 9 |
4 files changed, 38 insertions, 8 deletions
diff --git a/app/views/admin/domain_blocks/new.html.haml b/app/views/admin/domain_blocks/new.html.haml index 2517b2714..d925edd64 100644 --- a/app/views/admin/domain_blocks/new.html.haml +++ b/app/views/admin/domain_blocks/new.html.haml @@ -20,5 +20,8 @@ .fields-group = f.input :reject_reports, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reports'), hint: I18n.t('admin.domain_blocks.reject_reports_hint') + .fields-group + = f.input :reason, placeholder: t('admin.domain_blocks.reason', rows: 6) + .actions = f.button :button, t('.create'), type: :submit diff --git a/app/views/admin/domain_blocks/show.html.haml b/app/views/admin/domain_blocks/show.html.haml index dca4dbac7..02c73c268 100644 --- a/app/views/admin/domain_blocks/show.html.haml +++ b/app/views/admin/domain_blocks/show.html.haml @@ -1,13 +1,30 @@ - content_for :page_title do = t('admin.domain_blocks.show.title', domain: @domain_block.domain) -= simple_form_for @domain_block, url: admin_domain_block_path(@domain_block), method: :delete do |f| += simple_form_for @domain_block, url: admin_domain_block_path(@domain_block) do |f| + = render 'shared/error_messages', object: @domain_block - - unless (@domain_block.noop?) - %p= t(".retroactive.#{@domain_block.severity}") - %p.hint= t(:affected_accounts, - scope: [:admin, :domain_blocks, :show], - count: @domain_block.affected_accounts_count) + .fields-row + .fields-row__column.fields-row__column-6.fields-group + = f.input :domain, wrapper: :with_label, label: t('admin.domain_blocks.domain'), required: true, disabled: true + + .fields-row__column.fields-row__column-6.fields-group + = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| t(".severity.#{type}") } + + .fields-group + = f.input :force_sensitive, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.force_sensitive'), hint: I18n.t('admin.domain_blocks.force_sensitive_hint') + + .fields-group + = f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint') + + .fields-group + = f.input :reject_reports, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reports'), hint: I18n.t('admin.domain_blocks.reject_reports_hint') + + .fields-group + = f.input :undo, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.undo'), hint: I18n.t('admin.domain_blocks.undo_hint') + + .fields-group + = f.input :reason, placeholder: t('admin.domain_blocks.reason', rows: 6) .actions - = f.button :button, t('.undo'), type: :submit + = f.button :button, t('.edit'), type: :submit diff --git a/app/views/admin/instances/index.html.haml b/app/views/admin/instances/index.html.haml index 9574c3147..322106346 100644 --- a/app/views/admin/instances/index.html.haml +++ b/app/views/admin/instances/index.html.haml @@ -46,6 +46,9 @@ • = t('admin.domain_blocks.rejecting_reports') + - if instance.domain_block.reason + = simple_format(h("Policy reason: #{instance.domain_block.reason}")) + .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' diff --git a/app/views/admin/instances/show.html.haml b/app/views/admin/instances/show.html.haml index c7992a490..b9aac5f11 100644 --- a/app/views/admin/instances/show.html.haml +++ b/app/views/admin/instances/show.html.haml @@ -31,6 +31,13 @@ = fa_icon 'times' .dashboard__counters__label= t 'admin.instances.delivery_available' +- if @domain_block + %hr.spacer/ + + %h3= "Affected by #{@domain_block.severity.gsub('_', ' ')} policy" + - if @domain_block.reason + = simple_format(h(@domain_block.reason)) + %hr.spacer/ %div{ style: 'overflow: hidden' } @@ -39,6 +46,6 @@ %div{ style: 'float: right' } - if @domain_block - = link_to t('admin.domain_blocks.undo'), admin_domain_block_path(@domain_block), class: 'button' + = link_to t('admin.domain_blocks.edit'), 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' |