From d895b9c808fbf4f7977f45a6723e4367aa23c17f Mon Sep 17 00:00:00 2001 From: jazzari Date: Mon, 22 Jan 2024 14:17:24 -0300 Subject: [PATCH] feat: agregados componentes comentario, botonera y boton_base --- app/assets/stylesheets/application.scss | 4 ++++ app/views/layouts/_details.haml | 2 ++ app/views/moderation_queue/_btn_base.haml | 3 +++ app/views/moderation_queue/_button_box.haml | 14 ++++++++++++++ app/views/moderation_queue/_comment.haml | 4 ++++ app/views/posts/_moderation_queue.haml | 3 +++ config/locales/es.yml | 6 ++++++ 7 files changed, 36 insertions(+) create mode 100644 app/views/moderation_queue/_btn_base.haml create mode 100644 app/views/moderation_queue/_button_box.haml create mode 100644 app/views/moderation_queue/_comment.haml diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index b11be0de..a4446532 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -585,4 +585,8 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1); transform: rotate(90deg) translatey(-0.1em); color: $magenta } + +.bg-blue { + background-color: $azul; +} \ No newline at end of file diff --git a/app/views/layouts/_details.haml b/app/views/layouts/_details.haml index f950b097..4fe4d2af 100644 --- a/app/views/layouts/_details.haml +++ b/app/views/layouts/_details.haml @@ -1,3 +1,5 @@ +-# Detail Cola de Moderación + %details.details.py-2 %summary %h3.py-2.text-center= @summary diff --git a/app/views/moderation_queue/_btn_base.haml b/app/views/moderation_queue/_btn_base.haml new file mode 100644 index 00000000..74e9516a --- /dev/null +++ b/app/views/moderation_queue/_btn_base.haml @@ -0,0 +1,3 @@ +-# Componente Botón general Moderación + +%a.btn.rounded.mx-2{role: "button", href: href, class: @class} #{text} \ No newline at end of file diff --git a/app/views/moderation_queue/_button_box.haml b/app/views/moderation_queue/_button_box.haml new file mode 100644 index 00000000..ea038e59 --- /dev/null +++ b/app/views/moderation_queue/_button_box.haml @@ -0,0 +1,14 @@ +-# Componente Botonera de Moderación + +.d-flex.py-2.justify-content-center + -# parámetros de botones + -# text, class, href + - @btn_box_params = [[t('.text_pause'), 'bg-outline-light', 'https://sutty.nl/'], + [t('.text_reject'), 'btn-outline-info blue', 'https://sutty.nl/'], + [t('.text_accept'), 'bg-blue white', 'https://sutty.nl/'], + [t('.text_reply'), 'btn-outline-dark', '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/_comment.haml b/app/views/moderation_queue/_comment.haml new file mode 100644 index 00000000..051a84b0 --- /dev/null +++ b/app/views/moderation_queue/_comment.haml @@ -0,0 +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 diff --git a/app/views/posts/_moderation_queue.haml b/app/views/posts/_moderation_queue.haml index e69de29b..77df7353 100644 --- a/app/views/posts/_moderation_queue.haml +++ b/app/views/posts/_moderation_queue.haml @@ -0,0 +1,3 @@ +.flex + %h2.text-center Comentarios + = render 'moderation_queue/comment' \ No newline at end of file diff --git a/config/locales/es.yml b/config/locales/es.yml index 1e4f870c..f9cd1b4f 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -2,6 +2,12 @@ es: moderation_queue: remote_profile: user: Nombre de usuario + button_box: + text_pause: Pausa + text_reject: Rechazar + text_accept: Aceptar Publicación + text_reply: Responder + text_report: Reportar dark: Oscuro es: Castellano en: English