]> cat aescling's git repositories - mastodon.git/commitdiff
Add "Show thread" button to public profiles (#13000)
authorSasha Sorokin <dafri.nochiterov8@gmail.com>
Wed, 29 Jan 2020 16:35:54 +0000 (11:35 -0500)
committerGitHub <noreply@github.com>
Wed, 29 Jan 2020 16:35:54 +0000 (17:35 +0100)
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/javascript/styles/mastodon/components.scss
app/views/statuses/_simple_status.html.haml
config/locales/en.yml

index d72f2e05940ca2922894145075df0ff3cd9c9ede..7c09780b4f2f79591a7e1d06cb36afa5314f5251 100644 (file)
   background: transparent;
   padding: 0;
   padding-top: 8px;
+  text-decoration: none;
 
   &:hover,
   &:active {
index 66c9412afcc6d77f0c2c8133ba8731ccb296c148..5d16b1fc2a2ca1dc48394cde0adf15ee1b96be86 100644 (file)
   - 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
     .status__action-bar__counter
       = link_to remote_interaction_path(status, type: :reply), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
index 44900d42614bfa75ef4b92cac682e2939eb78651..b1586ade52242e222e418e6dd89c79f5a4e3776d 100644 (file)
@@ -1088,6 +1088,7 @@ en:
         other: "%{count} votes"
       vote: Vote
     show_more: Show more
+    show_thread: Show thread
     sign_in_to_participate: Sign in to participate in the conversation
     title: '%{name}: "%{quote}"'
     visibilities: