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

Merge branch 'issue-14966' into issue-13586-2

This commit is contained in:
maki 2024-02-29 15:18:18 -03:00
commit 17f1e664cd
19 changed files with 132 additions and 95 deletions

View file

@ -572,7 +572,7 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
position: absolute; position: absolute;
left: 97%; left: 97%;
bottom: 3%; bottom: 3%;
transform: rotate(60deg); transform: rotate(180deg);
} }
&[open] { &[open] {
& > summary { & > summary {
@ -584,4 +584,6 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
} }
hr {
border-bottom: 1px solid #dee2e6;
}

View file

@ -32,6 +32,7 @@ class ApplicationController < ActionController::Base
@moderation_queue = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'moderation_queue.yaml'))) @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'))) @remote_profile = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'remote_profile.yaml')))
@instances = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'instances.yaml'))) @instances = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'instances.yaml')))
@blocklists= YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'blocklists.yml')))
@moderation_queue.each do |activity| @moderation_queue.each do |activity|
activity['attributedTo'] = @remote_profile activity['attributedTo'] = @remote_profile
end end

View file

@ -0,0 +1,6 @@
-# Componente Listas de bloqueo de Instancias
.card.mt-3.mb-3
.card-body
.d-flex.flex-row
= render 'components/checkbox', id: blocklist["id"] do
%span.h4= blocklist["title"]

View file

@ -1,6 +1,2 @@
-# Componente Listas de bloqueo de Instancias - @blocklists.each do |blocklist|
.card.mt-3 = render 'components/block_list', blocklist: blocklist
.card-body
.d-flex.flex-row
= render 'components/checkbox'
%h4.ml-5= t('.title')

View file

@ -1,3 +1,3 @@
-# Componente Botón general Moderación -# Componente Botón general Moderación
%button.btn.btn-lg.mx-2{ href: href, class: local_assigns[:class] }= text %button.btn{ href: href, class: local_assigns[:class] }= text

View file

@ -1,3 +1,4 @@
-# Componente Checkbox -# Componente Checkbox
.custom-control.custom-checkbox.p-0 .custom-control.custom-checkbox
%input{ type: 'checkbox', id: local_assigns[:id], class: local_assigns[:class] } %input.custom-control-input{ type: 'checkbox', id: id, name: id, class: local_assigns[:class] }
%label.custom-control-label{ for: id }= yield

View file

@ -1,9 +1,8 @@
-# Componente Botonera de Comentarios -# Componente Botonera de Comentarios
.d-flex.py-4 - btn_class = 'btn-secondary py-1 px-2'
- btn_class = 'btn-secondary' = render 'components/btn_base', text: t('.text_pause'), class: btn_class, href: ''
= render 'components/btn_base', text: t('.text_pause'), class: btn_class, href: '' = render 'components/btn_base', text: t('.text_reject'), class: btn_class, href: ''
= render 'components/btn_base', text: t('.text_reject'), class: btn_class, href: '' = render 'components/btn_base', text: t('.text_accept'), class: btn_class, href: ''
= render 'components/btn_base', text: t('.text_accept'), class: btn_class, href: '' = render 'components/btn_base', text: t('.text_reply'), class: btn_class, href: ''
= render 'components/btn_base', text: t('.text_reply'), class: btn_class, href: '' = render 'components/btn_base', text: t('.text_report'), class: btn_class, href: ''
= render 'components/btn_base', text: t('.text_report'), class: btn_class, href: ''

View file

@ -1,2 +1,7 @@
%a{href: profile['id']}= profile['preferredUsername'] .row.no-gutters.pt-2
=profile['summary'].html_safe .col-1
= render 'components/checkbox', id: profile['id']
.col-11
%h4
%a{href: profile['id']}= profile['preferredUsername']
=profile['summary'].html_safe

View file

@ -2,9 +2,10 @@
= render 'components/profiles_filters' = render 'components/profiles_filters'
- @moderation_queue.map{ |c| c['attributedTo'] }.uniq.each do |remote_profile| - @moderation_queue.map{ |c| c['attributedTo'] }.uniq.each do |remote_profile|
%hr
= render 'account', profile: remote_profile = render 'account', profile: remote_profile
-# Botones de Moderación -# Botones de Moderación
.d-flex.py-4 .d-flex.pb-4
= render 'components/profiles_btn_box' = render 'components/profiles_btn_box'

View file

@ -1,4 +1,5 @@
.form-group .form-group
.d-flex.flex-column.mt-5 = label_tag "custom_blocklist", t('moderation_queue.instances.custom_block')
%textarea.mb-3{ name: '', id: '', placeholder: t('moderation_queue.instances.custom_block') } = text_area_tag "custom_blocklist", nil, class: 'form-control'
%button.col.btn.btn-secondary{ type: 'submit' }= t('moderation_queue.instances.submit') %button.btn.btn-secondary.mt-3{ type: 'submit' }= t('moderation_queue.instances.submit')

View file

@ -1,13 +1,15 @@
-# Componente Comentario -# Componente Comentario
.flex.mx-4.my-5 .flex.mx-4.my-4
.row.no-gutters .row.no-gutters
.col-1 .col-1
= render 'components/checkbox' = render 'components/checkbox', id: comment['id']
.col-11 .col-11
.row.no-gutters .row.no-gutters
.col-4 .col-5.col-sm-3.col-lg-4
%p= comment['published'].to_datetime.strftime(t('date.format')) %p
.col-8 %span= comment['published'].to_datetime.strftime(t('date.format'))
%span= comment['published'].to_datetime.strftime(t('time.format'))
.col-7.col-sm-9.col-lg-8
%dl %dl
%dt.d-inline.mr-2= t('.source_profile') %dt.d-inline.mr-2= t('.source_profile')
%dd.d-inline %dd.d-inline
@ -17,9 +19,14 @@
.row.no-gutters .row.no-gutters
.col.p-0 .col.p-0
%p %p
%span.mr-3= t('.reply_to') %span= t('.reply_to')
%span %span
%a{ href: comment['inReplyTo'] }= comment['inReplyTo'] %a{ href: comment['inReplyTo'] }= comment['inReplyTo']
.row.no-gutters .row.no-gutters
.col.p-0 .col.p-0
%p= comment['content'].html_safe - if comment['summary']
- summary = comment['summary']
= render 'layouts/details', summary: summary do
%p= comment['content'].html_safe
- else
%p= comment['content'].html_safe

View file

@ -2,7 +2,9 @@
= render 'components/comments_filters' = render 'components/comments_filters'
- moderation_queue.each do |comment| - moderation_queue.each do |comment|
%hr
= render 'comment', comment: comment, profile: comment['attributedTo'] = render 'comment', comment: comment, profile: comment['attributedTo']
-# Botones moderación -# Botones moderación
= render 'components/comments_btn_box', comment: comment .d-flex.justify-content-center
= render 'components/comments_btn_box', comment: comment

View file

@ -1,11 +1,16 @@
- host = instance['domain'] - host = instance['domain']
- host ||= instance['uri'] - host ||= instance['uri']
- host = "https://#{host}" - hosthttps = "https://#{host}"
%a{ href: host }= instance['title'] .row.no-gutters.pt-2
%p= instance['description'].html_safe .col-1
%p = render 'components/checkbox', id: host
%span= t('.users') .col-11
%span %h4
= instance.dig('usage', 'users', 'active_month') %a{ href: hosthttps }= instance['title']
= instance.dig('stats', 'user_count') %p= instance['description'].html_safe
%p
%span= t('.users')
%span
= instance.dig('usage', 'users', 'active_month')
= instance.dig('stats', 'user_count')

View file

@ -2,13 +2,15 @@
= render 'components/instances_filters' = render 'components/instances_filters'
- @instances.each do |instance| - @instances.each do |instance|
%hr
= render 'moderation_queue/instance', instance: instance = render 'moderation_queue/instance', instance: instance
-# Botones moderación -# Botones moderación
.d-flex.py-5 .d-flex.pb-4
= render 'components/instances_btn_box' = render 'components/instances_btn_box'
%hr
%h3.mt-5= t('moderation_queue.instances.title') %h3.mt-5= t('moderation_queue.instances.title')
%lead= t('moderation_queue.instances.description') %lead= t('moderation_queue.instances.description')
= render 'components/block_lists' = render 'components/block_lists', blocklists: @blocklists
= render 'moderation_queue/block_instances_textarea' = render 'moderation_queue/block_instances_textarea'

View file

@ -6,9 +6,11 @@
- summary = t('.instances') - summary = t('.instances')
= render 'layouts/details', summary: summary do = render 'layouts/details', summary: summary do
= render 'moderation_queue/instances', site: @site, post: @post, moderation_queue: @moderation_queue = render 'moderation_queue/instances', site: @site, post: @post, moderation_queue: @moderation_queue
%hr
- summary = t('.accounts') - summary = t('.accounts')
= render 'layouts/details', summary: summary do = render 'layouts/details', summary: summary do
= render 'moderation_queue/accounts', site: @site, post: @post, moderation_queue: @moderation_queue = render 'moderation_queue/accounts', site: @site, post: @post, moderation_queue: @moderation_queue
%hr
- summary = t('.comments') - summary = t('.comments')
= render 'layouts/details', summary: summary do = render 'layouts/details', summary: summary do
= render 'moderation_queue/comments', site: @site, post: @post, moderation_queue: @moderation_queue = render 'moderation_queue/comments', site: @site, post: @post, moderation_queue: @moderation_queue

View file

@ -5,5 +5,5 @@
= render 'moderation_queue/comment', comment: comment, profile: comment['attributedTo'] = render 'moderation_queue/comment', comment: comment, profile: comment['attributedTo']
-# Botones moderación -# Botones moderación
.d-flex.py-4 .d-flex
= render 'components/comments_btn_box' = render 'components/comments_btn_box'

View file

@ -48,58 +48,59 @@ en:
time: time:
am: am am: am
pm: pm pm: pm
format: '%-I:%M %p'
components: components:
instances_filters: instances_filters:
text_show: Show text_show: Show
text_checked: With the checked text_checked: With selected
instances_checked_submenu: instances_checked_submenu:
submenu_case: Check case by case submenu_case: Check case by case
submenu_allow: Allow everything submenu_allow: Allow everything
submenu_reject: Reject submenu_reject: Reject
instances_show_submenu: instances_show_submenu:
submenu_allow: Allow submenu_allow: Allow
submenu_reject: Reject submenu_reject: Reject
comments_filters: comments_filters:
text_show: Sho text_show: Show
text_checked: With the checked text_checked: With selected
comments_checked_submenu: comments_checked_submenu:
submenu_pause: Pause submenu_pause: Pause
submenu_accept: Accept submenu_accept: Accept
submenu_reject: Reject submenu_reject: Reject
comments_show_submenu: comments_show_submenu:
submenu_pause: Pause submenu_pause: Pause
submenu_accept: Accept submenu_accept: Accept
submenu_report: Report submenu_report: Report
submenu_reject: Reject submenu_reject: Reject
profiles_filters: profiles_filters:
text_show: Show text_show: Show
text_checked: With the checked text_checked: With selected
profiles_checked_submenu: profiles_checked_submenu:
submenu_pause: Pause submenu_pause: Pause
submenu_accept: Accept submenu_accept: Accept
submenu_reject: Reject submenu_reject: Reject
submenu_block: Block submenu_block: Block
profiles_show_submenu: profiles_show_submenu:
submenu_accept: Accept submenu_accept: Accept
submenu_block: Block submenu_block: Block
submenu_reject: Reject submenu_reject: Reject
block_lists: block_lists:
title: Block lists title: Block lists
comments_btn_box: comments_btn_box:
text_pause: Pause text_pause: Pause
text_reject: Reject text_reject: Reject
text_accept: Accept text_accept: Accept
text_reply: Reply text_reply: Reply
text_report: Report text_report: Report
instances_btn_box: instances_btn_box:
text_check: Check case by case text_check: Check case by case
text_allow: Allow everything text_allow: Allow everything
text_deny: Block instance text_deny: Block instance
profiles_btn_box: profiles_btn_box:
text_approve: Always approve text_approve: Always approve
text_check: Always check text_check: Always check
text_deny: Block text_deny: Block
text_report: Report text_report: Report
moderation_queue: moderation_queue:
index: index:
title: Moderation title: Moderation

View file

@ -48,6 +48,7 @@ es:
time: time:
am: am am: am
pm: pm pm: pm
format: '%-H:%M'
components: components:
instances_filters: instances_filters:
text_show: Ver text_show: Ver

5
db/seeds/blocklists.yml Normal file
View file

@ -0,0 +1,5 @@
---
- id: gardenfence
title: Gardenfence
- id: lista
title: Lista