From 3d7f68c273f03497ff555acac70355ba1815f7a2 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 28 Sep 2018 02:11:14 +0200 Subject: Revert Font Awesome 5 upgrade (#8810) * Revert "Fix some icon names changed by the Font Awesome 5. (#8796)" This reverts commit 3f9ec3de82c1a3879a2b092672f51c1caca76f5c. * Revert "Migrate to font-awesome 5.0. (#8799)" This reverts commit 8bae14591bfb4fc9dd9d89d8082ac0123b03edaa. * Revert "Fix some icons names, unavailable in fontawesome5 (free license). (#8792)" This reverts commit b9c727a945fea5afffb3e3a53279164adfc6e88f. * Revert "Update the icon name changed by the Font Awesome 5. (#8776)" This reverts commit 17af4d27da484fc35ecd4b4dce2443d24aa35d23. * Revert "Add bot icon to bot avatars and migrate to newer version of Font Awesome (#8484)" This reverts commit 4b794e134d427dbc716606324adb9a885a74abec. --- app/javascript/mastodon/common.js | 3 +- .../__tests__/__snapshots__/avatar-test.js.snap | 12 ++----- .../mastodon/components/__tests__/avatar-test.js | 1 - .../mastodon/components/attachment_list.js | 4 +-- app/javascript/mastodon/components/avatar.js | 5 +-- app/javascript/mastodon/components/bot_icon.js | 23 ------------ .../mastodon/components/column_back_button.js | 2 +- .../mastodon/components/column_back_button_slim.js | 2 +- .../mastodon/components/column_header.js | 14 ++++---- app/javascript/mastodon/components/icon_button.js | 4 +-- app/javascript/mastodon/components/load_gap.js | 2 +- app/javascript/mastodon/components/status.js | 4 +-- .../mastodon/features/account/components/header.js | 8 ++--- .../account_timeline/components/moved_note.js | 2 +- .../features/compose/components/compose_form.js | 2 +- .../compose/components/privacy_dropdown.js | 2 +- .../mastodon/features/compose/components/search.js | 4 +-- .../features/compose/components/search_results.js | 8 ++--- .../mastodon/features/compose/components/upload.js | 4 +-- .../features/compose/components/upload_progress.js | 2 +- app/javascript/mastodon/features/compose/index.js | 14 ++++---- .../mastodon/features/getting_started/index.js | 4 +-- .../features/list_editor/components/search.js | 4 +-- .../mastodon/features/list_timeline/index.js | 4 +-- .../components/clear_column_button.js | 2 +- .../notifications/components/notification.js | 6 ++-- .../mastodon/features/pinned_statuses/index.js | 2 +- .../mastodon/features/status/components/card.js | 4 +-- .../features/status/components/detailed_status.js | 6 ++-- app/javascript/mastodon/features/status/index.js | 2 +- .../mastodon/features/ui/components/boost_modal.js | 2 +- .../features/ui/components/column_header.js | 2 +- .../mastodon/features/ui/components/column_link.js | 4 +-- .../features/ui/components/columns_area.js | 2 +- .../mastodon/features/ui/components/media_modal.js | 4 +-- .../features/ui/components/onboarding_modal.js | 4 +-- .../mastodon/features/ui/components/tabs_bar.js | 12 +++---- app/javascript/mastodon/features/video/index.js | 12 +++---- app/javascript/styles/mastodon/about.scss | 2 +- app/javascript/styles/mastodon/accounts.scss | 4 +-- app/javascript/styles/mastodon/admin.scss | 2 +- app/javascript/styles/mastodon/components.scss | 42 +++++++--------------- app/javascript/styles/mastodon/forms.scss | 2 +- app/javascript/styles/mastodon/rtl.scss | 6 ++-- app/javascript/styles/mastodon/tables.scss | 2 +- app/javascript/styles/mastodon/widgets.scss | 2 +- 46 files changed, 102 insertions(+), 158 deletions(-) delete mode 100644 app/javascript/mastodon/components/bot_icon.js (limited to 'app/javascript') diff --git a/app/javascript/mastodon/common.js b/app/javascript/mastodon/common.js index fdd3431ab..2b10b8c30 100644 --- a/app/javascript/mastodon/common.js +++ b/app/javascript/mastodon/common.js @@ -1,8 +1,7 @@ import Rails from 'rails-ujs'; export function start() { - require('@fortawesome/fontawesome-free/css/fontawesome.css'); - require('@fortawesome/fontawesome-free/css/solid.css'); + require('font-awesome/css/font-awesome.css'); require.context('../images/', true); Rails.start(); diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap index 1ab59836a..76ab3374a 100644 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap @@ -13,11 +13,7 @@ exports[` Autoplay renders a animated avatar 1`] = ` "width": "100px", } } -> - - +/> `; exports[` Still renders a still avatar 1`] = ` @@ -33,9 +29,5 @@ exports[` Still renders a still avatar 1`] = ` "width": "100px", } } -> - - +/> `; diff --git a/app/javascript/mastodon/components/__tests__/avatar-test.js b/app/javascript/mastodon/components/__tests__/avatar-test.js index cc99d3a53..dd3f7b7d2 100644 --- a/app/javascript/mastodon/components/__tests__/avatar-test.js +++ b/app/javascript/mastodon/components/__tests__/avatar-test.js @@ -10,7 +10,6 @@ describe('', () => { display_name: 'Alice', avatar: '/animated/alice.gif', avatar_static: '/static/alice.jpg', - bot: true, }); const size = 100; diff --git a/app/javascript/mastodon/components/attachment_list.js b/app/javascript/mastodon/components/attachment_list.js index 14e6cfc65..8e5bb0e0b 100644 --- a/app/javascript/mastodon/components/attachment_list.js +++ b/app/javascript/mastodon/components/attachment_list.js @@ -24,7 +24,7 @@ export default class AttachmentList extends ImmutablePureComponent { return (
  • - {filename(displayUrl)} + {filename(displayUrl)}
  • ); })} @@ -36,7 +36,7 @@ export default class AttachmentList extends ImmutablePureComponent { return (
    - +
      diff --git a/app/javascript/mastodon/components/avatar.js b/app/javascript/mastodon/components/avatar.js index e46f1ed76..570505833 100644 --- a/app/javascript/mastodon/components/avatar.js +++ b/app/javascript/mastodon/components/avatar.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import BotIcon from './bot_icon'; import { autoPlayGif } from '../initial_state'; export default class Avatar extends React.PureComponent { @@ -66,9 +65,7 @@ export default class Avatar extends React.PureComponent { onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave} style={style} - > - -
    + /> ); } diff --git a/app/javascript/mastodon/components/bot_icon.js b/app/javascript/mastodon/components/bot_icon.js deleted file mode 100644 index 4d824e762..000000000 --- a/app/javascript/mastodon/components/bot_icon.js +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import ImmutablePropTypes from 'react-immutable-proptypes'; -import ImmutablePureComponent from 'react-immutable-pure-component'; - -export default class BotIcon extends ImmutablePureComponent { - - static propTypes = { - account: ImmutablePropTypes.map.isRequired, - }; - - render () { - const { account } = this.props; - - if (account.get('bot')) { - return ( - - ); - } - - return ''; - } - -} diff --git a/app/javascript/mastodon/components/column_back_button.js b/app/javascript/mastodon/components/column_back_button.js index 2560e31ee..8a60c4192 100644 --- a/app/javascript/mastodon/components/column_back_button.js +++ b/app/javascript/mastodon/components/column_back_button.js @@ -19,7 +19,7 @@ export default class ColumnBackButton extends React.PureComponent { render () { return ( ); diff --git a/app/javascript/mastodon/components/column_back_button_slim.js b/app/javascript/mastodon/components/column_back_button_slim.js index a0d111aa7..964c100be 100644 --- a/app/javascript/mastodon/components/column_back_button_slim.js +++ b/app/javascript/mastodon/components/column_back_button_slim.js @@ -8,7 +8,7 @@ export default class ColumnBackButtonSlim extends ColumnBackButton { return (
    - +
    diff --git a/app/javascript/mastodon/components/column_header.js b/app/javascript/mastodon/components/column_header.js index 420ce3eef..457508d13 100644 --- a/app/javascript/mastodon/components/column_header.js +++ b/app/javascript/mastodon/components/column_header.js @@ -95,22 +95,22 @@ class ColumnHeader extends React.PureComponent { } if (multiColumn && pinned) { - pinButton = ; + pinButton = ; moveButtons = (
    - - + +
    ); } else if (multiColumn) { - pinButton = ; + pinButton = ; } if (!pinned && (multiColumn || showBackButton)) { backButton = ( ); @@ -126,7 +126,7 @@ class ColumnHeader extends React.PureComponent { } if (children || multiColumn) { - collapseButton = ; + collapseButton = ; } const hasTitle = icon && title; @@ -136,7 +136,7 @@ class ColumnHeader extends React.PureComponent {

    {hasTitle && ( )} diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js index a303064ff..b96e48fd0 100644 --- a/app/javascript/mastodon/components/icon_button.js +++ b/app/javascript/mastodon/components/icon_button.js @@ -86,7 +86,7 @@ export default class IconButton extends React.PureComponent { style={style} tabIndex={tabIndex} > -