From 2c7081a57f361c3e6f5479cd68d4659aaed62746 Mon Sep 17 00:00:00 2001 From: jazzari Date: Tue, 23 Jan 2024 17:04:38 -0300 Subject: [PATCH] feat: agregado componente remote_profile y botonera --- app/views/moderation_queue/_comment.haml | 2 +- .../{_button_box.haml => _comment_button_box.haml} | 0 app/views/moderation_queue/_profile_button_box.haml | 12 ++++++++++++ app/views/moderation_queue/_remote_profile.haml | 5 +++++ app/views/moderation_queue/remote_profile.haml | 4 +++- config/locales/es.yml | 11 +++++++++-- 6 files changed, 30 insertions(+), 4 deletions(-) rename app/views/moderation_queue/{_button_box.haml => _comment_button_box.haml} (100%) create mode 100644 app/views/moderation_queue/_profile_button_box.haml create mode 100644 app/views/moderation_queue/_remote_profile.haml diff --git a/app/views/moderation_queue/_comment.haml b/app/views/moderation_queue/_comment.haml index 051a84b0..e43e8c42 100644 --- a/app/views/moderation_queue/_comment.haml +++ b/app/views/moderation_queue/_comment.haml @@ -1,4 +1,4 @@ -# Componente Comentario %p.py-2 Esta línea es donde irá el cuerpo del comentario -= render 'moderation_queue/button_box' \ No newline at end of file += render 'moderation_queue/comment_button_box' \ No newline at end of file diff --git a/app/views/moderation_queue/_button_box.haml b/app/views/moderation_queue/_comment_button_box.haml similarity index 100% rename from app/views/moderation_queue/_button_box.haml rename to app/views/moderation_queue/_comment_button_box.haml diff --git a/app/views/moderation_queue/_profile_button_box.haml b/app/views/moderation_queue/_profile_button_box.haml new file mode 100644 index 00000000..d5852ffa --- /dev/null +++ b/app/views/moderation_queue/_profile_button_box.haml @@ -0,0 +1,12 @@ +-# Componente Botonera de Profile + +.d-flex.py-2.justify-content-center + -# parámetros de botones + -# text, class, href + - @btn_box_params = [[t('.text_deny'), 'btn-outline-info', ''], + [t('.text_allow'), 'btn-success', 'https://sutty.nl/'], + [t('.text_report'), 'btn-outline-danger', 'https://sutty.nl/']] + + - @btn_box_params.each do |btn| + - @class = btn[1] + = render 'moderation_queue/btn_base', href: btn[2], class: @class, text: btn[0] \ No newline at end of file diff --git a/app/views/moderation_queue/_remote_profile.haml b/app/views/moderation_queue/_remote_profile.haml new file mode 100644 index 00000000..3a18a24a --- /dev/null +++ b/app/views/moderation_queue/_remote_profile.haml @@ -0,0 +1,5 @@ +.flex.py-2.mx-2.text-center + %h4= t('.profile_name') + ": " + @remote_profile['name'] + %h5= t('.profile_id') + ": " + @remote_profile['id'] + %h5= t('.profile_published') + ": " + @remote_profile['published'] + = render 'moderation_queue/profile_button_box' \ No newline at end of file diff --git a/app/views/moderation_queue/remote_profile.haml b/app/views/moderation_queue/remote_profile.haml index 537ab91c..36613405 100644 --- a/app/views/moderation_queue/remote_profile.haml +++ b/app/views/moderation_queue/remote_profile.haml @@ -1 +1,3 @@ -%h1= @remote_profile['name'] \ No newline at end of file +.flex + %h1.text-center= t('.profile') + = render 'moderation_queue/remote_profile' \ No newline at end of file diff --git a/config/locales/es.yml b/config/locales/es.yml index f9cd1b4f..0f5e314c 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1,8 +1,15 @@ es: moderation_queue: remote_profile: - user: Nombre de usuario - button_box: + profile: Cuentas + profile_name: Nombre de la Cuenta + profile_id: ID + profile_published: Publicada + profile_button_box: + text_deny: Bloquear que te siga + text_allow: Permitir que te siga + text_report: Reportar + comment_button_box: text_pause: Pausa text_reject: Rechazar text_accept: Aceptar Publicación