mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 18:26:21 +00:00
agrego toggler para distributed press
This commit is contained in:
parent
d05b93d85e
commit
5da4c796e0
4 changed files with 30 additions and 1 deletions
|
@ -17,7 +17,7 @@ class Site < ApplicationRecord
|
|||
|
||||
# TODO: Hacer que los diferentes tipos de deploy se auto registren
|
||||
# @see app/services/site_service.rb
|
||||
DEPLOYS = %i[local private www zip hidden_service].freeze
|
||||
DEPLOYS = %i[local private www zip hidden_service distributed_press].freeze
|
||||
|
||||
validates :name, uniqueness: true, hostname: {
|
||||
allow_root_label: true
|
||||
|
|
21
app/views/deploys/_deploy_distributed_press.haml
Normal file
21
app/views/deploys/_deploy_distributed_press.haml
Normal file
|
@ -0,0 +1,21 @@
|
|||
-# Publicar a la web distribuida
|
||||
|
||||
.row
|
||||
.col
|
||||
= deploy.hidden_field :id
|
||||
= deploy.hidden_field :type
|
||||
.custom-control.custom-switch
|
||||
-#
|
||||
El checkbox invierte la lógica de destrucción porque queremos
|
||||
crear el deploy si está activado y destruirlo si está
|
||||
desactivado.
|
||||
= deploy.check_box :_destroy,
|
||||
{ checked: deploy.object.persisted?, class: 'custom-control-input' },
|
||||
'0', '1'
|
||||
= deploy.label :_destroy, class: 'custom-control-label' do
|
||||
%h3= t('.title')
|
||||
= sanitize_markdown t('.help', public_url: deploy.object.site.url),
|
||||
tags: %w[p strong em a]
|
||||
|
||||
|
||||
%hr/
|
|
@ -248,6 +248,10 @@ en:
|
|||
|
||||
Only accessible through [Tor
|
||||
Browser](https://www.torproject.org/download/)
|
||||
deploy_distributed_press:
|
||||
title: 'Publish on Distributed Press'
|
||||
help: |
|
||||
ipfs
|
||||
stats:
|
||||
index:
|
||||
title: Statistics
|
||||
|
|
|
@ -253,6 +253,10 @@ es:
|
|||
|
||||
Sólo será accesible a través del [Navegador
|
||||
Tor](https://www.torproject.org/es/download/).
|
||||
deploy_distributed_press:
|
||||
title: 'Alojar en la web distribuida'
|
||||
help: |
|
||||
Es para que esté en la web distribuida
|
||||
stats:
|
||||
index:
|
||||
title: Estadísticas
|
||||
|
|
Loading…
Reference in a new issue