mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-18 14:26:22 +00:00
fix: checkboxes
This commit is contained in:
parent
bd41144ecf
commit
1fba54d80b
9 changed files with 23 additions and 14 deletions
|
@ -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.mb-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,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,6 +1,6 @@
|
|||
.row.no-gutters.pt-2
|
||||
.col-1
|
||||
= render 'components/checkbox'
|
||||
= render 'components/checkbox', id: profile['id']
|
||||
.col-11
|
||||
%h4
|
||||
%a{href: profile['id']}= profile['preferredUsername']
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.flex.mx-4.my-5
|
||||
.row.no-gutters
|
||||
.col-1
|
||||
= render 'components/checkbox'
|
||||
= render 'components/checkbox', id: comment['id']
|
||||
.col-11
|
||||
.row.no-gutters
|
||||
.col-4
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
- host = instance['domain']
|
||||
- host ||= instance['uri']
|
||||
- host = "https://#{host}"
|
||||
- hosthttps = "https://#{host}"
|
||||
|
||||
.row.no-gutters.pt-2
|
||||
.col-1
|
||||
= render 'components/checkbox'
|
||||
= render 'components/checkbox', id: host
|
||||
.col-11
|
||||
%h4
|
||||
%a{ href: host }= instance['title']
|
||||
%a{ href: hosthttps }= instance['title']
|
||||
%p= instance['description'].html_safe
|
||||
%p
|
||||
%span= t('.users')
|
||||
|
|
|
@ -11,5 +11,5 @@
|
|||
|
||||
%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'
|
||||
|
|
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