5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-18 14:36:21 +00:00

fix: checkboxes

This commit is contained in:
maki 2024-02-21 13:50:29 -03:00
parent bd41144ecf
commit 1fba54d80b
9 changed files with 23 additions and 14 deletions

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.mb-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,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,6 +1,6 @@
.row.no-gutters.pt-2 .row.no-gutters.pt-2
.col-1 .col-1
= render 'components/checkbox' = render 'components/checkbox', id: profile['id']
.col-11 .col-11
%h4 %h4
%a{href: profile['id']}= profile['preferredUsername'] %a{href: profile['id']}= profile['preferredUsername']

View file

@ -2,7 +2,7 @@
.flex.mx-4.my-5 .flex.mx-4.my-5
.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-4

View file

@ -1,13 +1,13 @@
- host = instance['domain'] - host = instance['domain']
- host ||= instance['uri'] - host ||= instance['uri']
- host = "https://#{host}" - hosthttps = "https://#{host}"
.row.no-gutters.pt-2 .row.no-gutters.pt-2
.col-1 .col-1
= render 'components/checkbox' = render 'components/checkbox', id: host
.col-11 .col-11
%h4 %h4
%a{ href: host }= instance['title'] %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

@ -11,5 +11,5 @@
%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'

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

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