Skip to content

Commit

Permalink
Add "Show thread" button to public profiles (mastodon#13000)
Browse files Browse the repository at this point in the history
This adds "Show thread" button to the status view which is used in
profiles. The logic to display the button is mimicking logic in
web app available at app/javascript/mastodon/components/status.js#L439.

* The little change in components CSS required to remove enforced
  underline for all links on public pages on our button.
  • Loading branch information
brawaru authored and multiple creatures committed Feb 21, 2020
1 parent b7532f1 commit 6cfd4f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/javascript/styles/mastodon/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@
background: transparent;
padding: 0;
padding-top: 8px;
text-decoration: none;

&:hover,
&:active {
Expand Down
4 changes: 4 additions & 0 deletions app/views/statuses/_simple_status.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
- elsif status.preview_card
= react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json

- if !status.in_reply_to_id.nil? && status.in_reply_to_account_id == status.account.id
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'status__content__read-more-button', target: stream_link_target, rel: 'noopener noreferrer' do
= t 'statuses.show_thread'

.status__action-bar
- if status.sharekey.present? && user_signed_in? && @account.id == status.account_id
= link_to "#{TagManager.instance.url_for(status)}?key=#{status.sharekey}", class: 'status__action-bar-button icon-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px', title: 'Right click or long-press to copy share link with key', target: stream_link_target, rel: 'noopener' do
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,7 @@ en:
replies_rejected: 'The author is not accepting replies to this roar.'
kicked: "You do not have the author's permission to reply to this thread."
show_more: Show more
show_thread: Show thread
sign_in_to_participate: Sign in to participate in the conversation
title: '%{name}: "%{quote}"'
visibilities:
Expand Down

0 comments on commit 6cfd4f4

Please sign in to comment.