5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 07:16:21 +00:00

feat: mostrar la cantidad de instancias

This commit is contained in:
f 2024-02-28 16:13:51 -03:00
parent 1ee41f2d5e
commit 43d190ba74
No known key found for this signature in database
4 changed files with 8 additions and 5 deletions

View file

@ -11,6 +11,9 @@ class InstanceModeration < ApplicationRecord
# todas las que no estén bloqueadas ya. # todas las que no estén bloqueadas ya.
scope :may_block, -> { where.not(aasm_state: 'blocked') } scope :may_block, -> { where.not(aasm_state: 'blocked') }
scope :may_pause, -> { where.not(aasm_state: 'paused') } scope :may_pause, -> { where.not(aasm_state: 'paused') }
scope :paused, -> { where(aasm_state: 'paused') }
scope :blocked, -> { where(aasm_state: 'blocked') }
scope :allowed, -> { where(aasm_state: 'allowed') }
# Bloquear instancias en masa # Bloquear instancias en masa
def self.block_all! def self.block_all!

View file

@ -3,4 +3,4 @@
= render 'components/instances_checked_submenu' = render 'components/instances_checked_submenu'
= render 'components/dropdown', text: t('.text_show') do = render 'components/dropdown', text: t('.text_show') do
= render 'components/instances_show_submenu' = render 'components/instances_show_submenu', site: site

View file

@ -1,3 +1,3 @@
= render 'components/dropdown_item', text: t('.submenu_paused'), path: site_moderation_queue_path(state: 'paused') = render 'components/dropdown_item', text: t('.submenu_paused', count: site.instance_moderations.paused.count), path: site_moderation_queue_path(state: 'paused')
= render 'components/dropdown_item', text: t('.submenu_allowed'), path: site_moderation_queue_path(state: 'allowed') = render 'components/dropdown_item', text: t('.submenu_allowed', count: site.instance_moderations.allowed.count), path: site_moderation_queue_path(state: 'allowed')
= render 'components/dropdown_item', text: t('.submenu_blocked'), path: site_moderation_queue_path(state: 'blocked') = render 'components/dropdown_item', text: t('.submenu_blocked', count: site.instance_moderations.blocked.count), path: site_moderation_queue_path(state: 'blocked')

View file

@ -5,7 +5,7 @@
= render 'components/select_all', id: 'instances' = render 'components/select_all', id: 'instances'
.col-11 .col-11
-# Filtros -# Filtros
= render 'components/instances_filters' = render 'components/instances_filters', site: site
.col-12 .col-12
- if instance_moderations.count.zero? - if instance_moderations.count.zero?