Fix public list of domain blocks being too verbose on about page (#11967)

pull/1224/head
Eugen Rochko 2019-09-29 16:23:01 +02:00 committed by GitHub
parent 0a49b26793
commit bd9685f798
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 65 additions and 84 deletions

View File

@ -136,6 +136,47 @@ $small-breakpoint: 960px;
} }
} }
table {
width: 100%;
border-collapse: collapse;
break-inside: auto;
margin-top: 24px;
margin-bottom: 32px;
thead tr,
tbody tr {
break-after: auto;
break-inside: avoid;
border-bottom: 1px solid lighten($ui-base-color, 4%);
font-size: 1em;
line-height: 1.625;
font-weight: 400;
text-align: left;
color: $darker-text-color;
}
thead tr {
border-bottom-width: 2px;
line-height: 1.5;
font-weight: 500;
color: $dark-text-color;
}
th,
td {
padding: 8px;
align-self: start;
align-items: start;
&.nowrap {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 25%;
}
}
}
& > :first-child { & > :first-child {
margin-top: 0; margin-top: 0;
} }

View File

@ -292,70 +292,3 @@ a.table-action-link {
} }
} }
} }
.blocks-table {
width: 100%;
max-width: 100%;
border-spacing: 0;
border-collapse: collapse;
table-layout: fixed;
border: 1px solid darken($ui-base-color, 8%);
thead {
border: 1px solid darken($ui-base-color, 8%);
background: darken($ui-base-color, 4%);
font-weight: 500;
th.severity-column {
width: 120px;
}
th.button-column {
width: 23px;
}
}
tbody > tr {
border: 1px solid darken($ui-base-color, 8%);
border-bottom: 0;
background: darken($ui-base-color, 4%);
&:hover {
background: darken($ui-base-color, 2%);
}
&.even {
background: $ui-base-color;
&:hover {
background: lighten($ui-base-color, 2%);
}
}
&.rationale {
background: lighten($ui-base-color, 4%);
border-top: 0;
&:hover {
background: lighten($ui-base-color, 6%);
}
&.hidden {
display: none;
}
}
td:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
}
th,
td {
padding: 8px;
line-height: 18px;
vertical-align: top;
text-align: left;
}
}

View File

@ -0,0 +1,10 @@
%table
%thead
%tr
%th= t('about.unavailable_content_description.domain')
%th= t('about.unavailable_content_description.reason')
%tbody
- domain_blocks.each do |domain_block|
%tr
%td.nowrap= domain_block.domain
%td= domain_block.public_comment if display_blocks_rationale?

View File

@ -55,19 +55,15 @@
%p= t('about.unavailable_content_html') %p= t('about.unavailable_content_html')
- @blocks.each do |domain_block| - if (blocks = @blocks.select(&:reject_media?)) && !blocks.empty?
%p %p= t('about.unavailable_content_description.rejecting_media')
%strong= "#{domain_block.domain}:" = render partial: 'domain_blocks', locals: { domain_blocks: blocks }
- if (blocks = @blocks.select(&:silence?)) && !blocks.empty?
- if domain_block.suspend? %p= t('about.unavailable_content_description.silenced')
= t('about.unavailable_content_description.suspended') = render partial: 'domain_blocks', locals: { domain_blocks: blocks }
- else - if (blocks = @blocks.select(&:suspend?)) && !blocks.empty?
= t('about.unavailable_content_description.silenced') if domain_block.silence? %p= t('about.unavailable_content_description.suspended')
= t('about.unavailable_content_description.rejecting_media') if domain_block.reject_media? = render partial: 'domain_blocks', locals: { domain_blocks: blocks }
- if display_blocks_rationale? && domain_block.public_comment.present?
%strong= t('about.unavailable_content_description.reason')
= domain_block.public_comment
.column-4 .column-4
%ul.table-of-contents %ul.table-of-contents

View File

@ -37,10 +37,11 @@ en:
terms: Terms of service terms: Terms of service
unavailable_content: Unavailable content unavailable_content: Unavailable content
unavailable_content_description: unavailable_content_description:
reason: 'Reason:' domain: Server
rejecting_media: Media files from this server will not be processed and and no thumbnails will be displayed, requiring manual click-through to the other server. reason: Reason
silenced: Posts from this server will not show up anywhere except your home feed if you follow the author. rejecting_media: 'Media files from these servers will not be processed or stored, and and no thumbnails will be displayed, requiring manual click-through to the original file:'
suspended: You won't be able to follow anyone from this server, and no data from it will be processed or stored, and no data exchanged. silenced: 'Posts from these servers will be hidden in public timelines and conversations, and no notifications will be generated from their users'' interactions, unless you are following them:'
suspended: 'No data from these servers will be processed, stored or exchanged, making any interaction or communication with users from these servers impossible:'
unavailable_content_html: Mastodon generally allows you to view content from and interact with users from any other server in the fediverse. These are the exceptions that have been made on this particular server. unavailable_content_html: Mastodon generally allows you to view content from and interact with users from any other server in the fediverse. These are the exceptions that have been made on this particular server.
user_count_after: user_count_after:
one: user one: user