From ba3a399d8899c55f03b5648ed668c9f32f9b8a26 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sat, 27 Jun 2020 20:48:54 -0500 Subject: [Privacy, Transparency] Reduce allowlist mode restrictions; make publishing trusted servers to about page possible. --- app/views/about/_domain_allows.html.haml | 12 ++++++++++++ app/views/about/more.html.haml | 10 +++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 app/views/about/_domain_allows.html.haml (limited to 'app/views/about') diff --git a/app/views/about/_domain_allows.html.haml b/app/views/about/_domain_allows.html.haml new file mode 100644 index 000000000..ab5755b41 --- /dev/null +++ b/app/views/about/_domain_allows.html.haml @@ -0,0 +1,12 @@ +%table + %thead + %tr + %th{colspan: 3}= t('about.unavailable_content_description.domain') + %tbody + - domain_allows.in_groups_of(3) do |group| + %tr + - group.each do |domain_allow| + %td.nowrap + - unless domain_allow.nil? + %span + %a{ title: domain_allow.domain, href: "https://#{domain_allow.domain}", rel: 'noopener nofollow' }= domain_allow.domain diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml index 0a12ab8d6..0e4465a4a 100644 --- a/app/views/about/more.html.haml +++ b/app/views/about/more.html.haml @@ -42,13 +42,18 @@ .column-3 = render 'application/flashes' - - if @contents.blank? && (!display_blocks? || @blocks&.empty?) + - if @contents.blank? && ((!display_allows? || @allows&.empty?) && (!display_blocks? || @blocks&.empty?)) = nothing_here - else .box-widget .rich-formatting = @contents.html_safe + - if display_allows? && !@allows.empty? + %h2#available-content= t('about.available_content') + %p= t('about.available_content_html') + = render partial: 'domain_allows', locals: { domain_allows: @allows } + - if display_blocks? && !@blocks.empty? %h2#unavailable-content= t('about.unavailable_content') @@ -78,5 +83,8 @@ - item.children.each do |sub_item| %li= link_to sub_item.title, "##{sub_item.anchor}" + - if display_allows? && !@allows.empty? + %li= link_to t('about.available_content'), '#available-content' + - if display_blocks? && !@blocks.empty? %li= link_to t('about.unavailable_content'), '#unavailable-content' -- cgit