about summary refs log tree commit diff
path: root/app/views/admin/instances/index.html.haml
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-01-10 19:12:10 +0100
committerThibaut Girka <thib@sitedethib.com>2019-01-10 21:00:30 +0100
commita2a64ecd3e3551707412c47f0d16e484dea25632 (patch)
treebc4e0b8e0ca2a2735f527bff8bd73421c0ff72dd /app/views/admin/instances/index.html.haml
parentfb0c906c717f2b21bb63610742a357850142b522 (diff)
parent70801b850c78d7879182eeba4eae509af42fafeb (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- .eslintrc.yml
  Removed, as upstream removed it.
- app/controllers/admin/statuses_controller.rb
  Minor code cleanup when porting one of our features.
- app/models/account.rb
  Note length validation has changed upstream.
  We now use upstream's validation (dropped legacy glitch-soc
  account metadata stuff) but with configurable limit.
- app/services/post_status_service.rb
  Upstream has added support for scheduled toots, refactoring
  the code a bit. Adapted our changes to this refactoring.
- app/views/stream_entries/_detailed_status.html.haml
  Not a real conflict, changes too close.
- app/views/stream_entries/_simple_status.html.haml
  Not a real conflict, changes too close.
Diffstat (limited to 'app/views/admin/instances/index.html.haml')
-rw-r--r--app/views/admin/instances/index.html.haml48
1 files changed, 32 insertions, 16 deletions
diff --git a/app/views/admin/instances/index.html.haml b/app/views/admin/instances/index.html.haml
index 3314ce077..ce35b5db4 100644
--- a/app/views/admin/instances/index.html.haml
+++ b/app/views/admin/instances/index.html.haml
@@ -1,23 +1,39 @@
 - content_for :page_title do
   = t('admin.instances.title')
 
-= form_tag admin_instances_url, method: 'GET', class: 'simple_form' do
-  .fields-group
-    - %i(domain_name).each do |key|
-      .input.string.optional
-        = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.instances.#{key}")
+.filters
+  .filter-subset
+    %strong= t('admin.instances.moderation.title')
+    %ul
+      %li= filter_link_to t('admin.instances.moderation.all'), limited: nil
+      %li= filter_link_to t('admin.instances.moderation.limited'), limited: '1'
 
-    .actions
-      %button= t('admin.instances.search')
-      = link_to t('admin.instances.reset'), admin_instances_path, class: 'button negative'
+  %div{ style: 'flex: 1 1 auto; text-align: right' }
+    = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button'
 
-.table-wrapper
-  %table.table
-    %thead
-      %tr
-        %th= t('admin.instances.domain_name')
-        %th= t('admin.instances.account_count')
-    %tbody
-      = render @instances
+%hr.spacer/
+
+- @instances.each do |instance|
+  .directory__tag
+    = link_to admin_instance_path(instance) do
+      %h4
+        = instance.domain
+        %small
+          = t('admin.instances.known_accounts', count: instance.accounts_count)
+
+          - if instance.domain_block
+            - if !instance.domain_block.noop?
+              &bull;
+              = t("admin.domain_blocks.severity.#{instance.domain_block.severity}")
+            - if instance.domain_block.reject_media?
+              &bull;
+              = t('admin.domain_blocks.rejecting_media')
+            - if instance.domain_block.reject_reports?
+              &bull;
+              = 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