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.

44 lines
3.1 KiB

  1. .status
  2. .status__info
  3. = link_to TagManager.instance.url_for(status), class: 'status__relative-time u-url u-uid', target: stream_link_target, rel: 'noopener' do
  4. %time.time-ago{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
  5. %data.dt-published{ value: status.created_at.to_time.iso8601 }
  6. = link_to TagManager.instance.url_for(status.account), class: 'status__display-name p-author h-card', target: stream_link_target, rel: 'noopener' do
  7. .status__avatar
  8. %div
  9. = image_tag status.account.avatar(:original), width: 48, height: 48, alt: '', class: 'u-photo account__avatar'
  10. %span.display-name
  11. %bdi
  12. %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true)
  13. %span.display-name__account
  14. = acct(status.account)
  15. = fa_icon('lock') if status.account.locked?
  16. .status__content.emojify<
  17. - if status.spoiler_text?
  18. %p{ style: 'margin-bottom: 0' }<
  19. %span.p-summary> #{Formatter.instance.format_spoiler(status)}&nbsp;
  20. %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
  21. .e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true)
  22. - unless status.media_attachments.empty?
  23. - if status.media_attachments.first.video?
  24. - video = status.media_attachments.first
  25. = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 610, height: 343, inline: true, alt: video.description
  26. - else
  27. = react_component :media_gallery, height: 343, sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }
  28. .status__action-bar
  29. .status__action-bar__counter
  30. = link_to remote_interaction_path(status), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
  31. = fa_icon 'reply fw'
  32. .status__action-bar__counter__label= obscured_counter status.replies_count
  33. = link_to remote_interaction_path(status), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
  34. - if status.public_visibility? || status.unlisted_visibility?
  35. = fa_icon 'retweet fw'
  36. - elsif status.private_visibility?
  37. = fa_icon 'lock fw'
  38. - else
  39. = fa_icon 'envelope fw'
  40. = link_to remote_interaction_path(status), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
  41. = fa_icon 'star fw'