From 6cfd4f4882d7198547005f561c8edff6f302bbb7 Mon Sep 17 00:00:00 2001 From: Sasha Sorokin Date: Wed, 29 Jan 2020 11:35:54 -0500 Subject: Add "Show thread" button to public profiles (#13000) 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. --- app/views/statuses/_simple_status.html.haml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/views') diff --git a/app/views/statuses/_simple_status.html.haml b/app/views/statuses/_simple_status.html.haml index 0affb1568..7df568873 100644 --- a/app/views/statuses/_simple_status.html.haml +++ b/app/views/statuses/_simple_status.html.haml @@ -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 -- cgit