5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 23:46:22 +00:00

feat: confirmar el reporte remoto #15604

This commit is contained in:
f 2024-03-15 13:43:00 -03:00
parent f4379b45c2
commit 30d32a6e3b
No known key found for this signature in database
6 changed files with 24 additions and 12 deletions

View file

@ -5,5 +5,5 @@
- local_assigns[:class] = "btn #{local_assigns[:class]}" - local_assigns[:class] = "btn #{local_assigns[:class]}"
-# @todo path es obligatorio -# @todo path es obligatorio
= button_to local_assigns[:path], **local_assigns do = button_to local_assigns[:path], **local_assigns.compact do
= text = text

View file

@ -1,8 +1,11 @@
-# Componente Botonera de Comentarios -# Componente Botonera de Comentarios
- local_data = { report: { confirm: t('.confirm_report') } }
.d-flex.flex-row .d-flex.flex-row
- ActivityPub.events.each do |event| - ActivityPub.events.each do |event|
= render 'components/btn_base', = render 'components/btn_base',
text: t(".text_#{event}"), text: t(".text_#{event}"),
path: public_send(:"site_activity_pub_#{event}_path", activity_pub_id: activity_pub), path: public_send(:"site_activity_pub_#{event}_path", activity_pub_id: activity_pub),
disabled: !activity_pub.public_send(:"may_#{event}?") disabled: !activity_pub.public_send(:"may_#{event}?"),
data: local_data[event]

View file

@ -1,6 +1,10 @@
-# Componente botonera de moderación de Instancias -# Componente botonera de moderación de Instancias
- btn_class = 'btn btn-secondary' - local_data = {}
= render 'components/btn_base', path: site_instance_moderation_pause_path(instance_moderation_id: instance_moderation), text: t('.text_check'), class: btn_class, disabled: !instance_moderation.may_pause? - InstanceModeration.events.each do |event|
= render 'components/btn_base', path: site_instance_moderation_allow_path(instance_moderation_id: instance_moderation), text: t('.text_allow'), class: btn_class, disabled: !instance_moderation.may_allow? = render 'components/btn_base',
= render 'components/btn_base', path: site_instance_moderation_block_path(instance_moderation_id: instance_moderation), text: t('.text_deny'), class: btn_class, disabled: !instance_moderation.may_block? path: public_send(:"site_instance_moderation_#{event}_path", instance_moderation_id: instance_moderation),
text: t(".text_#{event}"),
class: 'btn btn-secondary',
disabled: !instance_moderation.public_send(:"may_#{event}?"),
data: local_data[event]

View file

@ -1,9 +1,10 @@
-# Componente Botonera de Moderación de Cuentas (Remote_profile) -# Componente Botonera de Moderación de Cuentas (Remote_profile)
.d-flex.flex-row .d-flex.flex-row
- btn_class = 'btn-secondary' - local_data = { report: { confirm: t('.confirm_report') } }
- ActorModeration.events.each do |actor_event| - ActorModeration.events.each do |actor_event|
= render 'components/btn_base', = render 'components/btn_base',
text: t(".text_#{actor_event}"), text: t(".text_#{actor_event}"),
path: public_send(:"site_actor_moderation_#{actor_event}_path", actor_moderation_id: actor_moderation), path: public_send(:"site_actor_moderation_#{actor_event}_path", actor_moderation_id: actor_moderation),
class: btn_class, class: 'btn-secondary',
disabled: !actor_moderation.public_send(:"may_#{actor_event}?") disabled: !actor_moderation.public_send(:"may_#{actor_event}?"),
data: local_data[actor_event]

View file

@ -106,15 +106,17 @@ en:
text_reject: Reject text_reject: Reject
text_reply: Reply text_reply: Reply
text_report: Report text_report: Report
confirm_report: "Send report to the remote instance?"
instances_btn_box: instances_btn_box:
text_check: Check case by case text_pause: Check case by case
text_allow: Allow everything text_allow: Allow everything
text_deny: Block instance text_block: Block instance
profiles_btn_box: profiles_btn_box:
text_pause: Always check text_pause: Always check
text_allow: Always approve text_allow: Always approve
text_block: Block text_block: Block
text_report: Report text_report: Report
confirm_report: "Send report to the remote instance?"
remote_flags: remote_flags:
report_message: "Hi! Someone using Sutty CMS reported this account on your instance. We don't have support for customized report messages yet, but we will soon. You can reach us at %{panel_actor_mention}." report_message: "Hi! Someone using Sutty CMS reported this account on your instance. We don't have support for customized report messages yet, but we will soon. You can reach us at %{panel_actor_mention}."
activity_pubs: activity_pubs:

View file

@ -105,8 +105,9 @@ es:
text_approve: Aceptar text_approve: Aceptar
text_reject: Rechazar text_reject: Rechazar
text_report: Reportar text_report: Reportar
confirm_report: "¿Enviar el reporte a la instancia remota?"
instances_btn_box: instances_btn_box:
text_check: Moderar caso por caso text_pause: Moderar caso por caso
text_allow: Permitir todo text_allow: Permitir todo
text_deny: Bloquear instancia text_deny: Bloquear instancia
profiles_btn_box: profiles_btn_box:
@ -114,6 +115,7 @@ es:
text_allow: Aprobar siempre text_allow: Aprobar siempre
text_block: Bloquear text_block: Bloquear
text_report: Reportar text_report: Reportar
confirm_report: "¿Enviar el reporte a la instancia remota?"
remote_flags: remote_flags:
report_message: "¡Hola! Une usuarie de Sutty CMS reportó esta cuenta en tu instancia. Todavía no tenemos soporte para mensajes personalizados. Podés contactarnos en %{panel_actor_mention}." report_message: "¡Hola! Une usuarie de Sutty CMS reportó esta cuenta en tu instancia. Todavía no tenemos soporte para mensajes personalizados. Podés contactarnos en %{panel_actor_mention}."
activity_pubs: activity_pubs: