diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-20 05:26:56 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:19 -0500 |
commit | b871342d221eac15d5ce1849206934fe4a0042f5 (patch) | |
tree | 69e48ff4f3f98d7671f5fd3985a616ce78822fb6 /app | |
parent | 687e8d519407f502c3e62c83219e7ad26304e11c (diff) |
[UI, Admin] Enable controls for setting domain restrictions in allowlist mode
Diffstat (limited to 'app')
-rw-r--r-- | app/views/admin/instances/index.html.haml | 10 | ||||
-rw-r--r-- | app/views/admin/instances/show.html.haml | 7 |
2 files changed, 8 insertions, 9 deletions
diff --git a/app/views/admin/instances/index.html.haml b/app/views/admin/instances/index.html.haml index 696ba3c7f..5aec735e4 100644 --- a/app/views/admin/instances/index.html.haml +++ b/app/views/admin/instances/index.html.haml @@ -2,19 +2,15 @@ = t('admin.instances.title') - content_for :heading_actions do - - if whitelist_mode? - = link_to t('admin.domain_allows.add_new'), new_admin_domain_allow_path, class: 'button' - - else - = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button' + = link_to t('admin.domain_allows.add_new'), new_admin_domain_allow_path, class: 'button' + = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button' .filters .filter-subset %strong= t('admin.instances.moderation.title') %ul %li= filter_link_to t('admin.instances.moderation.all'), limited: nil - - - unless whitelist_mode? - %li= filter_link_to t('admin.instances.moderation.limited'), limited: '1' + %li= filter_link_to t('admin.instances.moderation.limited'), limited: '1' - unless whitelist_mode? = form_tag admin_instances_url, method: 'GET', class: 'simple_form' do diff --git a/app/views/admin/instances/show.html.haml b/app/views/admin/instances/show.html.haml index 92e14c0df..e5a5a6129 100644 --- a/app/views/admin/instances/show.html.haml +++ b/app/views/admin/instances/show.html.haml @@ -52,8 +52,11 @@ %div - if @domain_allow = link_to t('admin.domain_allows.undo'), admin_domain_allow_path(@domain_allow), class: 'button button--destructive', data: { confirm: t('admin.accounts.are_you_sure'), method: :delete } - - elsif @domain_block + - else + = link_to t('admin.domain_allows.add_new'), new_admin_domain_allow_path(_domain: @instance.domain), class: 'button' + + - if @domain_block = link_to t('admin.domain_blocks.edit'), edit_admin_domain_block_path(@domain_block), class: 'button' = 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' + = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @instance.domain), class: 'button button--destructive' |