From c84f40331e524f1e16835dc5a888de1281f96e39 Mon Sep 17 00:00:00 2001 From: YoheiZuho Date: Sun, 16 May 2021 08:28:55 +0200 Subject: [PATCH] Revert "fix" This reverts commit c345a1eeddff4f943b7c263761c60b6368963f6b. --- .../compose/components/quote_indicator.js | 18 ++-------- app/views/statuses/_quote_status.html.haml | 35 ------------------- 2 files changed, 3 insertions(+), 50 deletions(-) delete mode 100644 app/views/statuses/_quote_status.html.haml diff --git a/app/javascript/mastodon/features/compose/components/quote_indicator.js b/app/javascript/mastodon/features/compose/components/quote_indicator.js index 4cb844151..515c79fca 100644 --- a/app/javascript/mastodon/features/compose/components/quote_indicator.js +++ b/app/javascript/mastodon/features/compose/components/quote_indicator.js @@ -6,11 +6,7 @@ import IconButton from '../../../components/icon_button'; import DisplayName from '../../../components/display_name'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; -<<<<<<< HEAD import { isRtl } from '../../../rtl'; -======= -import AttachmentList from 'mastodon/components/attachment_list'; ->>>>>>> 008cc7f1a... fix rtl in quote_indicator const messages = defineMessages({ cancel: { id: 'quote_indicator.cancel', defaultMessage: 'Cancel' }, @@ -48,6 +44,9 @@ export default class QuoteIndicator extends ImmutablePureComponent { } const content = { __html: status.get('contentHtml') }; + const style = { + direction: isRtl(status.get('search_index')) ? 'rtl' : 'ltr', + }; return (
@@ -60,18 +59,7 @@ export default class QuoteIndicator extends ImmutablePureComponent {
-<<<<<<< HEAD
-======= -
- - {status.get('media_attachments').size > 0 && ( - - )} ->>>>>>> 008cc7f1a... fix rtl in quote_indicator
); } diff --git a/app/views/statuses/_quote_status.html.haml b/app/views/statuses/_quote_status.html.haml deleted file mode 100644 index f2fc02258..000000000 --- a/app/views/statuses/_quote_status.html.haml +++ /dev/null @@ -1,35 +0,0 @@ -.status.quote-status{ dataurl: ActivityPub::TagManager.instance.url_for(status) } - = link_to ActivityPub::TagManager.instance.url_for(status.account), class: 'status__display-name u-url', target: stream_link_target, rel: 'noopener' do - .status__avatar - %div - = image_tag status.account.avatar_static_url, width: 18, height: 18, alt: '', class: 'u-photo account__avatar' - %span.display-name - %bdi - %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true) -   - %span.display-name__account - = acct(status.account) - = fa_icon('lock') if status.account.locked? - - .status__content.emojify< - - if status.spoiler_text? - %p{ :style => ('margin-bottom: 0' unless current_account&.user&.setting_expand_spoilers) }< - %span.p-summary> #{Formatter.instance.format_spoiler(status)}  - %button.status__content__spoiler-link= t('statuses.show_more') - .e-content{ lang: status.language, style: "display: #{!current_account&.user&.setting_expand_spoilers && status.spoiler_text? ? 'none' : 'block'}" } - = Formatter.instance.format_in_quote(status, custom_emojify: true) - - - if !status.media_attachments.empty? - - if status.media_attachments.first.video? - - video = status.media_attachments.first - = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 610, height: 343, inline: true, alt: video.description, quote: true do - = render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments } - - elsif status.media_attachments.first.audio? - - audio = status.media_attachments.first - = react_component :audio, src: audio.file.url(:original), height: 60, alt: audio.description, duration: audio.file.meta.dig(:original, :duration) do - = render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments } - - else - = react_component :media_gallery, height: 343, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }, quote: true do - = render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments } - - elsif status.preview_card - = react_component :card, maxDescription: 10, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json, quote: true