5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 08:26:23 +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,7 +1,6 @@
-# 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: ''

View file

@ -1,2 +1,7 @@
.row.no-gutters.pt-2
.col-1
= render 'components/checkbox', id: profile['id']
.col-11
%h4
%a{href: profile['id']}= profile['preferredUsername'] %a{href: profile['id']}= profile['preferredUsername']
=profile['summary'].html_safe =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
- if comment['summary']
- summary = comment['summary']
= render 'layouts/details', summary: summary do
%p= comment['content'].html_safe
- else
%p= comment['content'].html_safe %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
.d-flex.justify-content-center
= render 'components/comments_btn_box', comment: comment = render 'components/comments_btn_box', comment: comment

View file

@ -1,8 +1,13 @@
- 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
.col-1
= render 'components/checkbox', id: host
.col-11
%h4
%a{ href: hosthttps }= instance['title']
%p= instance['description'].html_safe %p= instance['description'].html_safe
%p %p
%span= t('.users') %span= t('.users')

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,10 +48,11 @@ 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
@ -60,8 +61,8 @@ en:
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
@ -73,7 +74,7 @@ en:
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

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