mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 12:26:21 +00:00
Merge branch 'rails' of 0xacab.org:sutty/sutty into panel.testing.sutty.nl
This commit is contained in:
commit
b814ae5355
6 changed files with 26 additions and 30 deletions
|
@ -234,6 +234,8 @@ class Site < ApplicationRecord
|
||||||
#
|
#
|
||||||
# @return [Hash] { post: Layout }
|
# @return [Hash] { post: Layout }
|
||||||
def layouts
|
def layouts
|
||||||
|
return {} if data['layouts'].blank?
|
||||||
|
|
||||||
# Crea un Struct dinámico cuyas llaves son los nombres de todos los
|
# Crea un Struct dinámico cuyas llaves son los nombres de todos los
|
||||||
# layouts. Si pasamos un layout que no existe, obtenemos un
|
# layouts. Si pasamos un layout que no existe, obtenemos un
|
||||||
# NoMethodError
|
# NoMethodError
|
||||||
|
|
|
@ -8,4 +8,6 @@
|
||||||
-# XXX: Solo un nivel de recursividad
|
-# XXX: Solo un nivel de recursividad
|
||||||
- unless local_assigns[:parent_schema]
|
- unless local_assigns[:parent_schema]
|
||||||
- schema.schemas.each do |s|
|
- schema.schemas.each do |s|
|
||||||
|
- next if s.hidden?
|
||||||
= render 'schemas/row', schema: s, site: site, filter: filter, parent_schema: schema
|
= render 'schemas/row', schema: s, site: site, filter: filter, parent_schema: schema
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,12 @@
|
||||||
%td
|
%td
|
||||||
%h2
|
%h2
|
||||||
- if policy(site).show?
|
- if policy(site).show?
|
||||||
= link_to site.title, site_posts_path(site, locale: site.default_locale)
|
= link_to site.title,
|
||||||
|
site_posts_path(site,
|
||||||
|
locale: site.default_locale)
|
||||||
- else
|
- else
|
||||||
= site.title
|
= site.title
|
||||||
%p.lead= site.description
|
%p.lead= site.description
|
||||||
%br
|
|
||||||
.d-flex.flex-row
|
.d-flex.flex-row
|
||||||
= link_to t('.visit'), site.url, class: 'btn btn-secondary'
|
= link_to t('.visit'), site.url, class: 'btn btn-secondary'
|
||||||
- if current_usuarie.rol_for_site(site).temporal?
|
- if current_usuarie.rol_for_site(site).temporal?
|
||||||
|
|
|
@ -12,7 +12,7 @@ class CreateFediblocks < ActiveRecord::Migration[6.1]
|
||||||
t.string :url, null: false
|
t.string :url, null: false
|
||||||
t.string :download_url, null: false
|
t.string :download_url, null: false
|
||||||
t.string :format, null: false
|
t.string :format, null: false
|
||||||
t.jsonb :instances, default: []
|
t.jsonb :hostnames, default: []
|
||||||
end
|
end
|
||||||
|
|
||||||
YAML.safe_load(File.read('db/seeds/activity_pub/fediblocks.yml')).each do |fediblock|
|
YAML.safe_load(File.read('db/seeds/activity_pub/fediblocks.yml')).each do |fediblock|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
# Cambia el nombre de la columna para que podamos obtener todas las
|
|
||||||
# instancias de un fediblock
|
|
||||||
class RenameFediblockInstancesToHostnames < ActiveRecord::Migration[6.1]
|
|
||||||
def change
|
|
||||||
rename_column :activity_pub_fediblocks, :instances, :hostnames
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -6,7 +6,7 @@
|
||||||
id: "9046789a-5de8-4b16-beed-796060f8f3cc"
|
id: "9046789a-5de8-4b16-beed-796060f8f3cc"
|
||||||
- title: "Oliphant Tier 0"
|
- title: "Oliphant Tier 0"
|
||||||
url: "https://writer.oliphant.social/oliphant/the-oliphant-social-blocklist"
|
url: "https://writer.oliphant.social/oliphant/the-oliphant-social-blocklist"
|
||||||
download_url: "https://codeberg.org/oliphant/blocklists/raw/branch/main/blocklists/mastodon/tier0.csv"
|
download_url: "https://codeberg.org/oliphant/blocklists/raw/branch/main/blocklists/mastodon/seirdy-tier0.csv"
|
||||||
format: "mastodon"
|
format: "mastodon"
|
||||||
id: "fc1efcb8-7e68-4a76-ae9e-0c447752b12b"
|
id: "fc1efcb8-7e68-4a76-ae9e-0c447752b12b"
|
||||||
- title: "The Bad Space (90%)"
|
- title: "The Bad Space (90%)"
|
||||||
|
|
Loading…
Reference in a new issue