You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
3.7 KiB

  1. .detailed-status.detailed-status--flex{ class: "detailed-status-#{status.visibility}" }
  2. .p-author.h-card
  3. = link_to ActivityPub::TagManager.instance.url_for(status.account), class: 'detailed-status__display-name u-url', target: stream_link_target, rel: 'noopener' do
  4. .detailed-status__display-avatar
  5. - if prefers_autoplay?
  6. = image_tag status.account.avatar_original_url, alt: '', class: 'account__avatar u-photo'
  7. - else
  8. = image_tag status.account.avatar_static_url, alt: '', class: 'account__avatar u-photo'
  9. %span.display-name
  10. %bdi
  11. %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: prefers_autoplay?)
  12. %span.display-name__account
  13. = acct(status.account)
  14. = fa_icon('lock') if status.account.locked?
  15. = account_action_button(status.account)
  16. .status__content.emojify{ :data => ({ spoiler: current_account&.user&.setting_expand_spoilers ? 'expanded' : 'folded' } if status.spoiler_text?) }<
  17. - if status.spoiler_text?
  18. %p<
  19. %span.p-summary> #{Formatter.instance.format_spoiler(status, autoplay: prefers_autoplay?)}&nbsp;
  20. %button.status__content__spoiler-link= t('statuses.show_more')
  21. .e-content
  22. = Formatter.instance.format(status, custom_emojify: true, autoplay: prefers_autoplay?)
  23. - if status.preloadable_poll
  24. = render_poll_component(status)
  25. - if !status.media_attachments.empty?
  26. - if status.media_attachments.first.video?
  27. = render_video_component(status, width: 670, height: 380, detailed: true)
  28. - elsif status.media_attachments.first.audio?
  29. = render_audio_component(status, width: 670, height: 380)
  30. - else
  31. = render_media_gallery_component(status, height: 380, standalone: true)
  32. - elsif status.preview_card
  33. = render_card_component(status)
  34. .detailed-status__meta
  35. %data.dt-published{ value: status.created_at.to_time.iso8601 }
  36. = link_to ActivityPub::TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: stream_link_target, rel: 'noopener noreferrer' do
  37. %time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
  38. ·
  39. %span.detailed-status__visibility-icon
  40. = visibility_icon status
  41. ·
  42. - if status.application && @account.user&.setting_show_application
  43. - if status.application.website.blank?
  44. %strong.detailed-status__application= status.application.name
  45. - else
  46. = link_to status.application.name, status.application.website, class: 'detailed-status__application', target: '_blank', rel: 'noopener noreferrer'
  47. ·
  48. = link_to remote_interaction_path(status, type: :reply), class: 'modal-button detailed-status__link' do
  49. - if status.in_reply_to_id.nil?
  50. = fa_icon('reply')
  51. - else
  52. = fa_icon('reply-all')
  53. %span.detailed-status__reblogs>= friendly_number_to_human status.replies_count
  54. = " "
  55. ·
  56. - if status.public_visibility? || status.unlisted_visibility?
  57. = link_to remote_interaction_path(status, type: :reblog), class: 'modal-button detailed-status__link' do
  58. = fa_icon('retweet')
  59. %span.detailed-status__reblogs>= friendly_number_to_human status.reblogs_count
  60. = " "
  61. ·
  62. = link_to remote_interaction_path(status, type: :favourite), class: 'modal-button detailed-status__link' do
  63. = fa_icon('star')
  64. %span.detailed-status__favorites>= friendly_number_to_human status.favourites_count
  65. = " "
  66. - if user_signed_in?
  67. ·
  68. = link_to t('statuses.open_in_web'), web_url("statuses/#{status.id}"), class: 'detailed-status__application', target: '_blank'