From 2aa0cdf7e6c44f252ffbcc991a5391c31386058d Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 9 Sep 2019 16:41:41 +0200 Subject: [PATCH] Use the `Icon` component instead of directly using `i` tag --- .../glitch/components/attachment_list.js | 5 +++-- .../glitch/components/column_back_button.js | 3 ++- .../components/column_back_button_slim.js | 3 ++- .../glitch/components/column_header.js | 17 +++++++++-------- .../flavours/glitch/components/load_gap.js | 3 ++- .../components/notification_purge_buttons.js | 3 ++- .../glitch/components/status_content.js | 9 +++++---- .../flavours/glitch/components/status_icons.js | 18 ++++++++++++------ .../glitch/components/status_prepend.js | 8 ++++---- .../components/status_visibility_icon.js | 9 ++++++--- .../account_gallery/components/media_item.js | 5 +++-- .../account_timeline/components/moved_note.js | 3 ++- .../compose/components/search_results.js | 2 +- .../features/list_adder/components/list.js | 3 ++- .../features/list_editor/components/search.js | 5 +++-- .../glitch/features/list_timeline/index.js | 5 +++-- .../local_settings/navigation/item/index.js | 4 +++- .../components/clear_column_button.js | 3 ++- .../notifications/components/filter_bar.js | 11 ++++++----- .../notifications/components/follow.js | 3 ++- .../notifications/components/overlay.js | 3 ++- .../glitch/features/status/components/card.js | 7 ++++--- .../status/components/detailed_status.js | 11 ++++++----- .../flavours/glitch/features/status/index.js | 3 ++- .../features/ui/components/boost_modal.js | 3 ++- .../features/ui/components/column_header.js | 3 ++- .../features/ui/components/column_link.js | 7 ++++--- .../features/ui/components/columns_area.js | 3 ++- .../features/ui/components/favourite_modal.js | 3 ++- .../features/ui/components/media_modal.js | 5 +++-- .../glitch/features/ui/components/tabs_bar.js | 12 ++++++------ .../flavours/glitch/features/video/index.js | 13 +++++++------ 32 files changed, 116 insertions(+), 79 deletions(-) diff --git a/app/javascript/flavours/glitch/components/attachment_list.js b/app/javascript/flavours/glitch/components/attachment_list.js index 8e5bb0e0be8..08124d98051 100644 --- a/app/javascript/flavours/glitch/components/attachment_list.js +++ b/app/javascript/flavours/glitch/components/attachment_list.js @@ -2,6 +2,7 @@ import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import Icon from 'flavours/glitch/components/icon'; const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; @@ -24,7 +25,7 @@ export default class AttachmentList extends ImmutablePureComponent { return (
  • - {filename(displayUrl)} + {filename(displayUrl)}
  • ); })} @@ -36,7 +37,7 @@ export default class AttachmentList extends ImmutablePureComponent { return (
    - +
      diff --git a/app/javascript/flavours/glitch/components/column_back_button.js b/app/javascript/flavours/glitch/components/column_back_button.js index 82556d22e53..a0260e5af7b 100644 --- a/app/javascript/flavours/glitch/components/column_back_button.js +++ b/app/javascript/flavours/glitch/components/column_back_button.js @@ -1,6 +1,7 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; +import Icon from 'flavours/glitch/components/icon'; export default class ColumnBackButton extends React.PureComponent { @@ -25,7 +26,7 @@ export default class ColumnBackButton extends React.PureComponent { render () { return ( ); diff --git a/app/javascript/flavours/glitch/components/column_back_button_slim.js b/app/javascript/flavours/glitch/components/column_back_button_slim.js index 38afd3df34e..b57e3a057bc 100644 --- a/app/javascript/flavours/glitch/components/column_back_button_slim.js +++ b/app/javascript/flavours/glitch/components/column_back_button_slim.js @@ -1,6 +1,7 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; +import Icon from 'mastodon/components/icon'; export default class ColumnBackButtonSlim extends React.PureComponent { @@ -26,7 +27,7 @@ export default class ColumnBackButtonSlim extends React.PureComponent { return (
      - +
      diff --git a/app/javascript/flavours/glitch/components/column_header.js b/app/javascript/flavours/glitch/components/column_header.js index 21371b7f83e..3a064e90ad3 100644 --- a/app/javascript/flavours/glitch/components/column_header.js +++ b/app/javascript/flavours/glitch/components/column_header.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; +import Icon from 'flavours/glitch/components/icon'; import NotificationPurgeButtonsContainer from 'flavours/glitch/containers/notification_purge_buttons_container'; @@ -148,22 +149,22 @@ class ColumnHeader extends React.PureComponent { } if (multiColumn && pinned) { - pinButton = ; + pinButton = ; moveButtons = (
      - - + +
      ); } else if (multiColumn) { - pinButton = ; + pinButton = ; } if (!pinned && (multiColumn || showBackButton)) { backButton = ( ); @@ -179,7 +180,7 @@ class ColumnHeader extends React.PureComponent { } if (children || multiColumn) { - collapseButton = ; + collapseButton = ; } const hasTitle = icon && title; @@ -189,7 +190,7 @@ class ColumnHeader extends React.PureComponent {

      {hasTitle && ( )} @@ -206,7 +207,7 @@ class ColumnHeader extends React.PureComponent { onClick={this.onEnterCleaningMode} className={notifCleaningButtonClassName} > - + ) : null} {collapseButton} diff --git a/app/javascript/flavours/glitch/components/load_gap.js b/app/javascript/flavours/glitch/components/load_gap.js index ed4d445d0d3..fe3f60a5859 100644 --- a/app/javascript/flavours/glitch/components/load_gap.js +++ b/app/javascript/flavours/glitch/components/load_gap.js @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { injectIntl, defineMessages } from 'react-intl'; +import Icon from 'flavours/glitch/components/icon'; const messages = defineMessages({ load_more: { id: 'status.load_more', defaultMessage: 'Load more' }, @@ -25,7 +26,7 @@ class LoadGap extends React.PureComponent { return ( ); } diff --git a/app/javascript/flavours/glitch/components/notification_purge_buttons.js b/app/javascript/flavours/glitch/components/notification_purge_buttons.js index 3d9e9b13b3a..3c7d67109d2 100644 --- a/app/javascript/flavours/glitch/components/notification_purge_buttons.js +++ b/app/javascript/flavours/glitch/components/notification_purge_buttons.js @@ -10,6 +10,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import Icon from 'flavours/glitch/components/icon'; const messages = defineMessages({ btnAll : { id: 'notification_purge.btn_all', defaultMessage: 'Select\nall' }, @@ -49,7 +50,7 @@ class NotificationPurgeButtons extends ImmutablePureComponent {

    ); diff --git a/app/javascript/flavours/glitch/components/status_content.js b/app/javascript/flavours/glitch/components/status_content.js index c34464fdee5..2093504402e 100644 --- a/app/javascript/flavours/glitch/components/status_content.js +++ b/app/javascript/flavours/glitch/components/status_content.js @@ -5,6 +5,7 @@ import { isRtl } from 'flavours/glitch/util/rtl'; import { FormattedMessage } from 'react-intl'; import Permalink from './permalink'; import classnames from 'classnames'; +import Icon from 'flavours/glitch/components/icon'; import { autoPlayGif } from 'flavours/glitch/util/initial_state'; import { decode as decodeIDNA } from 'flavours/glitch/util/idna'; @@ -289,10 +290,10 @@ export default class StatusContent extends React.PureComponent { key='0' />, mediaIcon ? ( -