From 6b0d2ded91f2dbbb7286457ae3b094af8d87a130 Mon Sep 17 00:00:00 2001 From: maki Date: Tue, 6 Feb 2024 16:50:26 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20apartado=20de=20cuentas=20dentro=20de?= =?UTF-8?q?=20actividades=20de=20moderaci=C3=B3n=20#15091?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/moderation_queue_controller.rb | 10 +++------- app/views/moderation_queue/_account.haml | 2 ++ app/views/moderation_queue/_accounts.haml | 5 ++--- config/locales/es.yml | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/app/controllers/moderation_queue_controller.rb b/app/controllers/moderation_queue_controller.rb index 4a65f136..eec0c70f 100644 --- a/app/controllers/moderation_queue_controller.rb +++ b/app/controllers/moderation_queue_controller.rb @@ -4,21 +4,17 @@ class ModerationQueueController < ApplicationController # Cola de moderación viendo todo el sitio def index - @moderation_queue = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'moderation_queue.yaml'))) - @remote_profile = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'remote_profile.yaml'))) - @moderation_queue.each do |activity| - activity['attributedTo'] = @remote_profile - end + dummy_data end # Perfil remoto de usuarie def remote_profile - @remote_profile = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'remote_profile.yaml'))) + dummy_data end # todon.nl está usando /api/v2/instance # mauve.moe usa /api/v1/instance def instances - @instances = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'instances.yaml'))) + dummy_data end end diff --git a/app/views/moderation_queue/_account.haml b/app/views/moderation_queue/_account.haml index e69de29b..751d0c0e 100644 --- a/app/views/moderation_queue/_account.haml +++ b/app/views/moderation_queue/_account.haml @@ -0,0 +1,2 @@ +%a{href: profile['id']}= profile['preferredUsername'] +%p= sanitize profile['summary'] \ No newline at end of file diff --git a/app/views/moderation_queue/_accounts.haml b/app/views/moderation_queue/_accounts.haml index 26485119..fcdfdce6 100644 --- a/app/views/moderation_queue/_accounts.haml +++ b/app/views/moderation_queue/_accounts.haml @@ -1,6 +1,3 @@ -- @moderation_queue.each do |comment| - = render 'account', comment: comment, profile: @remote_profile -- filtros_moderation_queue - botoneras_moderation_queue .d-flex.py-2.justify-content-center @@ -12,4 +9,6 @@ = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_allow'), path: '/' = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_reject'), path: '/' +- @moderation_queue.map{|c| c['attributedTo']}.uniq.each do |remote_profile| + = render 'account', profile: remote_profile = render 'moderation_queue/button_box', btn_params: @profile_btn_params diff --git a/config/locales/es.yml b/config/locales/es.yml index 96f068f3..8828ee9f 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -14,7 +14,7 @@ es: profile_published: Publicada profile_summary: Resumen profile_button_box: - text_approve: Aprovar siempre + text_approve: Aprobar siempre text_check: Revisar siempre text_deny: Bloquear text_report: Reportar