From f2b307af25ca53f062f1a9e50dc1724b7550fd71 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 9 Sep 2019 15:16:08 +0200 Subject: Move “export” before decorators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As this is what upstream does. See also https://github.com/tc39/proposal-decorators/issues/69 --- .../flavours/glitch/features/ui/components/favourite_modal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours/glitch/features/ui/components/favourite_modal.js') diff --git a/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js b/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js index e0037a15f..b0bc7c409 100644 --- a/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js @@ -13,8 +13,8 @@ const messages = defineMessages({ favourite: { id: 'status.favourite', defaultMessage: 'Favourite' }, }); -@injectIntl -export default class FavouriteModal extends ImmutablePureComponent { +export default @injectIntl +class FavouriteModal extends ImmutablePureComponent { static contextTypes = { router: PropTypes.object, -- cgit From 2aa0cdf7e6c44f252ffbcc991a5391c31386058d Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 9 Sep 2019 16:41:41 +0200 Subject: Use the `Icon` component instead of directly using `i` tag --- .../flavours/glitch/components/attachment_list.js | 5 +++-- .../flavours/glitch/components/column_back_button.js | 3 ++- .../glitch/components/column_back_button_slim.js | 3 ++- .../flavours/glitch/components/column_header.js | 17 +++++++++-------- app/javascript/flavours/glitch/components/load_gap.js | 3 ++- .../glitch/components/notification_purge_buttons.js | 3 ++- .../flavours/glitch/components/status_content.js | 9 +++++---- .../flavours/glitch/components/status_icons.js | 18 ++++++++++++------ .../flavours/glitch/components/status_prepend.js | 8 ++++---- .../glitch/components/status_visibility_icon.js | 9 ++++++--- .../features/account_gallery/components/media_item.js | 5 +++-- .../features/account_timeline/components/moved_note.js | 3 ++- .../features/compose/components/search_results.js | 2 +- .../glitch/features/list_adder/components/list.js | 3 ++- .../glitch/features/list_editor/components/search.js | 5 +++-- .../flavours/glitch/features/list_timeline/index.js | 5 +++-- .../features/local_settings/navigation/item/index.js | 4 +++- .../notifications/components/clear_column_button.js | 3 ++- .../features/notifications/components/filter_bar.js | 11 ++++++----- .../glitch/features/notifications/components/follow.js | 3 ++- .../features/notifications/components/overlay.js | 3 ++- .../flavours/glitch/features/status/components/card.js | 7 ++++--- .../features/status/components/detailed_status.js | 11 ++++++----- .../flavours/glitch/features/status/index.js | 3 ++- .../glitch/features/ui/components/boost_modal.js | 3 ++- .../glitch/features/ui/components/column_header.js | 3 ++- .../glitch/features/ui/components/column_link.js | 7 ++++--- .../glitch/features/ui/components/columns_area.js | 3 ++- .../glitch/features/ui/components/favourite_modal.js | 3 ++- .../glitch/features/ui/components/media_modal.js | 5 +++-- .../flavours/glitch/features/ui/components/tabs_bar.js | 12 ++++++------ app/javascript/flavours/glitch/features/video/index.js | 13 +++++++------ 32 files changed, 116 insertions(+), 79 deletions(-) (limited to 'app/javascript/flavours/glitch/features/ui/components/favourite_modal.js') diff --git a/app/javascript/flavours/glitch/components/attachment_list.js b/app/javascript/flavours/glitch/components/attachment_list.js index 8e5bb0e0b..08124d980 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 82556d22e..a0260e5af 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 38afd3df3..b57e3a057 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 21371b7f8..3a064e90a 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 ed4d445d0..fe3f60a58 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 3d9e9b13b..3c7d67109 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 c34464fde..209350440 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 ? ( -