Skip to content

Commit

Permalink
Show comments in the admin/instances page (mastodon#29240)
Browse files Browse the repository at this point in the history
Co-authored-by: Claire <[email protected]>
  • Loading branch information
2 people authored and Ember-ruby committed Mar 25, 2024
1 parent 3110232 commit fa310d6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/javascript/styles/mastodon/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,23 @@ $content-width: 840px;
padding-bottom: 0;
margin-bottom: 0;
border-bottom: 0;

.comment {
display: block;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 4px;

&.private-comment {
display: block;
color: $darker-text-color;
}

&.public-comment {
display: block;
color: $secondary-text-color;
}
}
}

& > p {
Expand Down
4 changes: 4 additions & 0 deletions app/views/admin/instances/_instance.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
%small
- if instance.domain_block
= instance.domain_block.policies.map { |policy| t(policy, scope: 'admin.instances.content_policies.policies') }.join(' · ')
- if instance.domain_block.public_comment.present?
%span.comment.public-comment #{t('admin.domain_blocks.public_comment')}: #{instance.domain_block.public_comment}
- if instance.domain_block.private_comment.present?
%span.comment.private-comment #{t('admin.domain_blocks.private_comment')}: #{instance.domain_block.private_comment}
- elsif instance.domain_allow
= t('admin.accounts.whitelisted')
- else
Expand Down

0 comments on commit fa310d6

Please sign in to comment.