mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 05:06:22 +00:00
Merge branch 'issue-14966' into issue-13586-2
This commit is contained in:
commit
17f1e664cd
19 changed files with 132 additions and 95 deletions
|
@ -572,7 +572,7 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
|
|||
position: absolute;
|
||||
left: 97%;
|
||||
bottom: 3%;
|
||||
transform: rotate(60deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
&[open] {
|
||||
& > summary {
|
||||
|
@ -584,4 +584,6 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
|
|||
}
|
||||
|
||||
|
||||
|
||||
hr {
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
}
|
|
@ -32,6 +32,7 @@ class ApplicationController < ActionController::Base
|
|||
@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')))
|
||||
@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|
|
||||
activity['attributedTo'] = @remote_profile
|
||||
end
|
||||
|
|
6
app/views/components/_block_list.haml
Normal file
6
app/views/components/_block_list.haml
Normal 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"]
|
|
@ -1,6 +1,2 @@
|
|||
-# Componente Listas de bloqueo de Instancias
|
||||
.card.mt-3
|
||||
.card-body
|
||||
.d-flex.flex-row
|
||||
= render 'components/checkbox'
|
||||
%h4.ml-5= t('.title')
|
||||
- @blocklists.each do |blocklist|
|
||||
= render 'components/block_list', blocklist: blocklist
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
-# 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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
-# Componente Checkbox
|
||||
.custom-control.custom-checkbox.p-0
|
||||
%input{ type: 'checkbox', id: local_assigns[:id], class: local_assigns[:class] }
|
||||
.custom-control.custom-checkbox
|
||||
%input.custom-control-input{ type: 'checkbox', id: id, name: id, class: local_assigns[:class] }
|
||||
%label.custom-control-label{ for: id }= yield
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
-# Componente Botonera de Comentarios
|
||||
|
||||
.d-flex.py-4
|
||||
- btn_class = 'btn-secondary'
|
||||
= 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_accept'), 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: ''
|
||||
- btn_class = 'btn-secondary py-1 px-2'
|
||||
= 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_accept'), 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: ''
|
|
@ -1,2 +1,7 @@
|
|||
%a{href: profile['id']}= profile['preferredUsername']
|
||||
=profile['summary'].html_safe
|
||||
.row.no-gutters.pt-2
|
||||
.col-1
|
||||
= render 'components/checkbox', id: profile['id']
|
||||
.col-11
|
||||
%h4
|
||||
%a{href: profile['id']}= profile['preferredUsername']
|
||||
=profile['summary'].html_safe
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
= render 'components/profiles_filters'
|
||||
|
||||
- @moderation_queue.map{ |c| c['attributedTo'] }.uniq.each do |remote_profile|
|
||||
%hr
|
||||
= render 'account', profile: remote_profile
|
||||
|
||||
-# Botones de Moderación
|
||||
.d-flex.py-4
|
||||
.d-flex.pb-4
|
||||
= render 'components/profiles_btn_box'
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
.form-group
|
||||
.d-flex.flex-column.mt-5
|
||||
%textarea.mb-3{ name: '', id: '', placeholder: t('moderation_queue.instances.custom_block') }
|
||||
%button.col.btn.btn-secondary{ type: 'submit' }= t('moderation_queue.instances.submit')
|
||||
= label_tag "custom_blocklist", t('moderation_queue.instances.custom_block')
|
||||
= text_area_tag "custom_blocklist", nil, class: 'form-control'
|
||||
%button.btn.btn-secondary.mt-3{ type: 'submit' }= t('moderation_queue.instances.submit')
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
-# Componente Comentario
|
||||
.flex.mx-4.my-5
|
||||
.flex.mx-4.my-4
|
||||
.row.no-gutters
|
||||
.col-1
|
||||
= render 'components/checkbox'
|
||||
= render 'components/checkbox', id: comment['id']
|
||||
.col-11
|
||||
.row.no-gutters
|
||||
.col-4
|
||||
%p= comment['published'].to_datetime.strftime(t('date.format'))
|
||||
.col-8
|
||||
.col-5.col-sm-3.col-lg-4
|
||||
%p
|
||||
%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
|
||||
%dt.d-inline.mr-2= t('.source_profile')
|
||||
%dd.d-inline
|
||||
|
@ -17,9 +19,14 @@
|
|||
.row.no-gutters
|
||||
.col.p-0
|
||||
%p
|
||||
%span.mr-3= t('.reply_to')
|
||||
%span= t('.reply_to')
|
||||
%span
|
||||
%a{ href: comment['inReplyTo'] }= comment['inReplyTo']
|
||||
.row.no-gutters
|
||||
.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
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
= render 'components/comments_filters'
|
||||
|
||||
- moderation_queue.each do |comment|
|
||||
%hr
|
||||
= render 'comment', comment: comment, profile: comment['attributedTo']
|
||||
|
||||
-# Botones moderación
|
||||
= render 'components/comments_btn_box', comment: comment
|
||||
.d-flex.justify-content-center
|
||||
= render 'components/comments_btn_box', comment: comment
|
|
@ -1,11 +1,16 @@
|
|||
- host = instance['domain']
|
||||
- host ||= instance['uri']
|
||||
- host = "https://#{host}"
|
||||
- hosthttps = "https://#{host}"
|
||||
|
||||
%a{ href: host }= instance['title']
|
||||
%p= instance['description'].html_safe
|
||||
%p
|
||||
%span= t('.users')
|
||||
%span
|
||||
= instance.dig('usage', 'users', 'active_month')
|
||||
= instance.dig('stats', 'user_count')
|
||||
.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
|
||||
%span= t('.users')
|
||||
%span
|
||||
= instance.dig('usage', 'users', 'active_month')
|
||||
= instance.dig('stats', 'user_count')
|
||||
|
|
|
@ -2,13 +2,15 @@
|
|||
= render 'components/instances_filters'
|
||||
|
||||
- @instances.each do |instance|
|
||||
%hr
|
||||
= render 'moderation_queue/instance', instance: instance
|
||||
|
||||
-# Botones moderación
|
||||
.d-flex.py-5
|
||||
.d-flex.pb-4
|
||||
= render 'components/instances_btn_box'
|
||||
|
||||
%hr
|
||||
%h3.mt-5= t('moderation_queue.instances.title')
|
||||
%lead= t('moderation_queue.instances.description')
|
||||
= render 'components/block_lists'
|
||||
= render 'components/block_lists', blocklists: @blocklists
|
||||
= render 'moderation_queue/block_instances_textarea'
|
||||
|
|
|
@ -6,9 +6,11 @@
|
|||
- summary = t('.instances')
|
||||
= render 'layouts/details', summary: summary do
|
||||
= render 'moderation_queue/instances', site: @site, post: @post, moderation_queue: @moderation_queue
|
||||
%hr
|
||||
- summary = t('.accounts')
|
||||
= render 'layouts/details', summary: summary do
|
||||
= render 'moderation_queue/accounts', site: @site, post: @post, moderation_queue: @moderation_queue
|
||||
%hr
|
||||
- summary = t('.comments')
|
||||
= render 'layouts/details', summary: summary do
|
||||
= render 'moderation_queue/comments', site: @site, post: @post, moderation_queue: @moderation_queue
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
= render 'moderation_queue/comment', comment: comment, profile: comment['attributedTo']
|
||||
|
||||
-# Botones moderación
|
||||
.d-flex.py-4
|
||||
.d-flex
|
||||
= render 'components/comments_btn_box'
|
||||
|
|
|
@ -48,58 +48,59 @@ en:
|
|||
time:
|
||||
am: am
|
||||
pm: pm
|
||||
format: '%-I:%M %p'
|
||||
components:
|
||||
instances_filters:
|
||||
text_show: Show
|
||||
text_checked: With the checked
|
||||
instances_checked_submenu:
|
||||
submenu_case: Check case by case
|
||||
submenu_allow: Allow everything
|
||||
submenu_reject: Reject
|
||||
instances_show_submenu:
|
||||
submenu_allow: Allow
|
||||
submenu_reject: Reject
|
||||
comments_filters:
|
||||
text_show: Sho
|
||||
text_checked: With the checked
|
||||
comments_checked_submenu:
|
||||
submenu_pause: Pause
|
||||
submenu_accept: Accept
|
||||
submenu_reject: Reject
|
||||
comments_show_submenu:
|
||||
submenu_pause: Pause
|
||||
submenu_accept: Accept
|
||||
submenu_report: Report
|
||||
submenu_reject: Reject
|
||||
profiles_filters:
|
||||
text_show: Show
|
||||
text_checked: With the checked
|
||||
profiles_checked_submenu:
|
||||
submenu_pause: Pause
|
||||
submenu_accept: Accept
|
||||
submenu_reject: Reject
|
||||
submenu_block: Block
|
||||
profiles_show_submenu:
|
||||
submenu_accept: Accept
|
||||
submenu_block: Block
|
||||
submenu_reject: Reject
|
||||
block_lists:
|
||||
title: Block lists
|
||||
comments_btn_box:
|
||||
text_pause: Pause
|
||||
text_reject: Reject
|
||||
text_accept: Accept
|
||||
text_reply: Reply
|
||||
text_report: Report
|
||||
instances_btn_box:
|
||||
text_check: Check case by case
|
||||
text_allow: Allow everything
|
||||
text_deny: Block instance
|
||||
profiles_btn_box:
|
||||
text_approve: Always approve
|
||||
text_check: Always check
|
||||
text_deny: Block
|
||||
text_report: Report
|
||||
instances_filters:
|
||||
text_show: Show
|
||||
text_checked: With selected
|
||||
instances_checked_submenu:
|
||||
submenu_case: Check case by case
|
||||
submenu_allow: Allow everything
|
||||
submenu_reject: Reject
|
||||
instances_show_submenu:
|
||||
submenu_allow: Allow
|
||||
submenu_reject: Reject
|
||||
comments_filters:
|
||||
text_show: Show
|
||||
text_checked: With selected
|
||||
comments_checked_submenu:
|
||||
submenu_pause: Pause
|
||||
submenu_accept: Accept
|
||||
submenu_reject: Reject
|
||||
comments_show_submenu:
|
||||
submenu_pause: Pause
|
||||
submenu_accept: Accept
|
||||
submenu_report: Report
|
||||
submenu_reject: Reject
|
||||
profiles_filters:
|
||||
text_show: Show
|
||||
text_checked: With selected
|
||||
profiles_checked_submenu:
|
||||
submenu_pause: Pause
|
||||
submenu_accept: Accept
|
||||
submenu_reject: Reject
|
||||
submenu_block: Block
|
||||
profiles_show_submenu:
|
||||
submenu_accept: Accept
|
||||
submenu_block: Block
|
||||
submenu_reject: Reject
|
||||
block_lists:
|
||||
title: Block lists
|
||||
comments_btn_box:
|
||||
text_pause: Pause
|
||||
text_reject: Reject
|
||||
text_accept: Accept
|
||||
text_reply: Reply
|
||||
text_report: Report
|
||||
instances_btn_box:
|
||||
text_check: Check case by case
|
||||
text_allow: Allow everything
|
||||
text_deny: Block instance
|
||||
profiles_btn_box:
|
||||
text_approve: Always approve
|
||||
text_check: Always check
|
||||
text_deny: Block
|
||||
text_report: Report
|
||||
moderation_queue:
|
||||
index:
|
||||
title: Moderation
|
||||
|
|
|
@ -48,6 +48,7 @@ es:
|
|||
time:
|
||||
am: am
|
||||
pm: pm
|
||||
format: '%-H:%M'
|
||||
components:
|
||||
instances_filters:
|
||||
text_show: Ver
|
||||
|
|
5
db/seeds/blocklists.yml
Normal file
5
db/seeds/blocklists.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- id: gardenfence
|
||||
title: Gardenfence
|
||||
- id: lista
|
||||
title: Lista
|
Loading…
Reference in a new issue