{domain} }} />,
confirm: intl.formatMessage(messages.blockDomainConfirm),
onConfirm: () => dispatch(blockDomain(domain)),
}));
diff --git a/app/javascript/mastodon/containers/dropdown_menu_container.js b/app/javascript/mastodon/containers/dropdown_menu_container.js
index bedd1c63f4..5dd5273b27 100644
--- a/app/javascript/mastodon/containers/dropdown_menu_container.js
+++ b/app/javascript/mastodon/containers/dropdown_menu_container.js
@@ -1,7 +1,9 @@
-import { openDropdownMenu, closeDropdownMenu } from '../actions/dropdown_menu';
-import { fetchRelationships } from 'mastodon/actions/accounts';
-import { openModal, closeModal } from '../actions/modal';
import { connect } from 'react-redux';
+
+import { fetchRelationships } from 'mastodon/actions/accounts';
+
+import { openDropdownMenu, closeDropdownMenu } from '../actions/dropdown_menu';
+import { openModal, closeModal } from '../actions/modal';
import DropdownMenu from '../components/dropdown_menu';
import { isUserTouching } from '../is_mobile';
diff --git a/app/javascript/mastodon/containers/intersection_observer_article_container.js b/app/javascript/mastodon/containers/intersection_observer_article_container.js
index b6f162199a..8d9bda6704 100644
--- a/app/javascript/mastodon/containers/intersection_observer_article_container.js
+++ b/app/javascript/mastodon/containers/intersection_observer_article_container.js
@@ -1,6 +1,7 @@
import { connect } from 'react-redux';
-import IntersectionObserverArticle from '../components/intersection_observer_article';
+
import { setHeight } from '../actions/height_cache';
+import IntersectionObserverArticle from '../components/intersection_observer_article';
const makeMapStateToProps = (state, props) => ({
cachedHeight: state.getIn(['height_cache', props.saveHeightKey, props.id]),
diff --git a/app/javascript/mastodon/containers/mastodon.jsx b/app/javascript/mastodon/containers/mastodon.jsx
index 319425e3fc..5be163f5a4 100644
--- a/app/javascript/mastodon/containers/mastodon.jsx
+++ b/app/javascript/mastodon/containers/mastodon.jsx
@@ -1,18 +1,23 @@
import PropTypes from 'prop-types';
import { PureComponent } from 'react';
-import { Helmet } from 'react-helmet';
+
import { IntlProvider, addLocaleData } from 'react-intl';
-import { Provider as ReduxProvider } from 'react-redux';
+
+import { Helmet } from 'react-helmet';
import { BrowserRouter, Route } from 'react-router-dom';
+
+import { Provider as ReduxProvider } from 'react-redux';
+
import { ScrollContext } from 'react-router-scroll-4';
-import { store } from 'mastodon/store';
-import UI from 'mastodon/features/ui';
+
import { fetchCustomEmojis } from 'mastodon/actions/custom_emojis';
import { hydrateStore } from 'mastodon/actions/store';
import { connectUserStream } from 'mastodon/actions/streaming';
import ErrorBoundary from 'mastodon/components/error_boundary';
+import UI from 'mastodon/features/ui';
import initialState, { title as siteTitle } from 'mastodon/initial_state';
import { getLocale } from 'mastodon/locales';
+import { store } from 'mastodon/store';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
diff --git a/app/javascript/mastodon/containers/media_container.jsx b/app/javascript/mastodon/containers/media_container.jsx
index ede8641d65..7ed8f1719d 100644
--- a/app/javascript/mastodon/containers/media_container.jsx
+++ b/app/javascript/mastodon/containers/media_container.jsx
@@ -1,18 +1,21 @@
+import PropTypes from 'prop-types';
import { PureComponent } from 'react';
import { createPortal } from 'react-dom';
-import PropTypes from 'prop-types';
+
import { IntlProvider, addLocaleData } from 'react-intl';
+
import { fromJS } from 'immutable';
-import { getLocale } from 'mastodon/locales';
-import { getScrollbarWidth } from 'mastodon/utils/scrollbar';
-import MediaGallery from 'mastodon/components/media_gallery';
-import Poll from 'mastodon/components/poll';
+
import { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag';
+import MediaGallery from 'mastodon/components/media_gallery';
import ModalRoot from 'mastodon/components/modal_root';
+import Poll from 'mastodon/components/poll';
+import Audio from 'mastodon/features/audio';
+import Card from 'mastodon/features/status/components/card';
import MediaModal from 'mastodon/features/ui/components/media_modal';
import Video from 'mastodon/features/video';
-import Card from 'mastodon/features/status/components/card';
-import Audio from 'mastodon/features/audio';
+import { getLocale } from 'mastodon/locales';
+import { getScrollbarWidth } from 'mastodon/utils/scrollbar';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
diff --git a/app/javascript/mastodon/containers/poll_container.js b/app/javascript/mastodon/containers/poll_container.js
index f40ba8fac8..8482345431 100644
--- a/app/javascript/mastodon/containers/poll_container.js
+++ b/app/javascript/mastodon/containers/poll_container.js
@@ -1,8 +1,9 @@
import { connect } from 'react-redux';
+
import { debounce } from 'lodash';
-import Poll from 'mastodon/components/poll';
import { fetchPoll, vote } from 'mastodon/actions/polls';
+import Poll from 'mastodon/components/poll';
const mapDispatchToProps = (dispatch, { pollId }) => ({
refresh: debounce(
diff --git a/app/javascript/mastodon/containers/status_container.jsx b/app/javascript/mastodon/containers/status_container.jsx
index c9c6b631be..254c601878 100644
--- a/app/javascript/mastodon/containers/status_container.jsx
+++ b/app/javascript/mastodon/containers/status_container.jsx
@@ -1,11 +1,26 @@
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import { connect } from 'react-redux';
-import Status from '../components/status';
-import { makeGetStatus, makeGetPictureInPicture } from '../selectors';
+
+import {
+ unmuteAccount,
+ unblockAccount,
+} from '../actions/accounts';
+import { showAlertForError } from '../actions/alerts';
+import { initBlockModal } from '../actions/blocks';
+import { initBoostModal } from '../actions/boosts';
import {
replyCompose,
mentionCompose,
directCompose,
} from '../actions/compose';
+import {
+ blockDomain,
+ unblockDomain,
+} from '../actions/domain_blocks';
+import {
+ initAddFilter,
+} from '../actions/filters';
import {
reblog,
favourite,
@@ -18,6 +33,10 @@ import {
pin,
unpin,
} from '../actions/interactions';
+import { openModal } from '../actions/modal';
+import { initMuteModal } from '../actions/mutes';
+import { deployPictureInPicture } from '../actions/picture_in_picture';
+import { initReport } from '../actions/reports';
import {
muteStatus,
unmuteStatus,
@@ -29,26 +48,9 @@ import {
translateStatus,
undoStatusTranslation,
} from '../actions/statuses';
-import {
- unmuteAccount,
- unblockAccount,
-} from '../actions/accounts';
-import {
- blockDomain,
- unblockDomain,
-} from '../actions/domain_blocks';
-import {
- initAddFilter,
-} from '../actions/filters';
-import { initMuteModal } from '../actions/mutes';
-import { initBlockModal } from '../actions/blocks';
-import { initBoostModal } from '../actions/boosts';
-import { initReport } from '../actions/reports';
-import { openModal } from '../actions/modal';
-import { deployPictureInPicture } from '../actions/picture_in_picture';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import Status from '../components/status';
import { boostModal, deleteModal } from '../initial_state';
-import { showAlertForError } from '../actions/alerts';
+import { makeGetStatus, makeGetPictureInPicture } from '../selectors';
const messages = defineMessages({
deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
@@ -59,7 +61,7 @@ const messages = defineMessages({
replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },
editConfirm: { id: 'confirmations.edit.confirm', defaultMessage: 'Edit' },
editMessage: { id: 'confirmations.edit.message', defaultMessage: 'Editing now will overwrite the message you are currently composing. Are you sure you want to proceed?' },
- blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Hide entire domain' },
+ blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Block entire domain' },
});
const makeMapStateToProps = () => {
diff --git a/app/javascript/mastodon/features/about/index.jsx b/app/javascript/mastodon/features/about/index.jsx
index 0e34025a08..5d260c22d0 100644
--- a/app/javascript/mastodon/features/about/index.jsx
+++ b/app/javascript/mastodon/features/about/index.jsx
@@ -1,17 +1,21 @@
-import { PureComponent } from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
-import Column from 'mastodon/components/column';
-import LinkFooter from 'mastodon/features/ui/components/link_footer';
-import { Helmet } from 'react-helmet';
-import { fetchServer, fetchExtendedDescription, fetchDomainBlocks } from 'mastodon/actions/server';
-import Account from 'mastodon/containers/account_container';
-import { Skeleton } from 'mastodon/components/skeleton';
-import { Icon } from 'mastodon/components/icon';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import classNames from 'classnames';
+import { Helmet } from 'react-helmet';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { connect } from 'react-redux';
+
+import { fetchServer, fetchExtendedDescription, fetchDomainBlocks } from 'mastodon/actions/server';
+import Column from 'mastodon/components/column';
+import { Icon } from 'mastodon/components/icon';
import { ServerHeroImage } from 'mastodon/components/server_hero_image';
+import { Skeleton } from 'mastodon/components/skeleton';
+import Account from 'mastodon/containers/account_container';
+import LinkFooter from 'mastodon/features/ui/components/link_footer';
const messages = defineMessages({
title: { id: 'column.about', defaultMessage: 'About' },
diff --git a/app/javascript/mastodon/features/account/components/account_note.jsx b/app/javascript/mastodon/features/account/components/account_note.jsx
index 02746b4f02..bab523acf6 100644
--- a/app/javascript/mastodon/features/account/components/account_note.jsx
+++ b/app/javascript/mastodon/features/account/components/account_note.jsx
@@ -1,10 +1,13 @@
-import { PureComponent } from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import Textarea from 'react-textarea-autosize';
+
import { is } from 'immutable';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import Textarea from 'react-textarea-autosize';
const messages = defineMessages({
placeholder: { id: 'account_note.placeholder', defaultMessage: 'Click to add a note' },
diff --git a/app/javascript/mastodon/features/account/components/featured_tags.jsx b/app/javascript/mastodon/features/account/components/featured_tags.jsx
index ad903e2151..bdc7c0e1a2 100644
--- a/app/javascript/mastodon/features/account/components/featured_tags.jsx
+++ b/app/javascript/mastodon/features/account/components/featured_tags.jsx
@@ -1,7 +1,10 @@
import PropTypes from 'prop-types';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import Hashtag from 'mastodon/components/hashtag';
const messages = defineMessages({
diff --git a/app/javascript/mastodon/features/account/components/follow_request_note.jsx b/app/javascript/mastodon/features/account/components/follow_request_note.jsx
index beaed10ce9..3b69944330 100644
--- a/app/javascript/mastodon/features/account/components/follow_request_note.jsx
+++ b/app/javascript/mastodon/features/account/components/follow_request_note.jsx
@@ -1,6 +1,8 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { Icon } from 'mastodon/components/icon';
export default class FollowRequestNote extends ImmutablePureComponent {
diff --git a/app/javascript/mastodon/features/account/components/header.jsx b/app/javascript/mastodon/features/account/components/header.jsx
index c98cdf8947..9857d83991 100644
--- a/app/javascript/mastodon/features/account/components/header.jsx
+++ b/app/javascript/mastodon/features/account/components/header.jsx
@@ -1,21 +1,26 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import Button from 'mastodon/components/button';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { autoPlayGif, me, domain } from 'mastodon/initial_state';
+
import classNames from 'classnames';
+import { Helmet } from 'react-helmet';
+import { NavLink } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import { Avatar } from 'mastodon/components/avatar';
+import Button from 'mastodon/components/button';
+import { counterRenderer } from 'mastodon/components/common_counter';
import { Icon } from 'mastodon/components/icon';
import { IconButton } from 'mastodon/components/icon_button';
-import { Avatar } from 'mastodon/components/avatar';
-import { counterRenderer } from 'mastodon/components/common_counter';
import ShortNumber from 'mastodon/components/short_number';
-import { NavLink } from 'react-router-dom';
import DropdownMenuContainer from 'mastodon/containers/dropdown_menu_container';
+import { autoPlayGif, me, domain } from 'mastodon/initial_state';
+import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions';
+
import AccountNoteContainer from '../containers/account_note_container';
import FollowRequestNoteContainer from '../containers/follow_request_note_container';
-import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions';
-import { Helmet } from 'react-helmet';
const messages = defineMessages({
unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },
@@ -162,7 +167,6 @@ class Header extends ImmutablePureComponent {
const { account } = this.props;
navigator.share({
- text: `${titleFromAccount(account)}\n${account.get('note_plain')}`,
url: account.get('url'),
}).catch((e) => {
if (e.name !== 'AbortError') console.error(e);
diff --git a/app/javascript/mastodon/features/account/containers/account_note_container.js b/app/javascript/mastodon/features/account/containers/account_note_container.js
index 969af553a3..9fbe0671c0 100644
--- a/app/javascript/mastodon/features/account/containers/account_note_container.js
+++ b/app/javascript/mastodon/features/account/containers/account_note_container.js
@@ -1,5 +1,7 @@
import { connect } from 'react-redux';
+
import { submitAccountNote } from 'mastodon/actions/account_notes';
+
import AccountNote from '../components/account_note';
const mapStateToProps = (state, { account }) => ({
diff --git a/app/javascript/mastodon/features/account/containers/featured_tags_container.js b/app/javascript/mastodon/features/account/containers/featured_tags_container.js
index 7e206567fb..726c805f78 100644
--- a/app/javascript/mastodon/features/account/containers/featured_tags_container.js
+++ b/app/javascript/mastodon/features/account/containers/featured_tags_container.js
@@ -1,7 +1,9 @@
-import { connect } from 'react-redux';
-import FeaturedTags from '../components/featured_tags';
-import { makeGetAccount } from 'mastodon/selectors';
import { List as ImmutableList } from 'immutable';
+import { connect } from 'react-redux';
+
+import { makeGetAccount } from 'mastodon/selectors';
+
+import FeaturedTags from '../components/featured_tags';
const mapStateToProps = () => {
const getAccount = makeGetAccount();
diff --git a/app/javascript/mastodon/features/account/containers/follow_request_note_container.js b/app/javascript/mastodon/features/account/containers/follow_request_note_container.js
index c33c3de591..5855942931 100644
--- a/app/javascript/mastodon/features/account/containers/follow_request_note_container.js
+++ b/app/javascript/mastodon/features/account/containers/follow_request_note_container.js
@@ -1,7 +1,9 @@
import { connect } from 'react-redux';
-import FollowRequestNote from '../components/follow_request_note';
+
import { authorizeFollowRequest, rejectFollowRequest } from 'mastodon/actions/accounts';
+import FollowRequestNote from '../components/follow_request_note';
+
const mapDispatchToProps = (dispatch, { account }) => ({
onAuthorize () {
dispatch(authorizeFollowRequest(account.get('id')));
diff --git a/app/javascript/mastodon/features/account/navigation.jsx b/app/javascript/mastodon/features/account/navigation.jsx
index e1558addaf..ccebe9043a 100644
--- a/app/javascript/mastodon/features/account/navigation.jsx
+++ b/app/javascript/mastodon/features/account/navigation.jsx
@@ -1,6 +1,8 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { connect } from 'react-redux';
+
import FeaturedTags from 'mastodon/features/account/containers/featured_tags_container';
import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
diff --git a/app/javascript/mastodon/features/account_gallery/components/media_item.jsx b/app/javascript/mastodon/features/account_gallery/components/media_item.jsx
index ffbbe661e1..f60be5d54d 100644
--- a/app/javascript/mastodon/features/account_gallery/components/media_item.jsx
+++ b/app/javascript/mastodon/features/account_gallery/components/media_item.jsx
@@ -1,11 +1,14 @@
-import { Blurhash } from 'mastodon/components/blurhash';
-import classNames from 'classnames';
-import { Icon } from 'mastodon/components/icon';
-import { autoPlayGif, displayMedia, useBlurhash } from 'mastodon/initial_state';
import PropTypes from 'prop-types';
+
+import classNames from 'classnames';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+import { Blurhash } from 'mastodon/components/blurhash';
+import { Icon } from 'mastodon/components/icon';
+import { autoPlayGif, displayMedia, useBlurhash } from 'mastodon/initial_state';
+
export default class MediaItem extends ImmutablePureComponent {
static propTypes = {
diff --git a/app/javascript/mastodon/features/account_gallery/index.jsx b/app/javascript/mastodon/features/account_gallery/index.jsx
index 1d9954b668..16fb9ef577 100644
--- a/app/javascript/mastodon/features/account_gallery/index.jsx
+++ b/app/javascript/mastodon/features/account_gallery/index.jsx
@@ -1,21 +1,26 @@
-import { connect } from 'react-redux';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import { lookupAccount, fetchAccount } from 'mastodon/actions/accounts';
-import { expandAccountMediaTimeline } from '../../actions/timelines';
-import LoadingIndicator from 'mastodon/components/loading_indicator';
-import Column from '../ui/components/column';
-import ColumnBackButton from 'mastodon/components/column_back_button';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { getAccountGallery } from 'mastodon/selectors';
-import MediaItem from './components/media_item';
-import HeaderContainer from '../account_timeline/containers/header_container';
-import ScrollContainer from 'mastodon/containers/scroll_container';
-import LoadMore from 'mastodon/components/load_more';
-import { openModal } from 'mastodon/actions/modal';
+
import { FormattedMessage } from 'react-intl';
-import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { lookupAccount, fetchAccount } from 'mastodon/actions/accounts';
+import { openModal } from 'mastodon/actions/modal';
+import ColumnBackButton from 'mastodon/components/column_back_button';
+import LoadMore from 'mastodon/components/load_more';
+import LoadingIndicator from 'mastodon/components/loading_indicator';
+import ScrollContainer from 'mastodon/containers/scroll_container';
import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
+import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
+import { getAccountGallery } from 'mastodon/selectors';
+
+import { expandAccountMediaTimeline } from '../../actions/timelines';
+import HeaderContainer from '../account_timeline/containers/header_container';
+import Column from '../ui/components/column';
+
+import MediaItem from './components/media_item';
const mapStateToProps = (state, { params: { acct, id } }) => {
const accountId = id || state.getIn(['accounts_map', normalizeForLookup(acct)]);
diff --git a/app/javascript/mastodon/features/account_timeline/components/header.jsx b/app/javascript/mastodon/features/account_timeline/components/header.jsx
index a6bc462cea..b78dba1cc5 100644
--- a/app/javascript/mastodon/features/account_timeline/components/header.jsx
+++ b/app/javascript/mastodon/features/account_timeline/components/header.jsx
@@ -1,11 +1,16 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import InnerHeader from '../../account/components/header';
+
+import { FormattedMessage } from 'react-intl';
+
+import { NavLink } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import InnerHeader from '../../account/components/header';
+
import MemorialNote from './memorial_note';
import MovedNote from './moved_note';
-import { FormattedMessage } from 'react-intl';
-import { NavLink } from 'react-router-dom';
export default class Header extends ImmutablePureComponent {
diff --git a/app/javascript/mastodon/features/account_timeline/components/limited_account_hint.jsx b/app/javascript/mastodon/features/account_timeline/components/limited_account_hint.jsx
index ebe96d7db8..4872455e97 100644
--- a/app/javascript/mastodon/features/account_timeline/components/limited_account_hint.jsx
+++ b/app/javascript/mastodon/features/account_timeline/components/limited_account_hint.jsx
@@ -1,8 +1,11 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import { connect } from 'react-redux';
-import { revealAccount } from 'mastodon/actions/accounts';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
+
+import { connect } from 'react-redux';
+
+import { revealAccount } from 'mastodon/actions/accounts';
import Button from 'mastodon/components/button';
import { domain } from 'mastodon/initial_state';
diff --git a/app/javascript/mastodon/features/account_timeline/components/moved_note.jsx b/app/javascript/mastodon/features/account_timeline/components/moved_note.jsx
index 7c8da1c2f4..2c996ff769 100644
--- a/app/javascript/mastodon/features/account_timeline/components/moved_note.jsx
+++ b/app/javascript/mastodon/features/account_timeline/components/moved_note.jsx
@@ -1,9 +1,12 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
+
+import { Link } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { AvatarOverlay } from '../../../components/avatar_overlay';
import { DisplayName } from '../../../components/display_name';
-import { Link } from 'react-router-dom';
export default class MovedNote extends ImmutablePureComponent {
diff --git a/app/javascript/mastodon/features/account_timeline/containers/header_container.jsx b/app/javascript/mastodon/features/account_timeline/containers/header_container.jsx
index 3fa756ec88..b836f60f63 100644
--- a/app/javascript/mastodon/features/account_timeline/containers/header_container.jsx
+++ b/app/javascript/mastodon/features/account_timeline/containers/header_container.jsx
@@ -1,6 +1,9 @@
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import { connect } from 'react-redux';
-import { makeGetAccount, getAccountHidden } from '../../../selectors';
-import Header from '../components/header';
+
+import { openURL } from 'mastodon/actions/search';
+
import {
followAccount,
unfollowAccount,
@@ -9,23 +12,23 @@ import {
pinAccount,
unpinAccount,
} from '../../../actions/accounts';
-import { openURL } from 'mastodon/actions/search';
+import { initBlockModal } from '../../../actions/blocks';
import {
mentionCompose,
directCompose,
} from '../../../actions/compose';
-import { initMuteModal } from '../../../actions/mutes';
-import { initBlockModal } from '../../../actions/blocks';
-import { initReport } from '../../../actions/reports';
-import { openModal } from '../../../actions/modal';
import { blockDomain, unblockDomain } from '../../../actions/domain_blocks';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import { openModal } from '../../../actions/modal';
+import { initMuteModal } from '../../../actions/mutes';
+import { initReport } from '../../../actions/reports';
import { unfollowModal } from '../../../initial_state';
+import { makeGetAccount, getAccountHidden } from '../../../selectors';
+import Header from '../components/header';
const messages = defineMessages({
cancelFollowRequestConfirm: { id: 'confirmations.cancel_follow_request.confirm', defaultMessage: 'Withdraw request' },
unfollowConfirm: { id: 'confirmations.unfollow.confirm', defaultMessage: 'Unfollow' },
- blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Hide entire domain' },
+ blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Block entire domain' },
});
const makeMapStateToProps = () => {
diff --git a/app/javascript/mastodon/features/account_timeline/index.jsx b/app/javascript/mastodon/features/account_timeline/index.jsx
index 2576d48cf2..7bb0152ced 100644
--- a/app/javascript/mastodon/features/account_timeline/index.jsx
+++ b/app/javascript/mastodon/features/account_timeline/index.jsx
@@ -1,23 +1,28 @@
-import { connect } from 'react-redux';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import { lookupAccount, fetchAccount } from '../../actions/accounts';
-import { expandAccountFeaturedTimeline, expandAccountTimeline, connectTimeline, disconnectTimeline } from '../../actions/timelines';
-import StatusList from '../../components/status_list';
-import LoadingIndicator from '../../components/loading_indicator';
-import Column from '../ui/components/column';
-import HeaderContainer from './containers/header_container';
-import ColumnBackButton from '../../components/column_back_button';
-import { List as ImmutableList } from 'immutable';
-import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { FormattedMessage } from 'react-intl';
+
+import { List as ImmutableList } from 'immutable';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import { TimelineHint } from 'mastodon/components/timeline_hint';
-import { me } from 'mastodon/initial_state';
-import LimitedAccountHint from './components/limited_account_hint';
-import { getAccountHidden } from 'mastodon/selectors';
-import { fetchFeaturedTags } from '../../actions/featured_tags';
-import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
+import { me } from 'mastodon/initial_state';
+import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
+import { getAccountHidden } from 'mastodon/selectors';
+
+import { lookupAccount, fetchAccount } from '../../actions/accounts';
+import { fetchFeaturedTags } from '../../actions/featured_tags';
+import { expandAccountFeaturedTimeline, expandAccountTimeline, connectTimeline, disconnectTimeline } from '../../actions/timelines';
+import ColumnBackButton from '../../components/column_back_button';
+import LoadingIndicator from '../../components/loading_indicator';
+import StatusList from '../../components/status_list';
+import Column from '../ui/components/column';
+
+import LimitedAccountHint from './components/limited_account_hint';
+import HeaderContainer from './containers/header_container';
const emptyList = ImmutableList();
diff --git a/app/javascript/mastodon/features/audio/index.jsx b/app/javascript/mastodon/features/audio/index.jsx
index d81813cf0d..72e76413b8 100644
--- a/app/javascript/mastodon/features/audio/index.jsx
+++ b/app/javascript/mastodon/features/audio/index.jsx
@@ -1,15 +1,22 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
-import { formatTime, getPointerPosition, fileNameFromURL } from 'mastodon/features/video';
-import { Icon } from 'mastodon/components/icon';
+
import classNames from 'classnames';
-import { throttle, debounce } from 'lodash';
-import Visualizer from './visualizer';
-import { displayMedia, useBlurhash } from '../../initial_state';
-import { Blurhash } from '../../components/blurhash';
+
import { is } from 'immutable';
+import { throttle, debounce } from 'lodash';
+
+import { Icon } from 'mastodon/components/icon';
+import { formatTime, getPointerPosition, fileNameFromURL } from 'mastodon/features/video';
+
+import { Blurhash } from '../../components/blurhash';
+import { displayMedia, useBlurhash } from '../../initial_state';
+
+import Visualizer from './visualizer';
+
const messages = defineMessages({
play: { id: 'video.play', defaultMessage: 'Play' },
pause: { id: 'video.pause', defaultMessage: 'Pause' },
diff --git a/app/javascript/mastodon/features/blocks/index.jsx b/app/javascript/mastodon/features/blocks/index.jsx
index 088545bde9..66e42dc41c 100644
--- a/app/javascript/mastodon/features/blocks/index.jsx
+++ b/app/javascript/mastodon/features/blocks/index.jsx
@@ -1,15 +1,19 @@
-import { connect } from 'react-redux';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { debounce } from 'lodash';
import PropTypes from 'prop-types';
-import LoadingIndicator from '../../components/loading_indicator';
-import Column from '../ui/components/column';
-import ColumnBackButtonSlim from '../../components/column_back_button_slim';
-import AccountContainer from '../../containers/account_container';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { debounce } from 'lodash';
+
import { fetchBlocks, expandBlocks } from '../../actions/blocks';
+import ColumnBackButtonSlim from '../../components/column_back_button_slim';
+import LoadingIndicator from '../../components/loading_indicator';
import ScrollableList from '../../components/scrollable_list';
+import AccountContainer from '../../containers/account_container';
+import Column from '../ui/components/column';
const messages = defineMessages({
heading: { id: 'column.blocks', defaultMessage: 'Blocked users' },
diff --git a/app/javascript/mastodon/features/bookmarked_statuses/index.jsx b/app/javascript/mastodon/features/bookmarked_statuses/index.jsx
index 7a3ca39b74..795b859ce4 100644
--- a/app/javascript/mastodon/features/bookmarked_statuses/index.jsx
+++ b/app/javascript/mastodon/features/bookmarked_statuses/index.jsx
@@ -1,10 +1,15 @@
-import { debounce } from 'lodash';
import PropTypes from 'prop-types';
-import { Helmet } from 'react-helmet';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
+
+import { debounce } from 'lodash';
+
import { fetchBookmarkedStatuses, expandBookmarkedStatuses } from 'mastodon/actions/bookmarks';
import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns';
import ColumnHeader from 'mastodon/components/column_header';
diff --git a/app/javascript/mastodon/features/closed_registrations_modal/index.jsx b/app/javascript/mastodon/features/closed_registrations_modal/index.jsx
index 9ff167ecfc..89ced8029c 100644
--- a/app/javascript/mastodon/features/closed_registrations_modal/index.jsx
+++ b/app/javascript/mastodon/features/closed_registrations_modal/index.jsx
@@ -1,8 +1,10 @@
-import { connect } from 'react-redux';
import { FormattedMessage } from 'react-intl';
+
import ImmutablePureComponent from 'react-immutable-pure-component';
-import { domain } from 'mastodon/initial_state';
+import { connect } from 'react-redux';
+
import { fetchServer } from 'mastodon/actions/server';
+import { domain } from 'mastodon/initial_state';
const mapStateToProps = state => ({
message: state.getIn(['server', 'server', 'registrations', 'message']),
diff --git a/app/javascript/mastodon/features/community_timeline/components/column_settings.jsx b/app/javascript/mastodon/features/community_timeline/components/column_settings.jsx
index c71f301cb0..69959c1760 100644
--- a/app/javascript/mastodon/features/community_timeline/components/column_settings.jsx
+++ b/app/javascript/mastodon/features/community_timeline/components/column_settings.jsx
@@ -1,7 +1,10 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+import { PureComponent } from 'react';
+
import { injectIntl, FormattedMessage } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+
import SettingToggle from '../../notifications/components/setting_toggle';
class ColumnSettings extends PureComponent {
diff --git a/app/javascript/mastodon/features/community_timeline/containers/column_settings_container.js b/app/javascript/mastodon/features/community_timeline/containers/column_settings_container.js
index 405064c3fc..1e9f121394 100644
--- a/app/javascript/mastodon/features/community_timeline/containers/column_settings_container.js
+++ b/app/javascript/mastodon/features/community_timeline/containers/column_settings_container.js
@@ -1,7 +1,8 @@
import { connect } from 'react-redux';
-import ColumnSettings from '../components/column_settings';
-import { changeSetting } from '../../../actions/settings';
+
import { changeColumnParams } from '../../../actions/columns';
+import { changeSetting } from '../../../actions/settings';
+import ColumnSettings from '../components/column_settings';
const mapStateToProps = (state, { columnId }) => {
const uuid = columnId;
diff --git a/app/javascript/mastodon/features/community_timeline/index.jsx b/app/javascript/mastodon/features/community_timeline/index.jsx
index bdcefe73d0..a18da2f642 100644
--- a/app/javascript/mastodon/features/community_timeline/index.jsx
+++ b/app/javascript/mastodon/features/community_timeline/index.jsx
@@ -1,17 +1,23 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
-import StatusListContainer from '../ui/containers/status_list_container';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
+import { connect } from 'react-redux';
+
+import DismissableBanner from 'mastodon/components/dismissable_banner';
+import { domain } from 'mastodon/initial_state';
+
+import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import { connectCommunityStream } from '../../actions/streaming';
+import { expandCommunityTimeline } from '../../actions/timelines';
import Column from '../../components/column';
import ColumnHeader from '../../components/column_header';
-import { expandCommunityTimeline } from '../../actions/timelines';
-import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import StatusListContainer from '../ui/containers/status_list_container';
+
import ColumnSettingsContainer from './containers/column_settings_container';
-import { connectCommunityStream } from '../../actions/streaming';
-import { Helmet } from 'react-helmet';
-import { domain } from 'mastodon/initial_state';
-import DismissableBanner from 'mastodon/components/dismissable_banner';
const messages = defineMessages({
title: { id: 'column.community', defaultMessage: 'Local timeline' },
diff --git a/app/javascript/mastodon/features/compose/components/action_bar.jsx b/app/javascript/mastodon/features/compose/components/action_bar.jsx
index 241c72ee7c..08d98b6c4d 100644
--- a/app/javascript/mastodon/features/compose/components/action_bar.jsx
+++ b/app/javascript/mastodon/features/compose/components/action_bar.jsx
@@ -1,9 +1,12 @@
-import { PureComponent } from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl } from 'react-intl';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+
+import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
+
const messages = defineMessages({
edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' },
pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned posts' },
@@ -14,7 +17,7 @@ const messages = defineMessages({
lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },
followed_tags: { id: 'navigation_bar.followed_tags', defaultMessage: 'Followed hashtags' },
blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' },
- domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' },
+ domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Blocked domains' },
mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },
filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' },
antennas: { id: 'navigation_bar.antennas', defaultMessage: 'Antennas' },
diff --git a/app/javascript/mastodon/features/compose/components/autosuggest_account.jsx b/app/javascript/mastodon/features/compose/components/autosuggest_account.jsx
index 2231beb767..ebda0590e3 100644
--- a/app/javascript/mastodon/features/compose/components/autosuggest_account.jsx
+++ b/app/javascript/mastodon/features/compose/components/autosuggest_account.jsx
@@ -1,8 +1,9 @@
-import { Avatar } from '../../../components/avatar';
-import { DisplayName } from '../../../components/display_name';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+import { Avatar } from '../../../components/avatar';
+import { DisplayName } from '../../../components/display_name';
+
export default class AutosuggestAccount extends ImmutablePureComponent {
static propTypes = {
diff --git a/app/javascript/mastodon/features/compose/components/character_counter.jsx b/app/javascript/mastodon/features/compose/components/character_counter.jsx
index 15fc77bdcd..42452b30f6 100644
--- a/app/javascript/mastodon/features/compose/components/character_counter.jsx
+++ b/app/javascript/mastodon/features/compose/components/character_counter.jsx
@@ -1,5 +1,6 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { length } from 'stringz';
export default class CharacterCounter extends PureComponent {
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.jsx b/app/javascript/mastodon/features/compose/components/compose_form.jsx
index 92efd42665..cbd2803e83 100644
--- a/app/javascript/mastodon/features/compose/components/compose_form.jsx
+++ b/app/javascript/mastodon/features/compose/components/compose_form.jsx
@@ -1,28 +1,35 @@
-import CharacterCounter from './character_counter';
-import Button from '../../../components/button';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import ReplyIndicatorContainer from '../containers/reply_indicator_container';
-import AutosuggestTextarea from '../../../components/autosuggest_textarea';
-import AutosuggestInput from '../../../components/autosuggest_input';
-import PollButtonContainer from '../containers/poll_button_container';
-import UploadButtonContainer from '../containers/upload_button_container';
+
import { defineMessages, injectIntl } from 'react-intl';
-import SpoilerButtonContainer from '../containers/spoiler_button_container';
-import PrivacyDropdownContainer from '../containers/privacy_dropdown_container';
-import SearchabilityDropdownContainer from '../containers/searchability_dropdown_container';
-import ExpirationDropdownContainer from '../containers/expiration_dropdown_container';
+
+import classNames from 'classnames';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import { length } from 'stringz';
+
+import { Icon } from 'mastodon/components/icon';
+
+import AutosuggestInput from '../../../components/autosuggest_input';
+import AutosuggestTextarea from '../../../components/autosuggest_textarea';
+import Button from '../../../components/button';
import EmojiPickerDropdown from '../containers/emoji_picker_dropdown_container';
-import PollFormContainer from '../containers/poll_form_container';
-import UploadFormContainer from '../containers/upload_form_container';
-import WarningContainer from '../containers/warning_container';
+import ExpirationDropdownContainer from '../containers/expiration_dropdown_container';
import LanguageDropdown from '../containers/language_dropdown_container';
import MarkdownButtonContainer from '../containers/markdown_button_container';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { length } from 'stringz';
+import PollButtonContainer from '../containers/poll_button_container';
+import PollFormContainer from '../containers/poll_form_container';
+import PrivacyDropdownContainer from '../containers/privacy_dropdown_container';
+import ReplyIndicatorContainer from '../containers/reply_indicator_container';
+import SearchabilityDropdownContainer from '../containers/searchability_dropdown_container';
+import SpoilerButtonContainer from '../containers/spoiler_button_container';
+import UploadButtonContainer from '../containers/upload_button_container';
+import UploadFormContainer from '../containers/upload_form_container';
+import WarningContainer from '../containers/warning_container';
import { countableText } from '../util/counter';
-import { Icon } from 'mastodon/components/icon';
-import classNames from 'classnames';
+
+import CharacterCounter from './character_counter';
const allowedAroundShortCode = '><\u0085\u0020\u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\u0009\u000a\u000b\u000c\u000d';
diff --git a/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx b/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx
index ff3a1f3f36..04056f4cdf 100644
--- a/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx
+++ b/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx
@@ -1,14 +1,20 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components';
-import Overlay from 'react-overlays/Overlay';
+
import classNames from 'classnames';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+
import { supportsPassiveEvents } from 'detect-passive-events';
-import { buildCustomEmojis, categoriesFromEmojis } from '../../emoji/emoji';
+import Overlay from 'react-overlays/Overlay';
+
import { assetHost } from 'mastodon/utils/config';
+import { buildCustomEmojis, categoriesFromEmojis } from '../../emoji/emoji';
+import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components';
+
const messages = defineMessages({
emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' },
emoji_search: { id: 'emoji_button.search', defaultMessage: 'Search...' },
diff --git a/app/javascript/mastodon/features/compose/components/language_dropdown.jsx b/app/javascript/mastodon/features/compose/components/language_dropdown.jsx
index 639832c452..13d1c2e1a7 100644
--- a/app/javascript/mastodon/features/compose/components/language_dropdown.jsx
+++ b/app/javascript/mastodon/features/compose/components/language_dropdown.jsx
@@ -1,13 +1,18 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { injectIntl, defineMessages } from 'react-intl';
-import TextIconButton from './text_icon_button';
-import Overlay from 'react-overlays/Overlay';
-import { supportsPassiveEvents } from 'detect-passive-events';
+
import classNames from 'classnames';
+
+import { supportsPassiveEvents } from 'detect-passive-events';
+import fuzzysort from 'fuzzysort';
+import Overlay from 'react-overlays/Overlay';
+
import { languages as preloadedLanguages } from 'mastodon/initial_state';
import { loupeIcon, deleteIcon } from 'mastodon/utils/icons';
-import fuzzysort from 'fuzzysort';
+
+import TextIconButton from './text_icon_button';
const messages = defineMessages({
changeLanguage: { id: 'compose.language.change', defaultMessage: 'Change language' },
diff --git a/app/javascript/mastodon/features/compose/components/navigation_bar.jsx b/app/javascript/mastodon/features/compose/components/navigation_bar.jsx
index 3a2e535948..371bed905e 100644
--- a/app/javascript/mastodon/features/compose/components/navigation_bar.jsx
+++ b/app/javascript/mastodon/features/compose/components/navigation_bar.jsx
@@ -1,12 +1,17 @@
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ActionBar from './action_bar';
-import { Avatar } from '../../../components/avatar';
-import { Link } from 'react-router-dom';
-import { IconButton } from '../../../components/icon_button';
+
import { FormattedMessage } from 'react-intl';
+
+import { Link } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+import { Avatar } from '../../../components/avatar';
+import { IconButton } from '../../../components/icon_button';
+
+import ActionBar from './action_bar';
+
export default class NavigationBar extends ImmutablePureComponent {
static propTypes = {
diff --git a/app/javascript/mastodon/features/compose/components/poll_button.jsx b/app/javascript/mastodon/features/compose/components/poll_button.jsx
index 9c9a94629e..daf48ba410 100644
--- a/app/javascript/mastodon/features/compose/components/poll_button.jsx
+++ b/app/javascript/mastodon/features/compose/components/poll_button.jsx
@@ -1,8 +1,10 @@
-import { PureComponent } from 'react';
-import { IconButton } from '../../../components/icon_button';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl } from 'react-intl';
+import { IconButton } from '../../../components/icon_button';
+
const messages = defineMessages({
add_poll: { id: 'poll_button.add_poll', defaultMessage: 'Add a poll' },
remove_poll: { id: 'poll_button.remove_poll', defaultMessage: 'Remove poll' },
diff --git a/app/javascript/mastodon/features/compose/components/poll_form.jsx b/app/javascript/mastodon/features/compose/components/poll_form.jsx
index 7962fd2035..0d85d85cd8 100644
--- a/app/javascript/mastodon/features/compose/components/poll_form.jsx
+++ b/app/javascript/mastodon/features/compose/components/poll_form.jsx
@@ -1,12 +1,16 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import classNames from 'classnames';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import { IconButton } from 'mastodon/components/icon_button';
-import { Icon } from 'mastodon/components/icon';
+
import AutosuggestInput from 'mastodon/components/autosuggest_input';
-import classNames from 'classnames';
+import { Icon } from 'mastodon/components/icon';
+import { IconButton } from 'mastodon/components/icon_button';
const messages = defineMessages({
option_placeholder: { id: 'compose_form.poll.option_placeholder', defaultMessage: 'Choice {number}' },
diff --git a/app/javascript/mastodon/features/compose/components/privacy_dropdown.jsx b/app/javascript/mastodon/features/compose/components/privacy_dropdown.jsx
index 39f90a4787..15eab3399a 100644
--- a/app/javascript/mastodon/features/compose/components/privacy_dropdown.jsx
+++ b/app/javascript/mastodon/features/compose/components/privacy_dropdown.jsx
@@ -1,12 +1,17 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { injectIntl, defineMessages } from 'react-intl';
-import { IconButton } from '../../../components/icon_button';
-import Overlay from 'react-overlays/Overlay';
-import { supportsPassiveEvents } from 'detect-passive-events';
+
import classNames from 'classnames';
+
+import { supportsPassiveEvents } from 'detect-passive-events';
+import Overlay from 'react-overlays/Overlay';
+
import { Icon } from 'mastodon/components/icon';
+import { IconButton } from '../../../components/icon_button';
+
const messages = defineMessages({
public_short: { id: 'privacy.public.short', defaultMessage: 'Public' },
public_long: { id: 'privacy.public.long', defaultMessage: 'Visible for all' },
diff --git a/app/javascript/mastodon/features/compose/components/reply_indicator.jsx b/app/javascript/mastodon/features/compose/components/reply_indicator.jsx
index 8d65da62e0..187a99c58f 100644
--- a/app/javascript/mastodon/features/compose/components/reply_indicator.jsx
+++ b/app/javascript/mastodon/features/compose/components/reply_indicator.jsx
@@ -1,12 +1,16 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import { Avatar } from '../../../components/avatar';
-import { IconButton } from '../../../components/icon_button';
-import { DisplayName } from '../../../components/display_name';
+
import { defineMessages, injectIntl } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+
import AttachmentList from 'mastodon/components/attachment_list';
+import { Avatar } from '../../../components/avatar';
+import { DisplayName } from '../../../components/display_name';
+import { IconButton } from '../../../components/icon_button';
+
const messages = defineMessages({
cancel: { id: 'reply_indicator.cancel', defaultMessage: 'Cancel' },
});
diff --git a/app/javascript/mastodon/features/compose/components/search.jsx b/app/javascript/mastodon/features/compose/components/search.jsx
index 92a008e221..7badb0774f 100644
--- a/app/javascript/mastodon/features/compose/components/search.jsx
+++ b/app/javascript/mastodon/features/compose/components/search.jsx
@@ -1,10 +1,14 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import { searchEnabled } from 'mastodon/initial_state';
-import { Icon } from 'mastodon/components/icon';
+
import classNames from 'classnames';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+
+import { Icon } from 'mastodon/components/icon';
+import { searchEnabled } from 'mastodon/initial_state';
import { HASHTAG_REGEX } from 'mastodon/utils/hashtags';
const messages = defineMessages({
diff --git a/app/javascript/mastodon/features/compose/components/search_results.jsx b/app/javascript/mastodon/features/compose/components/search_results.jsx
index 21e53aba7f..a2f4113aec 100644
--- a/app/javascript/mastodon/features/compose/components/search_results.jsx
+++ b/app/javascript/mastodon/features/compose/components/search_results.jsx
@@ -1,13 +1,17 @@
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import { Icon } from 'mastodon/components/icon';
+import LoadMore from 'mastodon/components/load_more';
+
+import { ImmutableHashtag as Hashtag } from '../../../components/hashtag';
import AccountContainer from '../../../containers/account_container';
import StatusContainer from '../../../containers/status_container';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { ImmutableHashtag as Hashtag } from '../../../components/hashtag';
-import { Icon } from 'mastodon/components/icon';
import { searchEnabled } from '../../../initial_state';
-import LoadMore from 'mastodon/components/load_more';
const messages = defineMessages({
dismissSuggestion: { id: 'suggestions.dismiss', defaultMessage: 'Dismiss suggestion' },
diff --git a/app/javascript/mastodon/features/compose/components/text_icon_button.jsx b/app/javascript/mastodon/features/compose/components/text_icon_button.jsx
index 01bea732e7..46b5d7fada 100644
--- a/app/javascript/mastodon/features/compose/components/text_icon_button.jsx
+++ b/app/javascript/mastodon/features/compose/components/text_icon_button.jsx
@@ -1,5 +1,5 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
const iconStyle = {
height: null,
diff --git a/app/javascript/mastodon/features/compose/components/upload.jsx b/app/javascript/mastodon/features/compose/components/upload.jsx
index aeddd622d6..9075f20625 100644
--- a/app/javascript/mastodon/features/compose/components/upload.jsx
+++ b/app/javascript/mastodon/features/compose/components/upload.jsx
@@ -1,11 +1,16 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import Motion from '../../ui/util/optional_motion';
-import spring from 'react-motion/lib/spring';
-import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { FormattedMessage } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import spring from 'react-motion/lib/spring';
+
import { Icon } from 'mastodon/components/icon';
+import Motion from '../../ui/util/optional_motion';
+
export default class Upload extends ImmutablePureComponent {
static contextTypes = {
diff --git a/app/javascript/mastodon/features/compose/components/upload_button.jsx b/app/javascript/mastodon/features/compose/components/upload_button.jsx
index a89c7d9878..871bbe6903 100644
--- a/app/javascript/mastodon/features/compose/components/upload_button.jsx
+++ b/app/javascript/mastodon/features/compose/components/upload_button.jsx
@@ -1,9 +1,12 @@
-import { IconButton } from '../../../components/icon_button';
import PropTypes from 'prop-types';
+
import { defineMessages, injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
-import ImmutablePureComponent from 'react-immutable-pure-component';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { IconButton } from '../../../components/icon_button';
const messages = defineMessages({
upload: { id: 'upload_button.label', defaultMessage: 'Add images, a video or an audio file' },
diff --git a/app/javascript/mastodon/features/compose/components/upload_form.jsx b/app/javascript/mastodon/features/compose/components/upload_form.jsx
index bfa7282584..cf2e53ad90 100644
--- a/app/javascript/mastodon/features/compose/components/upload_form.jsx
+++ b/app/javascript/mastodon/features/compose/components/upload_form.jsx
@@ -1,8 +1,9 @@
import ImmutablePropTypes from 'react-immutable-proptypes';
-import UploadProgressContainer from '../containers/upload_progress_container';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import UploadContainer from '../containers/upload_container';
+
import SensitiveButtonContainer from '../containers/sensitive_button_container';
+import UploadContainer from '../containers/upload_container';
+import UploadProgressContainer from '../containers/upload_progress_container';
export default class UploadForm extends ImmutablePureComponent {
diff --git a/app/javascript/mastodon/features/compose/components/upload_progress.jsx b/app/javascript/mastodon/features/compose/components/upload_progress.jsx
index aa406b510a..d41827edfe 100644
--- a/app/javascript/mastodon/features/compose/components/upload_progress.jsx
+++ b/app/javascript/mastodon/features/compose/components/upload_progress.jsx
@@ -1,10 +1,14 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import Motion from '../../ui/util/optional_motion';
-import spring from 'react-motion/lib/spring';
-import { Icon } from 'mastodon/components/icon';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
+import spring from 'react-motion/lib/spring';
+
+import { Icon } from 'mastodon/components/icon';
+
+import Motion from '../../ui/util/optional_motion';
+
export default class UploadProgress extends PureComponent {
static propTypes = {
diff --git a/app/javascript/mastodon/features/compose/components/warning.jsx b/app/javascript/mastodon/features/compose/components/warning.jsx
index 4947a4e28b..c5babc30a5 100644
--- a/app/javascript/mastodon/features/compose/components/warning.jsx
+++ b/app/javascript/mastodon/features/compose/components/warning.jsx
@@ -1,8 +1,10 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import Motion from '../../ui/util/optional_motion';
+import { PureComponent } from 'react';
+
import spring from 'react-motion/lib/spring';
+import Motion from '../../ui/util/optional_motion';
+
export default class Warning extends PureComponent {
static propTypes = {
diff --git a/app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js b/app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js
index 4190e54cac..f86f01bd97 100644
--- a/app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js
+++ b/app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js
@@ -1,6 +1,7 @@
import { connect } from 'react-redux';
-import AutosuggestAccount from '../components/autosuggest_account';
+
import { makeGetAccount } from '../../../selectors';
+import AutosuggestAccount from '../components/autosuggest_account';
const makeMapStateToProps = () => {
const getAccount = makeGetAccount();
diff --git a/app/javascript/mastodon/features/compose/containers/compose_form_container.js b/app/javascript/mastodon/features/compose/containers/compose_form_container.js
index 8ae8923402..ad2ef481fb 100644
--- a/app/javascript/mastodon/features/compose/containers/compose_form_container.js
+++ b/app/javascript/mastodon/features/compose/containers/compose_form_container.js
@@ -1,5 +1,5 @@
import { connect } from 'react-redux';
-import ComposeForm from '../components/compose_form';
+
import {
changeCompose,
submitCompose,
@@ -11,6 +11,7 @@ import {
insertExpirationCompose,
uploadCompose,
} from '../../../actions/compose';
+import ComposeForm from '../components/compose_form';
const mapStateToProps = state => ({
text: state.getIn(['compose', 'text']),
diff --git a/app/javascript/mastodon/features/compose/containers/emoji_picker_dropdown_container.js b/app/javascript/mastodon/features/compose/containers/emoji_picker_dropdown_container.js
index 9d9a59c414..a0e50029df 100644
--- a/app/javascript/mastodon/features/compose/containers/emoji_picker_dropdown_container.js
+++ b/app/javascript/mastodon/features/compose/containers/emoji_picker_dropdown_container.js
@@ -1,9 +1,10 @@
-import { connect } from 'react-redux';
-import EmojiPickerDropdown from '../components/emoji_picker_dropdown';
-import { changeSetting } from '../../../actions/settings';
-import { createSelector } from 'reselect';
import { Map as ImmutableMap } from 'immutable';
+import { connect } from 'react-redux';
+import { createSelector } from 'reselect';
+
import { useEmoji } from '../../../actions/emojis';
+import { changeSetting } from '../../../actions/settings';
+import EmojiPickerDropdown from '../components/emoji_picker_dropdown';
const perLine = 8;
const lines = 2;
diff --git a/app/javascript/mastodon/features/compose/containers/language_dropdown_container.js b/app/javascript/mastodon/features/compose/containers/language_dropdown_container.js
index 5560fe6093..e1e2f04024 100644
--- a/app/javascript/mastodon/features/compose/containers/language_dropdown_container.js
+++ b/app/javascript/mastodon/features/compose/containers/language_dropdown_container.js
@@ -1,9 +1,11 @@
+import { Map as ImmutableMap } from 'immutable';
import { connect } from 'react-redux';
-import LanguageDropdown from '../components/language_dropdown';
+import { createSelector } from 'reselect';
+
import { changeComposeLanguage } from 'mastodon/actions/compose';
import { useLanguage } from 'mastodon/actions/languages';
-import { createSelector } from 'reselect';
-import { Map as ImmutableMap } from 'immutable';
+
+import LanguageDropdown from '../components/language_dropdown';
const getFrequentlyUsedLanguages = createSelector([
state => state.getIn(['settings', 'frequentlyUsedLanguages'], ImmutableMap()),
diff --git a/app/javascript/mastodon/features/compose/containers/navigation_container.js b/app/javascript/mastodon/features/compose/containers/navigation_container.js
index 654c14df9b..f881c4fa13 100644
--- a/app/javascript/mastodon/features/compose/containers/navigation_container.js
+++ b/app/javascript/mastodon/features/compose/containers/navigation_container.js
@@ -1,9 +1,12 @@
-import { connect } from 'react-redux';
import { defineMessages, injectIntl } from 'react-intl';
-import NavigationBar from '../components/navigation_bar';
-import { logOut } from 'mastodon/utils/log_out';
+
+import { connect } from 'react-redux';
+
import { openModal } from 'mastodon/actions/modal';
+import { logOut } from 'mastodon/utils/log_out';
+
import { me } from '../../../initial_state';
+import NavigationBar from '../components/navigation_bar';
const messages = defineMessages({
logoutMessage: { id: 'confirmations.logout.message', defaultMessage: 'Are you sure you want to log out?' },
diff --git a/app/javascript/mastodon/features/compose/containers/poll_button_container.js b/app/javascript/mastodon/features/compose/containers/poll_button_container.js
index a710ff0599..8437c684c7 100644
--- a/app/javascript/mastodon/features/compose/containers/poll_button_container.js
+++ b/app/javascript/mastodon/features/compose/containers/poll_button_container.js
@@ -1,6 +1,7 @@
import { connect } from 'react-redux';
-import PollButton from '../components/poll_button';
+
import { addPoll, removePoll } from '../../../actions/compose';
+import PollButton from '../components/poll_button';
const mapStateToProps = state => ({
unavailable: false,
diff --git a/app/javascript/mastodon/features/compose/containers/poll_form_container.js b/app/javascript/mastodon/features/compose/containers/poll_form_container.js
index 479117e915..177ffcea6a 100644
--- a/app/javascript/mastodon/features/compose/containers/poll_form_container.js
+++ b/app/javascript/mastodon/features/compose/containers/poll_form_container.js
@@ -1,5 +1,5 @@
import { connect } from 'react-redux';
-import PollForm from '../components/poll_form';
+
import {
addPollOption,
removePollOption,
@@ -9,6 +9,7 @@ import {
fetchComposeSuggestions,
selectComposeSuggestion,
} from '../../../actions/compose';
+import PollForm from '../components/poll_form';
const mapStateToProps = state => ({
suggestions: state.getIn(['compose', 'suggestions']),
diff --git a/app/javascript/mastodon/features/compose/containers/privacy_dropdown_container.js b/app/javascript/mastodon/features/compose/containers/privacy_dropdown_container.js
index e5bbb94da4..1ca3fe550a 100644
--- a/app/javascript/mastodon/features/compose/containers/privacy_dropdown_container.js
+++ b/app/javascript/mastodon/features/compose/containers/privacy_dropdown_container.js
@@ -1,8 +1,9 @@
import { connect } from 'react-redux';
-import PrivacyDropdown from '../components/privacy_dropdown';
+
import { changeComposeVisibility } from '../../../actions/compose';
import { openModal, closeModal } from '../../../actions/modal';
import { isUserTouching } from '../../../is_mobile';
+import PrivacyDropdown from '../components/privacy_dropdown';
const mapStateToProps = state => ({
value: state.getIn(['compose', 'privacy']),
diff --git a/app/javascript/mastodon/features/compose/containers/reply_indicator_container.js b/app/javascript/mastodon/features/compose/containers/reply_indicator_container.js
index a1302b2d4a..1147e448af 100644
--- a/app/javascript/mastodon/features/compose/containers/reply_indicator_container.js
+++ b/app/javascript/mastodon/features/compose/containers/reply_indicator_container.js
@@ -1,4 +1,5 @@
import { connect } from 'react-redux';
+
import { cancelReplyCompose } from '../../../actions/compose';
import { makeGetStatus } from '../../../selectors';
import ReplyIndicator from '../components/reply_indicator';
diff --git a/app/javascript/mastodon/features/compose/containers/search_container.js b/app/javascript/mastodon/features/compose/containers/search_container.js
index 3d2d728c8d..299a3887ed 100644
--- a/app/javascript/mastodon/features/compose/containers/search_container.js
+++ b/app/javascript/mastodon/features/compose/containers/search_container.js
@@ -1,4 +1,5 @@
import { connect } from 'react-redux';
+
import {
changeSearch,
clearSearch,
@@ -8,6 +9,7 @@ import {
clickSearchResult,
forgetSearchResult,
} from 'mastodon/actions/search';
+
import Search from '../components/search';
const mapStateToProps = state => ({
diff --git a/app/javascript/mastodon/features/compose/containers/search_results_container.js b/app/javascript/mastodon/features/compose/containers/search_results_container.js
index 1f714ff834..54c2af3177 100644
--- a/app/javascript/mastodon/features/compose/containers/search_results_container.js
+++ b/app/javascript/mastodon/features/compose/containers/search_results_container.js
@@ -1,7 +1,9 @@
import { connect } from 'react-redux';
-import SearchResults from '../components/search_results';
-import { fetchSuggestions, dismissSuggestion } from 'mastodon/actions/suggestions';
+
import { expandSearch } from 'mastodon/actions/search';
+import { fetchSuggestions, dismissSuggestion } from 'mastodon/actions/suggestions';
+
+import SearchResults from '../components/search_results';
const mapStateToProps = state => ({
results: state.getIn(['search', 'results']),
diff --git a/app/javascript/mastodon/features/compose/containers/sensitive_button_container.jsx b/app/javascript/mastodon/features/compose/containers/sensitive_button_container.jsx
index 4ad938eea9..18283ee98d 100644
--- a/app/javascript/mastodon/features/compose/containers/sensitive_button_container.jsx
+++ b/app/javascript/mastodon/features/compose/containers/sensitive_button_container.jsx
@@ -1,10 +1,14 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
-import classNames from 'classnames';
-import { changeComposeSensitivity } from 'mastodon/actions/compose';
+import { PureComponent } from 'react';
+
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
+import classNames from 'classnames';
+
+import { connect } from 'react-redux';
+
+import { changeComposeSensitivity } from 'mastodon/actions/compose';
+
const messages = defineMessages({
marked: {
id: 'compose_form.sensitive.marked',
diff --git a/app/javascript/mastodon/features/compose/containers/spoiler_button_container.js b/app/javascript/mastodon/features/compose/containers/spoiler_button_container.js
index 0b9dc8df3b..b3d7a71335 100644
--- a/app/javascript/mastodon/features/compose/containers/spoiler_button_container.js
+++ b/app/javascript/mastodon/features/compose/containers/spoiler_button_container.js
@@ -1,8 +1,10 @@
-import { connect } from 'react-redux';
-import TextIconButton from '../components/text_icon_button';
-import { changeComposeSpoilerness } from '../../../actions/compose';
import { injectIntl, defineMessages } from 'react-intl';
+import { connect } from 'react-redux';
+
+import { changeComposeSpoilerness } from '../../../actions/compose';
+import TextIconButton from '../components/text_icon_button';
+
const messages = defineMessages({
marked: { id: 'compose_form.spoiler.marked', defaultMessage: 'Text is hidden behind warning' },
unmarked: { id: 'compose_form.spoiler.unmarked', defaultMessage: 'Text is not hidden' },
diff --git a/app/javascript/mastodon/features/compose/containers/upload_button_container.js b/app/javascript/mastodon/features/compose/containers/upload_button_container.js
index f6d111e1a8..eeb7a0e38e 100644
--- a/app/javascript/mastodon/features/compose/containers/upload_button_container.js
+++ b/app/javascript/mastodon/features/compose/containers/upload_button_container.js
@@ -1,6 +1,7 @@
import { connect } from 'react-redux';
-import UploadButton from '../components/upload_button';
+
import { uploadCompose } from '../../../actions/compose';
+import UploadButton from '../components/upload_button';
const mapStateToProps = state => ({
disabled: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size + state.getIn(['compose', 'pending_media_attachments']) >= 4 || state.getIn(['compose', 'media_attachments']).some(m => ['video', 'audio'].includes(m.get('type')))),
diff --git a/app/javascript/mastodon/features/compose/containers/upload_container.js b/app/javascript/mastodon/features/compose/containers/upload_container.js
index 5a8a64931c..77bb90db87 100644
--- a/app/javascript/mastodon/features/compose/containers/upload_container.js
+++ b/app/javascript/mastodon/features/compose/containers/upload_container.js
@@ -1,6 +1,7 @@
import { connect } from 'react-redux';
-import Upload from '../components/upload';
+
import { undoUploadCompose, initMediaEditModal, submitCompose } from '../../../actions/compose';
+import Upload from '../components/upload';
const mapStateToProps = (state, { id }) => ({
media: state.getIn(['compose', 'media_attachments']).find(item => item.get('id') === id),
diff --git a/app/javascript/mastodon/features/compose/containers/upload_form_container.js b/app/javascript/mastodon/features/compose/containers/upload_form_container.js
index a6798bf512..336525cf53 100644
--- a/app/javascript/mastodon/features/compose/containers/upload_form_container.js
+++ b/app/javascript/mastodon/features/compose/containers/upload_form_container.js
@@ -1,4 +1,5 @@
import { connect } from 'react-redux';
+
import UploadForm from '../components/upload_form';
const mapStateToProps = state => ({
diff --git a/app/javascript/mastodon/features/compose/containers/upload_progress_container.js b/app/javascript/mastodon/features/compose/containers/upload_progress_container.js
index b18c76a43f..ffff321c3f 100644
--- a/app/javascript/mastodon/features/compose/containers/upload_progress_container.js
+++ b/app/javascript/mastodon/features/compose/containers/upload_progress_container.js
@@ -1,4 +1,5 @@
import { connect } from 'react-redux';
+
import UploadProgress from '../components/upload_progress';
const mapStateToProps = state => ({
diff --git a/app/javascript/mastodon/features/compose/containers/warning_container.jsx b/app/javascript/mastodon/features/compose/containers/warning_container.jsx
index 45f80b4bfa..082d50f6e2 100644
--- a/app/javascript/mastodon/features/compose/containers/warning_container.jsx
+++ b/app/javascript/mastodon/features/compose/containers/warning_container.jsx
@@ -1,10 +1,14 @@
-import { connect } from 'react-redux';
-import Warning from '../components/warning';
import PropTypes from 'prop-types';
+
import { FormattedMessage } from 'react-intl';
+
+import { connect } from 'react-redux';
+
import { me } from 'mastodon/initial_state';
import { HASHTAG_PATTERN_REGEX } from 'mastodon/utils/hashtags';
+import Warning from '../components/warning';
+
const mapStateToProps = state => ({
needsLockWarning: state.getIn(['compose', 'privacy']) === 'private' && !state.getIn(['accounts', me, 'locked']),
hashtagWarning: ['public', 'public_unlisted'].indexOf(state.getIn(['compose', 'privacy'])) < 0 && HASHTAG_PATTERN_REGEX.test(state.getIn(['compose', 'text'])),
diff --git a/app/javascript/mastodon/features/compose/index.jsx b/app/javascript/mastodon/features/compose/index.jsx
index a87f9b4d38..1923558862 100644
--- a/app/javascript/mastodon/features/compose/index.jsx
+++ b/app/javascript/mastodon/features/compose/index.jsx
@@ -1,24 +1,31 @@
-import { PureComponent } from 'react';
-import ComposeFormContainer from './containers/compose_form_container';
-import NavigationContainer from './containers/navigation_container';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { injectIntl, defineMessages } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+import { Link } from 'react-router-dom';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
-import { changeComposing, mountCompose, unmountCompose } from '../../actions/compose';
-import { Link } from 'react-router-dom';
-import { injectIntl, defineMessages } from 'react-intl';
-import SearchContainer from './containers/search_container';
-import Motion from '../ui/util/optional_motion';
+
import spring from 'react-motion/lib/spring';
-import SearchResultsContainer from './containers/search_results_container';
+
import { openModal } from 'mastodon/actions/modal';
-import elephantUIPlane from '../../../images/elephant_ui_plane.svg';
-import { mascot } from '../../initial_state';
+import Column from 'mastodon/components/column';
import { Icon } from 'mastodon/components/icon';
import { logOut } from 'mastodon/utils/log_out';
-import Column from 'mastodon/components/column';
-import { Helmet } from 'react-helmet';
+
+import elephantUIPlane from '../../../images/elephant_ui_plane.svg';
+import { changeComposing, mountCompose, unmountCompose } from '../../actions/compose';
+import { mascot } from '../../initial_state';
import { isMobile } from '../../is_mobile';
+import Motion from '../ui/util/optional_motion';
+
+import ComposeFormContainer from './containers/compose_form_container';
+import NavigationContainer from './containers/navigation_container';
+import SearchContainer from './containers/search_container';
+import SearchResultsContainer from './containers/search_results_container';
const messages = defineMessages({
start: { id: 'getting_started.heading', defaultMessage: 'Getting started' },
diff --git a/app/javascript/mastodon/features/compose/util/url_regex.js b/app/javascript/mastodon/features/compose/util/url_regex.js
index 9c2005c53d..887612ae30 100644
--- a/app/javascript/mastodon/features/compose/util/url_regex.js
+++ b/app/javascript/mastodon/features/compose/util/url_regex.js
@@ -1,8 +1,8 @@
import regexSupplant from 'twitter-text/dist/lib/regexSupplant';
-import validUrlPrecedingChars from 'twitter-text/dist/regexp/validUrlPrecedingChars';
import validDomain from 'twitter-text/dist/regexp/validDomain';
import validPortNumber from 'twitter-text/dist/regexp/validPortNumber';
import validUrlPath from 'twitter-text/dist/regexp/validUrlPath';
+import validUrlPrecedingChars from 'twitter-text/dist/regexp/validUrlPrecedingChars';
import validUrlQueryChars from 'twitter-text/dist/regexp/validUrlQueryChars';
import validUrlQueryEndingChars from 'twitter-text/dist/regexp/validUrlQueryEndingChars';
diff --git a/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx b/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx
index 0bd0006612..bf0a9da95a 100644
--- a/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx
+++ b/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx
@@ -1,17 +1,22 @@
import PropTypes from 'prop-types';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import classNames from 'classnames';
+import { Link } from 'react-router-dom';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import StatusContent from 'mastodon/components/status_content';
+
+import { HotKeys } from 'react-hotkeys';
+
import AttachmentList from 'mastodon/components/attachment_list';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import DropdownMenuContainer from 'mastodon/containers/dropdown_menu_container';
import AvatarComposite from 'mastodon/components/avatar_composite';
-import { Link } from 'react-router-dom';
import { IconButton } from 'mastodon/components/icon_button';
import { RelativeTimestamp } from 'mastodon/components/relative_timestamp';
-import { HotKeys } from 'react-hotkeys';
+import StatusContent from 'mastodon/components/status_content';
+import DropdownMenuContainer from 'mastodon/containers/dropdown_menu_container';
import { autoPlayGif } from 'mastodon/initial_state';
-import classNames from 'classnames';
const messages = defineMessages({
more: { id: 'status.more', defaultMessage: 'More' },
diff --git a/app/javascript/mastodon/features/direct_timeline/components/conversations_list.jsx b/app/javascript/mastodon/features/direct_timeline/components/conversations_list.jsx
index 6c9dde1e37..8c12ea9e5f 100644
--- a/app/javascript/mastodon/features/direct_timeline/components/conversations_list.jsx
+++ b/app/javascript/mastodon/features/direct_timeline/components/conversations_list.jsx
@@ -1,10 +1,13 @@
import PropTypes from 'prop-types';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import ConversationContainer from '../containers/conversation_container';
-import ScrollableList from '../../../components/scrollable_list';
+
import { debounce } from 'lodash';
+import ScrollableList from '../../../components/scrollable_list';
+import ConversationContainer from '../containers/conversation_container';
+
export default class ConversationsList extends ImmutablePureComponent {
static propTypes = {
diff --git a/app/javascript/mastodon/features/direct_timeline/containers/conversation_container.js b/app/javascript/mastodon/features/direct_timeline/containers/conversation_container.js
index 94cef81a7d..978c031aab 100644
--- a/app/javascript/mastodon/features/direct_timeline/containers/conversation_container.js
+++ b/app/javascript/mastodon/features/direct_timeline/containers/conversation_container.js
@@ -1,11 +1,14 @@
+import { defineMessages, injectIntl } from 'react-intl';
+
import { connect } from 'react-redux';
-import Conversation from '../components/conversation';
-import { markConversationRead, deleteConversation } from 'mastodon/actions/conversations';
-import { makeGetStatus } from 'mastodon/selectors';
+
import { replyCompose } from 'mastodon/actions/compose';
+import { markConversationRead, deleteConversation } from 'mastodon/actions/conversations';
import { openModal } from 'mastodon/actions/modal';
import { muteStatus, unmuteStatus, hideStatus, revealStatus } from 'mastodon/actions/statuses';
-import { defineMessages, injectIntl } from 'react-intl';
+import { makeGetStatus } from 'mastodon/selectors';
+
+import Conversation from '../components/conversation';
const messages = defineMessages({
replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },
diff --git a/app/javascript/mastodon/features/direct_timeline/containers/conversations_list_container.js b/app/javascript/mastodon/features/direct_timeline/containers/conversations_list_container.js
index 57e17d96f7..1dcd3ec1bd 100644
--- a/app/javascript/mastodon/features/direct_timeline/containers/conversations_list_container.js
+++ b/app/javascript/mastodon/features/direct_timeline/containers/conversations_list_container.js
@@ -1,6 +1,7 @@
import { connect } from 'react-redux';
-import ConversationsList from '../components/conversations_list';
+
import { expandConversations } from '../../../actions/conversations';
+import ConversationsList from '../components/conversations_list';
const mapStateToProps = state => ({
conversations: state.getIn(['conversations', 'items']),
diff --git a/app/javascript/mastodon/features/direct_timeline/index.jsx b/app/javascript/mastodon/features/direct_timeline/index.jsx
index f836b0ebe4..3e8d37526e 100644
--- a/app/javascript/mastodon/features/direct_timeline/index.jsx
+++ b/app/javascript/mastodon/features/direct_timeline/index.jsx
@@ -1,13 +1,18 @@
import PropTypes from 'prop-types';
import { PureComponent } from 'react';
-import { Helmet } from 'react-helmet';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
import { connect } from 'react-redux';
+
import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns';
import { mountConversations, unmountConversations, expandConversations } from 'mastodon/actions/conversations';
import { connectDirectStream } from 'mastodon/actions/streaming';
import Column from 'mastodon/components/column';
import ColumnHeader from 'mastodon/components/column_header';
+
import ConversationsListContainer from './containers/conversations_list_container';
const messages = defineMessages({
diff --git a/app/javascript/mastodon/features/directory/components/account_card.jsx b/app/javascript/mastodon/features/directory/components/account_card.jsx
index 96a6cfa308..87ddcf94f7 100644
--- a/app/javascript/mastodon/features/directory/components/account_card.jsx
+++ b/app/javascript/mastodon/features/directory/components/account_card.jsx
@@ -1,15 +1,14 @@
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import { connect } from 'react-redux';
-import { makeGetAccount } from 'mastodon/selectors';
-import { Avatar } from 'mastodon/components/avatar';
-import { DisplayName } from 'mastodon/components/display_name';
-import { Link } from 'react-router-dom';
-import Button from 'mastodon/components/button';
+
import { FormattedMessage, injectIntl, defineMessages } from 'react-intl';
-import { autoPlayGif, me, unfollowModal } from 'mastodon/initial_state';
-import ShortNumber from 'mastodon/components/short_number';
+
+import classNames from 'classnames';
+import { Link } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import {
followAccount,
unfollowAccount,
@@ -17,7 +16,12 @@ import {
unmuteAccount,
} from 'mastodon/actions/accounts';
import { openModal } from 'mastodon/actions/modal';
-import classNames from 'classnames';
+import { Avatar } from 'mastodon/components/avatar';
+import Button from 'mastodon/components/button';
+import { DisplayName } from 'mastodon/components/display_name';
+import ShortNumber from 'mastodon/components/short_number';
+import { autoPlayGif, me, unfollowModal } from 'mastodon/initial_state';
+import { makeGetAccount } from 'mastodon/selectors';
const messages = defineMessages({
unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },
diff --git a/app/javascript/mastodon/features/directory/index.jsx b/app/javascript/mastodon/features/directory/index.jsx
index c148937f88..d4854f1869 100644
--- a/app/javascript/mastodon/features/directory/index.jsx
+++ b/app/javascript/mastodon/features/directory/index.jsx
@@ -1,19 +1,24 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
-import { defineMessages, injectIntl } from 'react-intl';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
+import { List as ImmutableList } from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
-import Column from 'mastodon/components/column';
-import ColumnHeader from 'mastodon/components/column_header';
+import { connect } from 'react-redux';
+
import { addColumn, removeColumn, moveColumn, changeColumnParams } from 'mastodon/actions/columns';
import { fetchDirectory, expandDirectory } from 'mastodon/actions/directory';
-import { List as ImmutableList } from 'immutable';
-import AccountCard from './components/account_card';
-import { RadioButton } from 'mastodon/components/radio_button';
+import Column from 'mastodon/components/column';
+import ColumnHeader from 'mastodon/components/column_header';
import LoadMore from 'mastodon/components/load_more';
-import ScrollContainer from 'mastodon/containers/scroll_container';
import LoadingIndicator from 'mastodon/components/loading_indicator';
-import { Helmet } from 'react-helmet';
+import { RadioButton } from 'mastodon/components/radio_button';
+import ScrollContainer from 'mastodon/containers/scroll_container';
+
+import AccountCard from './components/account_card';
const messages = defineMessages({
title: { id: 'column.directory', defaultMessage: 'Browse profiles' },
diff --git a/app/javascript/mastodon/features/domain_blocks/index.jsx b/app/javascript/mastodon/features/domain_blocks/index.jsx
index 9189cb4d82..34f0afa2b7 100644
--- a/app/javascript/mastodon/features/domain_blocks/index.jsx
+++ b/app/javascript/mastodon/features/domain_blocks/index.jsx
@@ -1,17 +1,22 @@
-import { connect } from 'react-redux';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { debounce } from 'lodash';
-import LoadingIndicator from '../../components/loading_indicator';
-import Column from '../ui/components/column';
-import ColumnBackButtonSlim from '../../components/column_back_button_slim';
-import DomainContainer from '../../containers/domain_container';
-import { fetchDomainBlocks, expandDomainBlocks } from '../../actions/domain_blocks';
-import ScrollableList from '../../components/scrollable_list';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import { Helmet } from 'react-helmet';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { debounce } from 'lodash';
+
+import { fetchDomainBlocks, expandDomainBlocks } from '../../actions/domain_blocks';
+import ColumnBackButtonSlim from '../../components/column_back_button_slim';
+import LoadingIndicator from '../../components/loading_indicator';
+import ScrollableList from '../../components/scrollable_list';
+import DomainContainer from '../../containers/domain_container';
+import Column from '../ui/components/column';
+
const messages = defineMessages({
heading: { id: 'column.domain_blocks', defaultMessage: 'Blocked domains' },
unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unblock domain {domain}' },
diff --git a/app/javascript/mastodon/features/emoji/__tests__/emoji_index-test.js b/app/javascript/mastodon/features/emoji/__tests__/emoji_index-test.js
index 9df2d34a04..90ae0993d0 100644
--- a/app/javascript/mastodon/features/emoji/__tests__/emoji_index-test.js
+++ b/app/javascript/mastodon/features/emoji/__tests__/emoji_index-test.js
@@ -1,5 +1,6 @@
-import { pick } from 'lodash';
import { emojiIndex } from 'emoji-mart';
+import { pick } from 'lodash';
+
import { search } from '../emoji_mart_search_light';
const trimEmojis = emoji => pick(emoji, ['id', 'unified', 'native', 'custom']);
diff --git a/app/javascript/mastodon/features/emoji/emoji.js b/app/javascript/mastodon/features/emoji/emoji.js
index c442820804..6ec36ad05a 100644
--- a/app/javascript/mastodon/features/emoji/emoji.js
+++ b/app/javascript/mastodon/features/emoji/emoji.js
@@ -1,8 +1,11 @@
-import { autoPlayGif } from '../../initial_state';
-import unicodeMapping from './emoji_unicode_mapping_light';
-import { assetHost } from 'mastodon/utils/config';
import Trie from 'substring-trie';
+import { assetHost } from 'mastodon/utils/config';
+
+import { autoPlayGif } from '../../initial_state';
+
+import unicodeMapping from './emoji_unicode_mapping_light';
+
const trie = new Trie(Object.keys(unicodeMapping));
// Convert to file names from emojis. (For different variation selector emojis)
diff --git a/app/javascript/mastodon/features/emoji/emoji_compressed.js b/app/javascript/mastodon/features/emoji/emoji_compressed.js
index e1bee1655d..3d577e50f2 100644
--- a/app/javascript/mastodon/features/emoji/emoji_compressed.js
+++ b/app/javascript/mastodon/features/emoji/emoji_compressed.js
@@ -7,13 +7,14 @@
// It's designed to be emitted in an array format to take up less space
// over the wire.
-const { unicodeToFilename } = require('./unicode_to_filename');
-const { unicodeToUnifiedName } = require('./unicode_to_unified_name');
-const emojiMap = require('./emoji_map.json');
const { emojiIndex } = require('emoji-mart');
+let data = require('emoji-mart/data/all.json');
const { uncompress: emojiMartUncompress } = require('emoji-mart/dist/utils/data');
-let data = require('emoji-mart/data/all.json');
+const emojiMap = require('./emoji_map.json');
+const { unicodeToFilename } = require('./unicode_to_filename');
+const { unicodeToUnifiedName } = require('./unicode_to_unified_name');
+
if(data.compressed) {
data = emojiMartUncompress(data);
diff --git a/app/javascript/mastodon/features/emoji/emoji_mart_data_light.js b/app/javascript/mastodon/features/emoji/emoji_mart_data_light.js
index 000aeb0de4..11698937c0 100644
--- a/app/javascript/mastodon/features/emoji/emoji_mart_data_light.js
+++ b/app/javascript/mastodon/features/emoji/emoji_mart_data_light.js
@@ -1,8 +1,8 @@
// The output of this module is designed to mimic emoji-mart's
// "data" object, such that we can use it for a light version of emoji-mart's
// emojiIndex.search functionality.
-import { unicodeToUnifiedName } from './unicode_to_unified_name';
import emojiCompressed from './emoji_compressed';
+import { unicodeToUnifiedName } from './unicode_to_unified_name';
const [ shortCodesToEmojiData, skins, categories, short_names ] = emojiCompressed;
diff --git a/app/javascript/mastodon/features/emoji/emoji_picker.js b/app/javascript/mastodon/features/emoji/emoji_picker.js
index 044d38cb2b..8725d39ecd 100644
--- a/app/javascript/mastodon/features/emoji/emoji_picker.js
+++ b/app/javascript/mastodon/features/emoji/emoji_picker.js
@@ -1,5 +1,5 @@
-import Picker from 'emoji-mart/dist-es/components/picker/picker';
import Emoji from 'emoji-mart/dist-es/components/emoji/emoji';
+import Picker from 'emoji-mart/dist-es/components/picker/picker';
export {
Picker,
diff --git a/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js b/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js
index 30fbd9e349..3e3834580d 100644
--- a/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js
+++ b/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js
@@ -3,7 +3,6 @@
// as a "title" attribute in an HTML element (aka tooltip).
import emojiCompressed from './emoji_compressed';
-
import { unicodeToFilename } from './unicode_to_filename';
const [
diff --git a/app/javascript/mastodon/features/explore/components/story.jsx b/app/javascript/mastodon/features/explore/components/story.jsx
index e352cf0d33..0a9fbb1905 100644
--- a/app/javascript/mastodon/features/explore/components/story.jsx
+++ b/app/javascript/mastodon/features/explore/components/story.jsx
@@ -1,10 +1,12 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import classNames from 'classnames';
+
import { Blurhash } from 'mastodon/components/blurhash';
import { accountsCountRenderer } from 'mastodon/components/hashtag';
import ShortNumber from 'mastodon/components/short_number';
import { Skeleton } from 'mastodon/components/skeleton';
-import classNames from 'classnames';
export default class Story extends PureComponent {
diff --git a/app/javascript/mastodon/features/explore/index.jsx b/app/javascript/mastodon/features/explore/index.jsx
index f858ee572f..dbc0400e8e 100644
--- a/app/javascript/mastodon/features/explore/index.jsx
+++ b/app/javascript/mastodon/features/explore/index.jsx
@@ -1,18 +1,23 @@
-import { PureComponent } from 'react';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+import { NavLink, Switch, Route } from 'react-router-dom';
+
+import { connect } from 'react-redux';
+
import Column from 'mastodon/components/column';
import ColumnHeader from 'mastodon/components/column_header';
-import { NavLink, Switch, Route } from 'react-router-dom';
+import Search from 'mastodon/features/compose/containers/search_container';
+import { showTrends } from 'mastodon/initial_state';
+
import Links from './links';
-import Tags from './tags';
+import SearchResults from './results';
import Statuses from './statuses';
import Suggestions from './suggestions';
-import Search from 'mastodon/features/compose/containers/search_container';
-import SearchResults from './results';
-import { Helmet } from 'react-helmet';
-import { showTrends } from 'mastodon/initial_state';
+import Tags from './tags';
const messages = defineMessages({
title: { id: 'explore.title', defaultMessage: 'Explore' },
diff --git a/app/javascript/mastodon/features/explore/links.jsx b/app/javascript/mastodon/features/explore/links.jsx
index 5fa3a29853..fba9589931 100644
--- a/app/javascript/mastodon/features/explore/links.jsx
+++ b/app/javascript/mastodon/features/explore/links.jsx
@@ -1,12 +1,16 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import Story from './components/story';
-import LoadingIndicator from 'mastodon/components/loading_indicator';
-import { connect } from 'react-redux';
-import { fetchTrendingLinks } from 'mastodon/actions/trends';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { connect } from 'react-redux';
+
+import { fetchTrendingLinks } from 'mastodon/actions/trends';
import DismissableBanner from 'mastodon/components/dismissable_banner';
+import LoadingIndicator from 'mastodon/components/loading_indicator';
+
+import Story from './components/story';
const mapStateToProps = state => ({
links: state.getIn(['trends', 'links', 'items']),
diff --git a/app/javascript/mastodon/features/explore/results.jsx b/app/javascript/mastodon/features/explore/results.jsx
index 63e5da3b8a..6b053a9dc1 100644
--- a/app/javascript/mastodon/features/explore/results.jsx
+++ b/app/javascript/mastodon/features/explore/results.jsx
@@ -1,16 +1,20 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+import { PureComponent } from 'react';
+
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
-import { connect } from 'react-redux';
-import { expandSearch } from 'mastodon/actions/search';
-import Account from 'mastodon/containers/account_container';
-import Status from 'mastodon/containers/status_container';
-import { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag';
+
+import { Helmet } from 'react-helmet';
+
import { List as ImmutableList } from 'immutable';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { connect } from 'react-redux';
+
+import { expandSearch } from 'mastodon/actions/search';
+import { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag';
import LoadMore from 'mastodon/components/load_more';
import LoadingIndicator from 'mastodon/components/loading_indicator';
-import { Helmet } from 'react-helmet';
+import Account from 'mastodon/containers/account_container';
+import Status from 'mastodon/containers/status_container';
const messages = defineMessages({
title: { id: 'search_results.title', defaultMessage: 'Search for {q}' },
diff --git a/app/javascript/mastodon/features/explore/statuses.jsx b/app/javascript/mastodon/features/explore/statuses.jsx
index 1a606bb3b9..abacf333dd 100644
--- a/app/javascript/mastodon/features/explore/statuses.jsx
+++ b/app/javascript/mastodon/features/explore/statuses.jsx
@@ -1,12 +1,16 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import StatusList from 'mastodon/components/status_list';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
-import { fetchTrendingStatuses, expandTrendingStatuses } from 'mastodon/actions/trends';
+
import { debounce } from 'lodash';
+
+import { fetchTrendingStatuses, expandTrendingStatuses } from 'mastodon/actions/trends';
import DismissableBanner from 'mastodon/components/dismissable_banner';
+import StatusList from 'mastodon/components/status_list';
const mapStateToProps = state => ({
statusIds: state.getIn(['status_lists', 'trending', 'items']),
diff --git a/app/javascript/mastodon/features/explore/suggestions.jsx b/app/javascript/mastodon/features/explore/suggestions.jsx
index b7c15b4d25..bcb710f3ea 100644
--- a/app/javascript/mastodon/features/explore/suggestions.jsx
+++ b/app/javascript/mastodon/features/explore/suggestions.jsx
@@ -1,12 +1,15 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import AccountCard from 'mastodon/features/directory/components/account_card';
-import LoadingIndicator from 'mastodon/components/loading_indicator';
-import { connect } from 'react-redux';
-import { fetchSuggestions } from 'mastodon/actions/suggestions';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { connect } from 'react-redux';
+
+import { fetchSuggestions } from 'mastodon/actions/suggestions';
+import LoadingIndicator from 'mastodon/components/loading_indicator';
+import AccountCard from 'mastodon/features/directory/components/account_card';
+
const mapStateToProps = state => ({
suggestions: state.getIn(['suggestions', 'items']),
isLoading: state.getIn(['suggestions', 'isLoading']),
diff --git a/app/javascript/mastodon/features/explore/tags.jsx b/app/javascript/mastodon/features/explore/tags.jsx
index 607420b9d5..1859c62795 100644
--- a/app/javascript/mastodon/features/explore/tags.jsx
+++ b/app/javascript/mastodon/features/explore/tags.jsx
@@ -1,12 +1,15 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { FormattedMessage } from 'react-intl';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+import { connect } from 'react-redux';
+
+import { fetchTrendingHashtags } from 'mastodon/actions/trends';
+import DismissableBanner from 'mastodon/components/dismissable_banner';
import { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag';
import LoadingIndicator from 'mastodon/components/loading_indicator';
-import { connect } from 'react-redux';
-import { fetchTrendingHashtags } from 'mastodon/actions/trends';
-import { FormattedMessage } from 'react-intl';
-import DismissableBanner from 'mastodon/components/dismissable_banner';
const mapStateToProps = state => ({
hashtags: state.getIn(['trends', 'tags', 'items']),
diff --git a/app/javascript/mastodon/features/favourited_statuses/index.jsx b/app/javascript/mastodon/features/favourited_statuses/index.jsx
index 17369617f3..4902ddc28b 100644
--- a/app/javascript/mastodon/features/favourited_statuses/index.jsx
+++ b/app/javascript/mastodon/features/favourited_statuses/index.jsx
@@ -1,10 +1,15 @@
-import { debounce } from 'lodash';
import PropTypes from 'prop-types';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import { Helmet } from 'react-helmet';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
+
+import { debounce } from 'lodash';
+
import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns';
import { fetchFavouritedStatuses, expandFavouritedStatuses } from 'mastodon/actions/favourites';
import ColumnHeader from 'mastodon/components/column_header';
diff --git a/app/javascript/mastodon/features/favourites/index.jsx b/app/javascript/mastodon/features/favourites/index.jsx
index 85d8686d19..8ea137fd20 100644
--- a/app/javascript/mastodon/features/favourites/index.jsx
+++ b/app/javascript/mastodon/features/favourites/index.jsx
@@ -1,16 +1,20 @@
import PropTypes from 'prop-types';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
+
+import { fetchFavourites } from 'mastodon/actions/interactions';
import ColumnHeader from 'mastodon/components/column_header';
import { Icon } from 'mastodon/components/icon';
-import { fetchFavourites } from 'mastodon/actions/interactions';
import LoadingIndicator from 'mastodon/components/loading_indicator';
import ScrollableList from 'mastodon/components/scrollable_list';
import AccountContainer from 'mastodon/containers/account_container';
import Column from 'mastodon/features/ui/components/column';
-import { Helmet } from 'react-helmet';
const messages = defineMessages({
refresh: { id: 'refresh', defaultMessage: 'Refresh' },
diff --git a/app/javascript/mastodon/features/filters/added_to_filter.jsx b/app/javascript/mastodon/features/filters/added_to_filter.jsx
index aaf054ac75..ec848f622e 100644
--- a/app/javascript/mastodon/features/filters/added_to_filter.jsx
+++ b/app/javascript/mastodon/features/filters/added_to_filter.jsx
@@ -1,11 +1,14 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
-import { toServerSideType } from 'mastodon/utils/filters';
-import Button from 'mastodon/components/button';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
+import Button from 'mastodon/components/button';
+import { toServerSideType } from 'mastodon/utils/filters';
+
const mapStateToProps = (state, { filterId }) => ({
filter: state.getIn(['filters', filterId]),
});
diff --git a/app/javascript/mastodon/features/filters/select_filter.jsx b/app/javascript/mastodon/features/filters/select_filter.jsx
index fd367be2d4..79ada6f586 100644
--- a/app/javascript/mastodon/features/filters/select_filter.jsx
+++ b/app/javascript/mastodon/features/filters/select_filter.jsx
@@ -1,11 +1,15 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import { connect } from 'react-redux';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { connect } from 'react-redux';
+
+import fuzzysort from 'fuzzysort';
+
+import { Icon } from 'mastodon/components/icon';
import { toServerSideType } from 'mastodon/utils/filters';
import { loupeIcon, deleteIcon } from 'mastodon/utils/icons';
-import { Icon } from 'mastodon/components/icon';
-import fuzzysort from 'fuzzysort';
const messages = defineMessages({
search: { id: 'filter_modal.select_filter.search', defaultMessage: 'Search or create' },
diff --git a/app/javascript/mastodon/features/follow_requests/components/account_authorize.jsx b/app/javascript/mastodon/features/follow_requests/components/account_authorize.jsx
index 4cc46fb27f..9a2dc68bc3 100644
--- a/app/javascript/mastodon/features/follow_requests/components/account_authorize.jsx
+++ b/app/javascript/mastodon/features/follow_requests/components/account_authorize.jsx
@@ -1,11 +1,15 @@
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+
+import { defineMessages, injectIntl } from 'react-intl';
+
import { Link } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { Avatar } from '../../../components/avatar';
import { DisplayName } from '../../../components/display_name';
import { IconButton } from '../../../components/icon_button';
-import { defineMessages, injectIntl } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
const messages = defineMessages({
authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' },
diff --git a/app/javascript/mastodon/features/follow_requests/containers/account_authorize_container.js b/app/javascript/mastodon/features/follow_requests/containers/account_authorize_container.js
index 8db471f73d..c9c8dd7d87 100644
--- a/app/javascript/mastodon/features/follow_requests/containers/account_authorize_container.js
+++ b/app/javascript/mastodon/features/follow_requests/containers/account_authorize_container.js
@@ -1,7 +1,8 @@
import { connect } from 'react-redux';
+
+import { authorizeFollowRequest, rejectFollowRequest } from '../../../actions/accounts';
import { makeGetAccount } from '../../../selectors';
import AccountAuthorize from '../components/account_authorize';
-import { authorizeFollowRequest, rejectFollowRequest } from '../../../actions/accounts';
const makeMapStateToProps = () => {
const getAccount = makeGetAccount();
diff --git a/app/javascript/mastodon/features/follow_requests/index.jsx b/app/javascript/mastodon/features/follow_requests/index.jsx
index c592664618..796254e0ec 100644
--- a/app/javascript/mastodon/features/follow_requests/index.jsx
+++ b/app/javascript/mastodon/features/follow_requests/index.jsx
@@ -1,16 +1,22 @@
-import { connect } from 'react-redux';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import { debounce } from 'lodash';
-import Column from '../ui/components/column';
-import ColumnBackButtonSlim from '../../components/column_back_button_slim';
-import AccountAuthorizeContainer from './containers/account_authorize_container';
+
import { fetchFollowRequests, expandFollowRequests } from '../../actions/accounts';
+import ColumnBackButtonSlim from '../../components/column_back_button_slim';
import ScrollableList from '../../components/scrollable_list';
import { me } from '../../initial_state';
-import { Helmet } from 'react-helmet';
+import Column from '../ui/components/column';
+
+import AccountAuthorizeContainer from './containers/account_authorize_container';
const messages = defineMessages({
heading: { id: 'column.follow_requests', defaultMessage: 'Follow requests' },
diff --git a/app/javascript/mastodon/features/followed_tags/index.jsx b/app/javascript/mastodon/features/followed_tags/index.jsx
index e3bceed726..52414982a6 100644
--- a/app/javascript/mastodon/features/followed_tags/index.jsx
+++ b/app/javascript/mastodon/features/followed_tags/index.jsx
@@ -1,15 +1,20 @@
-import { debounce } from 'lodash';
import PropTypes from 'prop-types';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
+
+import { debounce } from 'lodash';
+
+import { expandFollowedHashtags, fetchFollowedHashtags } from 'mastodon/actions/tags';
import ColumnHeader from 'mastodon/components/column_header';
+import Hashtag from 'mastodon/components/hashtag';
import ScrollableList from 'mastodon/components/scrollable_list';
import Column from 'mastodon/features/ui/components/column';
-import { Helmet } from 'react-helmet';
-import Hashtag from 'mastodon/components/hashtag';
-import { expandFollowedHashtags, fetchFollowedHashtags } from 'mastodon/actions/tags';
const messages = defineMessages({
heading: { id: 'followed_tags', defaultMessage: 'Followed hashtags' },
diff --git a/app/javascript/mastodon/features/followers/index.jsx b/app/javascript/mastodon/features/followers/index.jsx
index bbf9cd71ee..c9a474ea2d 100644
--- a/app/javascript/mastodon/features/followers/index.jsx
+++ b/app/javascript/mastodon/features/followers/index.jsx
@@ -1,26 +1,31 @@
-import { connect } from 'react-redux';
-import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
+
+import { FormattedMessage } from 'react-intl';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import { debounce } from 'lodash';
-import LoadingIndicator from '../../components/loading_indicator';
+
+import { TimelineHint } from 'mastodon/components/timeline_hint';
+import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
+import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
+import { getAccountHidden } from 'mastodon/selectors';
+
import {
lookupAccount,
fetchAccount,
fetchFollowers,
expandFollowers,
} from '../../actions/accounts';
-import { FormattedMessage } from 'react-intl';
-import AccountContainer from '../../containers/account_container';
-import Column from '../ui/components/column';
-import HeaderContainer from '../account_timeline/containers/header_container';
import ColumnBackButton from '../../components/column_back_button';
+import LoadingIndicator from '../../components/loading_indicator';
import ScrollableList from '../../components/scrollable_list';
-import { TimelineHint } from 'mastodon/components/timeline_hint';
+import AccountContainer from '../../containers/account_container';
import LimitedAccountHint from '../account_timeline/components/limited_account_hint';
-import { getAccountHidden } from 'mastodon/selectors';
-import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
-import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
+import HeaderContainer from '../account_timeline/containers/header_container';
+import Column from '../ui/components/column';
const mapStateToProps = (state, { params: { acct, id } }) => {
const accountId = id || state.getIn(['accounts_map', normalizeForLookup(acct)]);
diff --git a/app/javascript/mastodon/features/following/index.jsx b/app/javascript/mastodon/features/following/index.jsx
index c1463c895a..7b203341ed 100644
--- a/app/javascript/mastodon/features/following/index.jsx
+++ b/app/javascript/mastodon/features/following/index.jsx
@@ -1,26 +1,31 @@
-import { connect } from 'react-redux';
-import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
+
+import { FormattedMessage } from 'react-intl';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import { debounce } from 'lodash';
-import LoadingIndicator from '../../components/loading_indicator';
+
+import { TimelineHint } from 'mastodon/components/timeline_hint';
+import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
+import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
+import { getAccountHidden } from 'mastodon/selectors';
+
import {
lookupAccount,
fetchAccount,
fetchFollowing,
expandFollowing,
} from '../../actions/accounts';
-import { FormattedMessage } from 'react-intl';
-import AccountContainer from '../../containers/account_container';
-import Column from '../ui/components/column';
-import HeaderContainer from '../account_timeline/containers/header_container';
import ColumnBackButton from '../../components/column_back_button';
+import LoadingIndicator from '../../components/loading_indicator';
import ScrollableList from '../../components/scrollable_list';
-import { TimelineHint } from 'mastodon/components/timeline_hint';
+import AccountContainer from '../../containers/account_container';
import LimitedAccountHint from '../account_timeline/components/limited_account_hint';
-import { getAccountHidden } from 'mastodon/selectors';
-import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
-import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
+import HeaderContainer from '../account_timeline/containers/header_container';
+import Column from '../ui/components/column';
const mapStateToProps = (state, { params: { acct, id } }) => {
const accountId = id || state.getIn(['accounts_map', normalizeForLookup(acct)]);
diff --git a/app/javascript/mastodon/features/getting_started/components/announcements.jsx b/app/javascript/mastodon/features/getting_started/components/announcements.jsx
index 44fc25d206..a53f9a90c4 100644
--- a/app/javascript/mastodon/features/getting_started/components/announcements.jsx
+++ b/app/javascript/mastodon/features/getting_started/components/announcements.jsx
@@ -1,19 +1,24 @@
-import { PureComponent } from 'react';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ReactSwipeableViews from 'react-swipeable-views';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import { IconButton } from 'mastodon/components/icon_button';
-import { Icon } from 'mastodon/components/icon';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl, FormattedMessage, FormattedDate } from 'react-intl';
-import { autoPlayGif, reduceMotion, disableSwiping, mascot } from 'mastodon/initial_state';
-import elephantUIPlane from 'mastodon/../images/elephant_ui_plane.svg';
-import unicodeMapping from 'mastodon/features/emoji/emoji_unicode_mapping_light';
+
import classNames from 'classnames';
-import EmojiPickerDropdown from 'mastodon/features/compose/containers/emoji_picker_dropdown_container';
-import { AnimatedNumber } from 'mastodon/components/animated_number';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
import TransitionMotion from 'react-motion/lib/TransitionMotion';
import spring from 'react-motion/lib/spring';
+import ReactSwipeableViews from 'react-swipeable-views';
+
+import elephantUIPlane from 'mastodon/../images/elephant_ui_plane.svg';
+import { AnimatedNumber } from 'mastodon/components/animated_number';
+import { Icon } from 'mastodon/components/icon';
+import { IconButton } from 'mastodon/components/icon_button';
+import EmojiPickerDropdown from 'mastodon/features/compose/containers/emoji_picker_dropdown_container';
+import unicodeMapping from 'mastodon/features/emoji/emoji_unicode_mapping_light';
+import { autoPlayGif, reduceMotion, disableSwiping, mascot } from 'mastodon/initial_state';
import { assetHost } from 'mastodon/utils/config';
const messages = defineMessages({
diff --git a/app/javascript/mastodon/features/getting_started/components/trends.jsx b/app/javascript/mastodon/features/getting_started/components/trends.jsx
index 59596b5546..5e1d31a87c 100644
--- a/app/javascript/mastodon/features/getting_started/components/trends.jsx
+++ b/app/javascript/mastodon/features/getting_started/components/trends.jsx
@@ -1,10 +1,14 @@
-import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag';
+
import { FormattedMessage } from 'react-intl';
+
import { Link } from 'react-router-dom';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag';
+
export default class Trends extends ImmutablePureComponent {
static defaultProps = {
diff --git a/app/javascript/mastodon/features/getting_started/containers/announcements_container.js b/app/javascript/mastodon/features/getting_started/containers/announcements_container.js
index 9d03ad6f78..c33e624324 100644
--- a/app/javascript/mastodon/features/getting_started/containers/announcements_container.js
+++ b/app/javascript/mastodon/features/getting_started/containers/announcements_container.js
@@ -1,8 +1,10 @@
-import { connect } from 'react-redux';
-import { addReaction, removeReaction, dismissAnnouncement } from 'mastodon/actions/announcements';
-import Announcements from '../components/announcements';
-import { createSelector } from 'reselect';
import { Map as ImmutableMap } from 'immutable';
+import { connect } from 'react-redux';
+import { createSelector } from 'reselect';
+
+import { addReaction, removeReaction, dismissAnnouncement } from 'mastodon/actions/announcements';
+
+import Announcements from '../components/announcements';
const customEmojiMap = createSelector([state => state.get('custom_emojis')], items => items.reduce((map, emoji) => map.set(emoji.get('shortcode'), emoji), ImmutableMap()));
diff --git a/app/javascript/mastodon/features/getting_started/containers/trends_container.js b/app/javascript/mastodon/features/getting_started/containers/trends_container.js
index a73832db75..82df526ff1 100644
--- a/app/javascript/mastodon/features/getting_started/containers/trends_container.js
+++ b/app/javascript/mastodon/features/getting_started/containers/trends_container.js
@@ -1,5 +1,7 @@
import { connect } from 'react-redux';
+
import { fetchTrendingHashtags } from 'mastodon/actions/trends';
+
import Trends from '../components/trends';
const mapStateToProps = state => ({
diff --git a/app/javascript/mastodon/features/getting_started/index.jsx b/app/javascript/mastodon/features/getting_started/index.jsx
index 69c4fb502f..e31ca79af1 100644
--- a/app/javascript/mastodon/features/getting_started/index.jsx
+++ b/app/javascript/mastodon/features/getting_started/index.jsx
@@ -1,19 +1,25 @@
-import Column from 'mastodon/components/column';
-import ColumnHeader from 'mastodon/components/column_header';
-import ColumnLink from '../ui/components/column_link';
-import ColumnSubheading from '../ui/components/column_subheading';
-import { defineMessages, injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
+
+import { defineMessages, injectIntl } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
+import { List as ImmutableList } from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import { me, showTrends } from '../../initial_state';
+import { connect } from 'react-redux';
+
import { fetchFollowRequests } from 'mastodon/actions/accounts';
-import { List as ImmutableList } from 'immutable';
-import NavigationContainer from '../compose/containers/navigation_container';
+import Column from 'mastodon/components/column';
+import ColumnHeader from 'mastodon/components/column_header';
import LinkFooter from 'mastodon/features/ui/components/link_footer';
+
+import { me, showTrends } from '../../initial_state';
+import NavigationContainer from '../compose/containers/navigation_container';
+import ColumnLink from '../ui/components/column_link';
+import ColumnSubheading from '../ui/components/column_subheading';
+
import TrendsContainer from './containers/trends_container';
-import { Helmet } from 'react-helmet';
const messages = defineMessages({
home_timeline: { id: 'tabs_bar.home', defaultMessage: 'Home' },
@@ -28,7 +34,7 @@ const messages = defineMessages({
follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' },
blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' },
- domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' },
+ domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Blocked domains' },
mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },
pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned posts' },
lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },
diff --git a/app/javascript/mastodon/features/hashtag_timeline/components/column_settings.jsx b/app/javascript/mastodon/features/hashtag_timeline/components/column_settings.jsx
index 528d4309fc..c60de4c518 100644
--- a/app/javascript/mastodon/features/hashtag_timeline/components/column_settings.jsx
+++ b/app/javascript/mastodon/features/hashtag_timeline/components/column_settings.jsx
@@ -1,10 +1,14 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import Toggle from 'react-toggle';
-import AsyncSelect from 'react-select/async';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+
import { NonceProvider } from 'react-select';
+import AsyncSelect from 'react-select/async';
+import Toggle from 'react-toggle';
+
import SettingToggle from '../../notifications/components/setting_toggle';
const messages = defineMessages({
diff --git a/app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js b/app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js
index a4f71f8a39..be95004cc7 100644
--- a/app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js
+++ b/app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js
@@ -1,7 +1,8 @@
import { connect } from 'react-redux';
-import ColumnSettings from '../components/column_settings';
+
import { changeColumnParams } from '../../../actions/columns';
import api from '../../../api';
+import ColumnSettings from '../components/column_settings';
const mapStateToProps = (state, { columnId }) => {
const columns = state.getIn(['settings', 'columns']);
diff --git a/app/javascript/mastodon/features/hashtag_timeline/index.jsx b/app/javascript/mastodon/features/hashtag_timeline/index.jsx
index 29507ee46f..b6ed29d8de 100644
--- a/app/javascript/mastodon/features/hashtag_timeline/index.jsx
+++ b/app/javascript/mastodon/features/hashtag_timeline/index.jsx
@@ -1,21 +1,28 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import StatusListContainer from '../ui/containers/status_list_container';
-import Column from 'mastodon/components/column';
-import ColumnHeader from 'mastodon/components/column_header';
-import ColumnSettingsContainer from './containers/column_settings_container';
-import { expandHashtagTimeline, clearTimeline } from 'mastodon/actions/timelines';
-import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns';
+import { PureComponent } from 'react';
+
import { injectIntl, FormattedMessage, defineMessages } from 'react-intl';
-import { connectHashtagStream } from 'mastodon/actions/streaming';
-import { isEqual } from 'lodash';
-import { fetchHashtag, followHashtag, unfollowHashtag } from 'mastodon/actions/tags';
-import { Icon } from 'mastodon/components/icon';
+
import classNames from 'classnames';
import { Helmet } from 'react-helmet';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { connect } from 'react-redux';
+
+import { isEqual } from 'lodash';
+
+import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns';
+import { connectHashtagStream } from 'mastodon/actions/streaming';
+import { fetchHashtag, followHashtag, unfollowHashtag } from 'mastodon/actions/tags';
+import { expandHashtagTimeline, clearTimeline } from 'mastodon/actions/timelines';
+import Column from 'mastodon/components/column';
+import ColumnHeader from 'mastodon/components/column_header';
+import { Icon } from 'mastodon/components/icon';
+
+import StatusListContainer from '../ui/containers/status_list_container';
+
+import ColumnSettingsContainer from './containers/column_settings_container';
+
const messages = defineMessages({
followHashtag: { id: 'hashtag.follow', defaultMessage: 'Follow hashtag' },
unfollowHashtag: { id: 'hashtag.unfollow', defaultMessage: 'Unfollow hashtag' },
diff --git a/app/javascript/mastodon/features/home_timeline/components/column_settings.jsx b/app/javascript/mastodon/features/home_timeline/components/column_settings.jsx
index d78918d6eb..b6e6b9cff6 100644
--- a/app/javascript/mastodon/features/home_timeline/components/column_settings.jsx
+++ b/app/javascript/mastodon/features/home_timeline/components/column_settings.jsx
@@ -1,7 +1,10 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+import { PureComponent } from 'react';
+
import { injectIntl, FormattedMessage } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+
import SettingToggle from '../../notifications/components/setting_toggle';
class ColumnSettings extends PureComponent {
diff --git a/app/javascript/mastodon/features/home_timeline/containers/column_settings_container.js b/app/javascript/mastodon/features/home_timeline/containers/column_settings_container.js
index fd8a392982..1ddec6da9c 100644
--- a/app/javascript/mastodon/features/home_timeline/containers/column_settings_container.js
+++ b/app/javascript/mastodon/features/home_timeline/containers/column_settings_container.js
@@ -1,6 +1,7 @@
import { connect } from 'react-redux';
-import ColumnSettings from '../components/column_settings';
+
import { changeSetting, saveSettings } from '../../../actions/settings';
+import ColumnSettings from '../components/column_settings';
const mapStateToProps = state => ({
settings: state.getIn(['settings', 'home']),
diff --git a/app/javascript/mastodon/features/home_timeline/index.jsx b/app/javascript/mastodon/features/home_timeline/index.jsx
index 9735699f94..c9fe078755 100644
--- a/app/javascript/mastodon/features/home_timeline/index.jsx
+++ b/app/javascript/mastodon/features/home_timeline/index.jsx
@@ -1,20 +1,26 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
-import { expandHomeTimeline } from '../../actions/timelines';
import PropTypes from 'prop-types';
-import StatusListContainer from '../ui/containers/status_list_container';
-import Column from '../../components/column';
-import ColumnHeader from '../../components/column_header';
-import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import ColumnSettingsContainer from './containers/column_settings_container';
-import { Link } from 'react-router-dom';
-import { fetchAnnouncements, toggleShowAnnouncements } from 'mastodon/actions/announcements';
-import AnnouncementsContainer from 'mastodon/features/getting_started/containers/announcements_container';
+
import classNames from 'classnames';
+import { Helmet } from 'react-helmet';
+import { Link } from 'react-router-dom';
+
+import { connect } from 'react-redux';
+
+import { fetchAnnouncements, toggleShowAnnouncements } from 'mastodon/actions/announcements';
import { IconWithBadge } from 'mastodon/components/icon_with_badge';
import { NotSignedInIndicator } from 'mastodon/components/not_signed_in_indicator';
-import { Helmet } from 'react-helmet';
+import AnnouncementsContainer from 'mastodon/features/getting_started/containers/announcements_container';
+
+import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import { expandHomeTimeline } from '../../actions/timelines';
+import Column from '../../components/column';
+import ColumnHeader from '../../components/column_header';
+import StatusListContainer from '../ui/containers/status_list_container';
+
+import ColumnSettingsContainer from './containers/column_settings_container';
const messages = defineMessages({
title: { id: 'column.home', defaultMessage: 'Home' },
diff --git a/app/javascript/mastodon/features/interaction_modal/index.jsx b/app/javascript/mastodon/features/interaction_modal/index.jsx
index b8965eea7a..1d26160753 100644
--- a/app/javascript/mastodon/features/interaction_modal/index.jsx
+++ b/app/javascript/mastodon/features/interaction_modal/index.jsx
@@ -1,14 +1,19 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
-import { registrationsOpen } from 'mastodon/initial_state';
-import { connect } from 'react-redux';
-import { Icon } from 'mastodon/components/icon';
+
import classNames from 'classnames';
+
+import { connect } from 'react-redux';
+
import { openModal, closeModal } from 'mastodon/actions/modal';
+import { Icon } from 'mastodon/components/icon';
+import { registrationsOpen } from 'mastodon/initial_state';
const mapStateToProps = (state, { accountId }) => ({
displayNameHtml: state.getIn(['accounts', accountId, 'display_name_html']),
+ signupUrl: state.getIn(['server', 'server', 'registrations', 'url'], '/auth/sign_up'),
});
const mapDispatchToProps = (dispatch) => ({
@@ -81,6 +86,7 @@ class InteractionModal extends PureComponent {
url: PropTypes.string,
type: PropTypes.oneOf(['reply', 'reblog', 'favourite', 'follow']),
onSignupClick: PropTypes.func.isRequired,
+ signupUrl: PropTypes.string.isRequired,
};
handleSignupClick = () => {
@@ -88,7 +94,7 @@ class InteractionModal extends PureComponent {
};
render () {
- const { url, type, displayNameHtml } = this.props;
+ const { url, type, displayNameHtml, signupUrl } = this.props;
const name = ;
@@ -126,7 +132,7 @@ class InteractionModal extends PureComponent {
if (registrationsOpen) {
signupButton = (
-
+
);
diff --git a/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx b/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx
index fc9b7100ec..ec117e5841 100644
--- a/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx
+++ b/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx
@@ -1,10 +1,14 @@
-import Column from 'mastodon/components/column';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ColumnHeader from 'mastodon/components/column_header';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import { Helmet } from 'react-helmet';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import Column from 'mastodon/components/column';
+import ColumnHeader from 'mastodon/components/column_header';
+
const messages = defineMessages({
heading: { id: 'keyboard_shortcuts.heading', defaultMessage: 'Keyboard Shortcuts' },
});
diff --git a/app/javascript/mastodon/features/list_adder/components/account.jsx b/app/javascript/mastodon/features/list_adder/components/account.jsx
index e2828f5ab3..31a2e96379 100644
--- a/app/javascript/mastodon/features/list_adder/components/account.jsx
+++ b/app/javascript/mastodon/features/list_adder/components/account.jsx
@@ -1,10 +1,12 @@
-import { connect } from 'react-redux';
-import { makeGetAccount } from '../../../selectors';
-import ImmutablePureComponent from 'react-immutable-pure-component';
+import { injectIntl } from 'react-intl';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import { Avatar } from '../../../components/avatar';
import { DisplayName } from '../../../components/display_name';
-import { injectIntl } from 'react-intl';
+import { makeGetAccount } from '../../../selectors';
const makeMapStateToProps = () => {
const getAccount = makeGetAccount();
diff --git a/app/javascript/mastodon/features/list_adder/components/list.jsx b/app/javascript/mastodon/features/list_adder/components/list.jsx
index d7f2a9f166..faade6f614 100644
--- a/app/javascript/mastodon/features/list_adder/components/list.jsx
+++ b/app/javascript/mastodon/features/list_adder/components/list.jsx
@@ -1,12 +1,16 @@
import PropTypes from 'prop-types';
-import { connect } from 'react-redux';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { IconButton } from '../../../components/icon_button';
+
import { defineMessages, injectIntl } from 'react-intl';
-import { removeFromListAdder, addToListAdder } from '../../../actions/lists';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import { Icon } from 'mastodon/components/icon';
+import { removeFromListAdder, addToListAdder } from '../../../actions/lists';
+import { IconButton } from '../../../components/icon_button';
+
const messages = defineMessages({
remove: { id: 'lists.account.remove', defaultMessage: 'Remove from list' },
add: { id: 'lists.account.add', defaultMessage: 'Add to list' },
diff --git a/app/javascript/mastodon/features/list_adder/index.jsx b/app/javascript/mastodon/features/list_adder/index.jsx
index 3ef29b212e..1ba9972e00 100644
--- a/app/javascript/mastodon/features/list_adder/index.jsx
+++ b/app/javascript/mastodon/features/list_adder/index.jsx
@@ -1,13 +1,17 @@
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { connect } from 'react-redux';
-import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { injectIntl } from 'react-intl';
-import { setupListAdder, resetListAdder } from '../../actions/lists';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
import { createSelector } from 'reselect';
-import List from './components/list';
-import Account from './components/account';
+
+import { setupListAdder, resetListAdder } from '../../actions/lists';
import NewListForm from '../lists/components/new_list_form';
+
+import Account from './components/account';
+import List from './components/list';
// hack
const getOrderedLists = createSelector([state => state.get('lists')], lists => {
diff --git a/app/javascript/mastodon/features/list_editor/components/account.jsx b/app/javascript/mastodon/features/list_editor/components/account.jsx
index 6ce59bc371..4618bd1c16 100644
--- a/app/javascript/mastodon/features/list_editor/components/account.jsx
+++ b/app/javascript/mastodon/features/list_editor/components/account.jsx
@@ -1,13 +1,16 @@
import PropTypes from 'prop-types';
-import { connect } from 'react-redux';
-import { makeGetAccount } from '../../../selectors';
-import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import { defineMessages, injectIntl } from 'react-intl';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { removeFromListEditor, addToListEditor } from '../../../actions/lists';
import { Avatar } from '../../../components/avatar';
import { DisplayName } from '../../../components/display_name';
import { IconButton } from '../../../components/icon_button';
-import { defineMessages, injectIntl } from 'react-intl';
-import { removeFromListEditor, addToListEditor } from '../../../actions/lists';
+import { makeGetAccount } from '../../../selectors';
const messages = defineMessages({
remove: { id: 'lists.account.remove', defaultMessage: 'Remove from list' },
diff --git a/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx b/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx
index 7153281085..9e087a97d7 100644
--- a/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx
+++ b/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx
@@ -1,9 +1,12 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl } from 'react-intl';
+
+import { connect } from 'react-redux';
+
import { changeListEditorTitle, submitListEditor } from '../../../actions/lists';
import { IconButton } from '../../../components/icon_button';
-import { defineMessages, injectIntl } from 'react-intl';
const messages = defineMessages({
title: { id: 'lists.edit.submit', defaultMessage: 'Change title' },
diff --git a/app/javascript/mastodon/features/list_editor/components/search.jsx b/app/javascript/mastodon/features/list_editor/components/search.jsx
index bc5cd136ff..021bc450ad 100644
--- a/app/javascript/mastodon/features/list_editor/components/search.jsx
+++ b/app/javascript/mastodon/features/list_editor/components/search.jsx
@@ -1,11 +1,16 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import { connect } from 'react-redux';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl } from 'react-intl';
-import { fetchListSuggestions, clearListSuggestions, changeListSuggestions } from '../../../actions/lists';
+
import classNames from 'classnames';
+
+import { connect } from 'react-redux';
+
import { Icon } from 'mastodon/components/icon';
+import { fetchListSuggestions, clearListSuggestions, changeListSuggestions } from '../../../actions/lists';
+
const messages = defineMessages({
search: { id: 'lists.search', defaultMessage: 'Search among people you follow' },
});
diff --git a/app/javascript/mastodon/features/list_editor/index.jsx b/app/javascript/mastodon/features/list_editor/index.jsx
index 3ed390c616..85e90169e8 100644
--- a/app/javascript/mastodon/features/list_editor/index.jsx
+++ b/app/javascript/mastodon/features/list_editor/index.jsx
@@ -1,15 +1,20 @@
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { connect } from 'react-redux';
-import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { injectIntl } from 'react-intl';
-import { setupListEditor, clearListSuggestions, resetListEditor } from '../../actions/lists';
-import Account from './components/account';
-import Search from './components/search';
-import EditListForm from './components/edit_list_form';
-import Motion from '../ui/util/optional_motion';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import spring from 'react-motion/lib/spring';
+import { setupListEditor, clearListSuggestions, resetListEditor } from '../../actions/lists';
+import Motion from '../ui/util/optional_motion';
+
+import Account from './components/account';
+import EditListForm from './components/edit_list_form';
+import Search from './components/search';
+
const mapStateToProps = state => ({
accountIds: state.getIn(['listEditor', 'accounts', 'items']),
searchAccountIds: state.getIn(['listEditor', 'suggestions', 'items']),
diff --git a/app/javascript/mastodon/features/list_timeline/index.jsx b/app/javascript/mastodon/features/list_timeline/index.jsx
index 86d6e3881b..1d80a9cd50 100644
--- a/app/javascript/mastodon/features/list_timeline/index.jsx
+++ b/app/javascript/mastodon/features/list_timeline/index.jsx
@@ -1,9 +1,13 @@
import PropTypes from 'prop-types';
import { PureComponent } from 'react';
-import { Helmet } from 'react-helmet';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
+
import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns';
import { fetchList, deleteList, updateList } from 'mastodon/actions/lists';
import { openModal } from 'mastodon/actions/modal';
@@ -14,8 +18,8 @@ import ColumnHeader from 'mastodon/components/column_header';
import { Icon } from 'mastodon/components/icon';
import LoadingIndicator from 'mastodon/components/loading_indicator';
import { RadioButton } from 'mastodon/components/radio_button';
-import StatusListContainer from 'mastodon/features/ui/containers/status_list_container';
import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
+import StatusListContainer from 'mastodon/features/ui/containers/status_list_container';
const messages = defineMessages({
deleteMessage: { id: 'confirmations.delete_list.message', defaultMessage: 'Are you sure you want to permanently delete this list?' },
diff --git a/app/javascript/mastodon/features/lists/components/new_list_form.jsx b/app/javascript/mastodon/features/lists/components/new_list_form.jsx
index cab1168265..40e2d4a1c2 100644
--- a/app/javascript/mastodon/features/lists/components/new_list_form.jsx
+++ b/app/javascript/mastodon/features/lists/components/new_list_form.jsx
@@ -1,9 +1,12 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl } from 'react-intl';
+
+import { connect } from 'react-redux';
+
import { changeListEditorTitle, submitListEditor } from 'mastodon/actions/lists';
import Button from 'mastodon/components/button';
-import { defineMessages, injectIntl } from 'react-intl';
const messages = defineMessages({
label: { id: 'lists.new.title_placeholder', defaultMessage: 'New list title' },
diff --git a/app/javascript/mastodon/features/lists/index.jsx b/app/javascript/mastodon/features/lists/index.jsx
index 6e741759d0..3bc2cd3a91 100644
--- a/app/javascript/mastodon/features/lists/index.jsx
+++ b/app/javascript/mastodon/features/lists/index.jsx
@@ -1,17 +1,22 @@
import PropTypes from 'prop-types';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import { Helmet } from 'react-helmet';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
+
import { fetchLists } from 'mastodon/actions/lists';
-import LoadingIndicator from 'mastodon/components/loading_indicator';
-import ScrollableList from 'mastodon/components/scrollable_list';
import Column from 'mastodon/components/column';
import ColumnHeader from 'mastodon/components/column_header';
+import LoadingIndicator from 'mastodon/components/loading_indicator';
+import ScrollableList from 'mastodon/components/scrollable_list';
import ColumnLink from 'mastodon/features/ui/components/column_link';
import ColumnSubheading from 'mastodon/features/ui/components/column_subheading';
+
import NewListForm from './components/new_list_form';
const messages = defineMessages({
diff --git a/app/javascript/mastodon/features/mutes/index.jsx b/app/javascript/mastodon/features/mutes/index.jsx
index e5c6fbbec9..1c74f34ead 100644
--- a/app/javascript/mastodon/features/mutes/index.jsx
+++ b/app/javascript/mastodon/features/mutes/index.jsx
@@ -1,17 +1,22 @@
-import { connect } from 'react-redux';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { debounce } from 'lodash';
-import LoadingIndicator from '../../components/loading_indicator';
-import Column from '../ui/components/column';
-import ColumnBackButtonSlim from '../../components/column_back_button_slim';
-import AccountContainer from '../../containers/account_container';
-import { fetchMutes, expandMutes } from '../../actions/mutes';
-import ScrollableList from '../../components/scrollable_list';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import { Helmet } from 'react-helmet';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { debounce } from 'lodash';
+
+import { fetchMutes, expandMutes } from '../../actions/mutes';
+import ColumnBackButtonSlim from '../../components/column_back_button_slim';
+import LoadingIndicator from '../../components/loading_indicator';
+import ScrollableList from '../../components/scrollable_list';
+import AccountContainer from '../../containers/account_container';
+import Column from '../ui/components/column';
+
const messages = defineMessages({
heading: { id: 'column.mutes', defaultMessage: 'Muted users' },
});
diff --git a/app/javascript/mastodon/features/notifications/components/clear_column_button.jsx b/app/javascript/mastodon/features/notifications/components/clear_column_button.jsx
index 342f6a3fb0..a1c0154418 100644
--- a/app/javascript/mastodon/features/notifications/components/clear_column_button.jsx
+++ b/app/javascript/mastodon/features/notifications/components/clear_column_button.jsx
@@ -1,6 +1,8 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
+
import { Icon } from 'mastodon/components/icon';
export default class ClearColumnButton extends PureComponent {
diff --git a/app/javascript/mastodon/features/notifications/components/column_settings.jsx b/app/javascript/mastodon/features/notifications/components/column_settings.jsx
index 83f5f2b3a0..0051f92ca7 100644
--- a/app/javascript/mastodon/features/notifications/components/column_settings.jsx
+++ b/app/javascript/mastodon/features/notifications/components/column_settings.jsx
@@ -1,11 +1,15 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+
+import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_REPORTS } from 'mastodon/permissions';
+
import ClearColumnButton from './clear_column_button';
import GrantPermissionButton from './grant_permission_button';
import SettingToggle from './setting_toggle';
-import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_REPORTS } from 'mastodon/permissions';
export default class ColumnSettings extends PureComponent {
diff --git a/app/javascript/mastodon/features/notifications/components/filter_bar.jsx b/app/javascript/mastodon/features/notifications/components/filter_bar.jsx
index 067bf19167..f8d5fbaa47 100644
--- a/app/javascript/mastodon/features/notifications/components/filter_bar.jsx
+++ b/app/javascript/mastodon/features/notifications/components/filter_bar.jsx
@@ -1,6 +1,8 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import { Icon } from 'mastodon/components/icon';
const tooltips = defineMessages({
diff --git a/app/javascript/mastodon/features/notifications/components/follow_request.jsx b/app/javascript/mastodon/features/notifications/components/follow_request.jsx
index 93dcf6d873..8a5c997c64 100644
--- a/app/javascript/mastodon/features/notifications/components/follow_request.jsx
+++ b/app/javascript/mastodon/features/notifications/components/follow_request.jsx
@@ -1,11 +1,15 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
+
+import { defineMessages, injectIntl } from 'react-intl';
+
+import { Link } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { Avatar } from 'mastodon/components/avatar';
import { DisplayName } from 'mastodon/components/display_name';
-import { Link } from 'react-router-dom';
import { IconButton } from 'mastodon/components/icon_button';
-import { defineMessages, injectIntl } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
const messages = defineMessages({
authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' },
diff --git a/app/javascript/mastodon/features/notifications/components/grant_permission_button.jsx b/app/javascript/mastodon/features/notifications/components/grant_permission_button.jsx
index 96f5d67d9c..cd46d878bb 100644
--- a/app/javascript/mastodon/features/notifications/components/grant_permission_button.jsx
+++ b/app/javascript/mastodon/features/notifications/components/grant_permission_button.jsx
@@ -1,5 +1,6 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
export default class GrantPermissionButton extends PureComponent {
diff --git a/app/javascript/mastodon/features/notifications/components/notification.jsx b/app/javascript/mastodon/features/notifications/components/notification.jsx
index 47be9ed364..6bc5d8e5be 100644
--- a/app/javascript/mastodon/features/notifications/components/notification.jsx
+++ b/app/javascript/mastodon/features/notifications/components/notification.jsx
@@ -1,17 +1,24 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { injectIntl, FormattedMessage, defineMessages } from 'react-intl';
-import { HotKeys } from 'react-hotkeys';
import PropTypes from 'prop-types';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { me } from 'mastodon/initial_state';
-import StatusContainer from 'mastodon/containers/status_container';
-import AccountContainer from 'mastodon/containers/account_container';
-import Report from './report';
-import FollowRequestContainer from '../containers/follow_request_container';
-import { Icon } from 'mastodon/components/icon';
-import { Link } from 'react-router-dom';
+
+import { injectIntl, FormattedMessage, defineMessages } from 'react-intl';
+
import classNames from 'classnames';
-import EmojiView from '../../../components/emoji_view';
+import { Link } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import { HotKeys } from 'react-hotkeys';
+
+import EmojiView from 'mastodon/components/emoji_view';
+import { Icon } from 'mastodon/components/icon';
+import AccountContainer from 'mastodon/containers/account_container';
+import StatusContainer from 'mastodon/containers/status_container';
+import { me } from 'mastodon/initial_state';
+
+import FollowRequestContainer from '../containers/follow_request_container';
+
+import Report from './report';
const messages = defineMessages({
favourite: { id: 'notification.favourite', defaultMessage: '{name} favourited your status' },
diff --git a/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx b/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx
index d42b350b71..59b0335c10 100644
--- a/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx
+++ b/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx
@@ -1,12 +1,15 @@
+import PropTypes from 'prop-types';
import { PureComponent } from 'react';
-import { Icon } from 'mastodon/components/icon';
-import Button from 'mastodon/components/button';
-import { IconButton } from 'mastodon/components/icon_button';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { connect } from 'react-redux';
+
import { requestBrowserPermission } from 'mastodon/actions/notifications';
import { changeSetting } from 'mastodon/actions/settings';
-import { connect } from 'react-redux';
-import PropTypes from 'prop-types';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import Button from 'mastodon/components/button';
+import { Icon } from 'mastodon/components/icon';
+import { IconButton } from 'mastodon/components/icon_button';
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
diff --git a/app/javascript/mastodon/features/notifications/components/report.jsx b/app/javascript/mastodon/features/notifications/components/report.jsx
index 4f133cc03a..90412aa3bb 100644
--- a/app/javascript/mastodon/features/notifications/components/report.jsx
+++ b/app/javascript/mastodon/features/notifications/components/report.jsx
@@ -1,7 +1,10 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
+
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { AvatarOverlay } from 'mastodon/components/avatar_overlay';
import { RelativeTimestamp } from 'mastodon/components/relative_timestamp';
diff --git a/app/javascript/mastodon/features/notifications/components/setting_toggle.jsx b/app/javascript/mastodon/features/notifications/components/setting_toggle.jsx
index 7eec664a10..9bf4b147a9 100644
--- a/app/javascript/mastodon/features/notifications/components/setting_toggle.jsx
+++ b/app/javascript/mastodon/features/notifications/components/setting_toggle.jsx
@@ -1,6 +1,8 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+
import Toggle from 'react-toggle';
export default class SettingToggle extends PureComponent {
diff --git a/app/javascript/mastodon/features/notifications/containers/column_settings_container.js b/app/javascript/mastodon/features/notifications/containers/column_settings_container.js
index 515afaca96..292767badb 100644
--- a/app/javascript/mastodon/features/notifications/containers/column_settings_container.js
+++ b/app/javascript/mastodon/features/notifications/containers/column_settings_container.js
@@ -1,11 +1,13 @@
-import { connect } from 'react-redux';
import { defineMessages, injectIntl } from 'react-intl';
-import ColumnSettings from '../components/column_settings';
-import { changeSetting } from '../../../actions/settings';
+
+import { connect } from 'react-redux';
+
+import { showAlert } from '../../../actions/alerts';
+import { openModal } from '../../../actions/modal';
import { setFilter, clearNotifications, requestBrowserPermission } from '../../../actions/notifications';
import { changeAlerts as changePushNotifications } from '../../../actions/push_notifications';
-import { openModal } from '../../../actions/modal';
-import { showAlert } from '../../../actions/alerts';
+import { changeSetting } from '../../../actions/settings';
+import ColumnSettings from '../components/column_settings';
const messages = defineMessages({
clearMessage: { id: 'notifications.clear_confirmation', defaultMessage: 'Are you sure you want to permanently clear all your notifications?' },
diff --git a/app/javascript/mastodon/features/notifications/containers/filter_bar_container.js b/app/javascript/mastodon/features/notifications/containers/filter_bar_container.js
index 4d495c2908..4e0184cef3 100644
--- a/app/javascript/mastodon/features/notifications/containers/filter_bar_container.js
+++ b/app/javascript/mastodon/features/notifications/containers/filter_bar_container.js
@@ -1,6 +1,7 @@
import { connect } from 'react-redux';
-import FilterBar from '../components/filter_bar';
+
import { setFilter } from '../../../actions/notifications';
+import FilterBar from '../components/filter_bar';
const makeMapStateToProps = state => ({
selectedFilter: state.getIn(['settings', 'notifications', 'quickFilter', 'active']),
diff --git a/app/javascript/mastodon/features/notifications/containers/follow_request_container.js b/app/javascript/mastodon/features/notifications/containers/follow_request_container.js
index f9f6c577e4..993ce710f2 100644
--- a/app/javascript/mastodon/features/notifications/containers/follow_request_container.js
+++ b/app/javascript/mastodon/features/notifications/containers/follow_request_container.js
@@ -1,7 +1,9 @@
import { connect } from 'react-redux';
-import { makeGetAccount } from 'mastodon/selectors';
-import FollowRequest from '../components/follow_request';
+
import { authorizeFollowRequest, rejectFollowRequest } from 'mastodon/actions/accounts';
+import { makeGetAccount } from 'mastodon/selectors';
+
+import FollowRequest from '../components/follow_request';
const makeMapStateToProps = () => {
const getAccount = makeGetAccount();
diff --git a/app/javascript/mastodon/features/notifications/containers/notification_container.js b/app/javascript/mastodon/features/notifications/containers/notification_container.js
index 51052cdf38..987813275f 100644
--- a/app/javascript/mastodon/features/notifications/containers/notification_container.js
+++ b/app/javascript/mastodon/features/notifications/containers/notification_container.js
@@ -1,6 +1,5 @@
import { connect } from 'react-redux';
-import { makeGetNotification, makeGetStatus, makeGetReport } from '../../../selectors';
-import Notification from '../components/notification';
+
import { initBoostModal } from '../../../actions/boosts';
import { mentionCompose } from '../../../actions/compose';
import {
@@ -15,6 +14,8 @@ import {
revealStatus,
} from '../../../actions/statuses';
import { boostModal } from '../../../initial_state';
+import { makeGetNotification, makeGetStatus, makeGetReport } from '../../../selectors';
+import Notification from '../components/notification';
const makeMapStateToProps = () => {
const getNotification = makeGetNotification();
diff --git a/app/javascript/mastodon/features/notifications/index.jsx b/app/javascript/mastodon/features/notifications/index.jsx
index 5375013d19..9fd2cf4b18 100644
--- a/app/javascript/mastodon/features/notifications/index.jsx
+++ b/app/javascript/mastodon/features/notifications/index.jsx
@@ -1,9 +1,23 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
+import { List as ImmutableList } from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
-import Column from '../../components/column';
-import ColumnHeader from '../../components/column_header';
+import { connect } from 'react-redux';
+import { createSelector } from 'reselect';
+
+import { debounce } from 'lodash';
+
+import { compareId } from 'mastodon/compare_id';
+import { Icon } from 'mastodon/components/icon';
+import { NotSignedInIndicator } from 'mastodon/components/not_signed_in_indicator';
+
+import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import { submitMarkers } from '../../actions/markers';
import {
expandNotifications,
scrollTopNotifications,
@@ -12,22 +26,15 @@ import {
unmountNotifications,
markNotificationsAsRead,
} from '../../actions/notifications';
-import { submitMarkers } from '../../actions/markers';
-import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
-import NotificationContainer from './containers/notification_container';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import Column from '../../components/column';
+import ColumnHeader from '../../components/column_header';
+import { LoadGap } from '../../components/load_gap';
+import ScrollableList from '../../components/scrollable_list';
+
+import NotificationsPermissionBanner from './components/notifications_permission_banner';
import ColumnSettingsContainer from './containers/column_settings_container';
import FilterBarContainer from './containers/filter_bar_container';
-import { createSelector } from 'reselect';
-import { List as ImmutableList } from 'immutable';
-import { debounce } from 'lodash';
-import ScrollableList from '../../components/scrollable_list';
-import LoadGap from '../../components/load_gap';
-import { Icon } from 'mastodon/components/icon';
-import { compareId } from 'mastodon/compare_id';
-import NotificationsPermissionBanner from './components/notifications_permission_banner';
-import { NotSignedInIndicator } from 'mastodon/components/not_signed_in_indicator';
-import { Helmet } from 'react-helmet';
+import NotificationContainer from './containers/notification_container';
const messages = defineMessages({
title: { id: 'column.notifications', defaultMessage: 'Notifications' },
diff --git a/app/javascript/mastodon/features/onboarding/components/progress_indicator.jsx b/app/javascript/mastodon/features/onboarding/components/progress_indicator.jsx
index 0d62f4e949..32d1754ff6 100644
--- a/app/javascript/mastodon/features/onboarding/components/progress_indicator.jsx
+++ b/app/javascript/mastodon/features/onboarding/components/progress_indicator.jsx
@@ -1,8 +1,10 @@
-import { Fragment } from 'react';
import PropTypes from 'prop-types';
-import { Check } from 'mastodon/components/check';
+import { Fragment } from 'react';
+
import classNames from 'classnames';
+import { Check } from 'mastodon/components/check';
+
const ProgressIndicator = ({ steps, completed }) => (
{(new Array(steps)).fill().map((_, i) => (
diff --git a/app/javascript/mastodon/features/onboarding/components/step.jsx b/app/javascript/mastodon/features/onboarding/components/step.jsx
index e612f681e8..0f478f26a3 100644
--- a/app/javascript/mastodon/features/onboarding/components/step.jsx
+++ b/app/javascript/mastodon/features/onboarding/components/step.jsx
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
-import { Icon } from 'mastodon/components/icon';
+
import { Check } from 'mastodon/components/check';
+import { Icon } from 'mastodon/components/icon';
const Step = ({ label, description, icon, completed, onClick, href }) => {
const content = (
diff --git a/app/javascript/mastodon/features/onboarding/follows.jsx b/app/javascript/mastodon/features/onboarding/follows.jsx
index 30e7b14190..3807ce9227 100644
--- a/app/javascript/mastodon/features/onboarding/follows.jsx
+++ b/app/javascript/mastodon/features/onboarding/follows.jsx
@@ -1,16 +1,20 @@
-import { PureComponent } from 'react';
-import Column from 'mastodon/components/column';
-import ColumnBackButton from 'mastodon/components/column_back_button';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { FormattedMessage, FormattedHTMLMessage } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
+
import { fetchSuggestions } from 'mastodon/actions/suggestions';
import { markAsPartial } from 'mastodon/actions/timelines';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import Account from 'mastodon/containers/account_container';
+import Column from 'mastodon/components/column';
+import ColumnBackButton from 'mastodon/components/column_back_button';
import { EmptyAccount } from 'mastodon/components/empty_account';
-import { FormattedMessage, FormattedHTMLMessage } from 'react-intl';
-import { makeGetAccount } from 'mastodon/selectors';
+import Account from 'mastodon/containers/account_container';
import { me } from 'mastodon/initial_state';
+import { makeGetAccount } from 'mastodon/selectors';
+
import ProgressIndicator from './components/progress_indicator';
const mapStateToProps = () => {
diff --git a/app/javascript/mastodon/features/onboarding/index.jsx b/app/javascript/mastodon/features/onboarding/index.jsx
index e9018f15e7..ecebdb6965 100644
--- a/app/javascript/mastodon/features/onboarding/index.jsx
+++ b/app/javascript/mastodon/features/onboarding/index.jsx
@@ -1,22 +1,28 @@
import PropTypes from 'prop-types';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { connect } from 'react-redux';
-import { focusCompose } from 'mastodon/actions/compose';
-import Column from 'mastodon/features/ui/components/column';
+
+import { FormattedMessage, injectIntl, defineMessages } from 'react-intl';
+
import { Helmet } from 'react-helmet';
-import illustration from 'mastodon/../images/elephant_ui_conversation.svg';
import { Link } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { debounce } from 'lodash';
+
+import illustration from 'mastodon/../images/elephant_ui_conversation.svg';
+import { fetchAccount } from 'mastodon/actions/accounts';
+import { focusCompose } from 'mastodon/actions/compose';
+import { closeOnboarding } from 'mastodon/actions/onboarding';
+import Column from 'mastodon/features/ui/components/column';
import { me } from 'mastodon/initial_state';
import { makeGetAccount } from 'mastodon/selectors';
-import { closeOnboarding } from 'mastodon/actions/onboarding';
-import { fetchAccount } from 'mastodon/actions/accounts';
+
+import ArrowSmallRight from './components/arrow_small_right';
+import Step from './components/step';
import Follows from './follows';
import Share from './share';
-import Step from './components/step';
-import ArrowSmallRight from './components/arrow_small_right';
-import { FormattedMessage, injectIntl, defineMessages } from 'react-intl';
-import { debounce } from 'lodash';
const messages = defineMessages({
template: { id: 'onboarding.compose.template', defaultMessage: 'Hello #Mastodon!' },
diff --git a/app/javascript/mastodon/features/onboarding/share.jsx b/app/javascript/mastodon/features/onboarding/share.jsx
index 30e148379d..1895af912b 100644
--- a/app/javascript/mastodon/features/onboarding/share.jsx
+++ b/app/javascript/mastodon/features/onboarding/share.jsx
@@ -1,16 +1,22 @@
+import PropTypes from 'prop-types';
import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl, FormattedMessage, FormattedHTMLMessage } from 'react-intl';
+
+import classNames from 'classnames';
+import { Link } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { connect } from 'react-redux';
+
+import SwipeableViews from 'react-swipeable-views';
+
import Column from 'mastodon/components/column';
import ColumnBackButton from 'mastodon/components/column_back_button';
-import PropTypes from 'prop-types';
-import { me, domain } from 'mastodon/initial_state';
-import { connect } from 'react-redux';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { defineMessages, injectIntl, FormattedMessage, FormattedHTMLMessage } from 'react-intl';
-import classNames from 'classnames';
import { Icon } from 'mastodon/components/icon';
+import { me, domain } from 'mastodon/initial_state';
+
import ArrowSmallRight from './components/arrow_small_right';
-import { Link } from 'react-router-dom';
-import SwipeableViews from 'react-swipeable-views';
const messages = defineMessages({
shareableMessage: { id: 'onboarding.share.message', defaultMessage: 'I\'m {username} on #Mastodon! Come follow me at {url}' },
diff --git a/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx
index bb082a89a8..23704b803b 100644
--- a/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx
+++ b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx
@@ -1,16 +1,20 @@
-import { connect } from 'react-redux';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import { IconButton } from 'mastodon/components/icon_button';
-import classNames from 'classnames';
-import { me, boostModal } from 'mastodon/initial_state';
+
import { defineMessages, injectIntl } from 'react-intl';
+
+import classNames from 'classnames';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { initBoostModal } from 'mastodon/actions/boosts';
import { replyCompose } from 'mastodon/actions/compose';
import { reblog, favourite, unreblog, unfavourite } from 'mastodon/actions/interactions';
-import { makeGetStatus } from 'mastodon/selectors';
-import { initBoostModal } from 'mastodon/actions/boosts';
import { openModal } from 'mastodon/actions/modal';
+import { IconButton } from 'mastodon/components/icon_button';
+import { me, boostModal } from 'mastodon/initial_state';
+import { makeGetStatus } from 'mastodon/selectors';
const messages = defineMessages({
reply: { id: 'status.reply', defaultMessage: 'Reply' },
diff --git a/app/javascript/mastodon/features/picture_in_picture/components/header.jsx b/app/javascript/mastodon/features/picture_in_picture/components/header.jsx
index 4339c318dc..774f40d817 100644
--- a/app/javascript/mastodon/features/picture_in_picture/components/header.jsx
+++ b/app/javascript/mastodon/features/picture_in_picture/components/header.jsx
@@ -1,12 +1,16 @@
-import { connect } from 'react-redux';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import { IconButton } from 'mastodon/components/icon_button';
+
+import { defineMessages, injectIntl } from 'react-intl';
+
import { Link } from 'react-router-dom';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import { Avatar } from 'mastodon/components/avatar';
import { DisplayName } from 'mastodon/components/display_name';
-import { defineMessages, injectIntl } from 'react-intl';
+import { IconButton } from 'mastodon/components/icon_button';
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
diff --git a/app/javascript/mastodon/features/picture_in_picture/index.jsx b/app/javascript/mastodon/features/picture_in_picture/index.jsx
index 788a302e9d..f087cd1b1d 100644
--- a/app/javascript/mastodon/features/picture_in_picture/index.jsx
+++ b/app/javascript/mastodon/features/picture_in_picture/index.jsx
@@ -1,11 +1,14 @@
-import { Component } from 'react';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
-import Video from 'mastodon/features/video';
-import Audio from 'mastodon/features/audio';
+import { Component } from 'react';
+
+import { connect } from 'react-redux';
+
import { removePictureInPicture } from 'mastodon/actions/picture_in_picture';
-import Header from './components/header';
+import Audio from 'mastodon/features/audio';
+import Video from 'mastodon/features/video';
+
import Footer from './components/footer';
+import Header from './components/header';
const mapStateToProps = state => ({
...state.get('picture_in_picture'),
diff --git a/app/javascript/mastodon/features/pinned_statuses/index.jsx b/app/javascript/mastodon/features/pinned_statuses/index.jsx
index 9ac9c2f595..a93e82cfae 100644
--- a/app/javascript/mastodon/features/pinned_statuses/index.jsx
+++ b/app/javascript/mastodon/features/pinned_statuses/index.jsx
@@ -1,13 +1,17 @@
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
+
+import { defineMessages, injectIntl } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import { fetchPinnedStatuses } from '../../actions/pin_statuses';
-import Column from '../ui/components/column';
import ColumnBackButtonSlim from '../../components/column_back_button_slim';
import StatusList from '../../components/status_list';
-import { defineMessages, injectIntl } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { Helmet } from 'react-helmet';
+import Column from '../ui/components/column';
const messages = defineMessages({
heading: { id: 'column.pins', defaultMessage: 'Pinned post' },
diff --git a/app/javascript/mastodon/features/privacy_policy/index.jsx b/app/javascript/mastodon/features/privacy_policy/index.jsx
index 10ec31c146..d420546e4f 100644
--- a/app/javascript/mastodon/features/privacy_policy/index.jsx
+++ b/app/javascript/mastodon/features/privacy_policy/index.jsx
@@ -1,9 +1,12 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import { Helmet } from 'react-helmet';
+import { PureComponent } from 'react';
+
import { FormattedMessage, FormattedDate, injectIntl, defineMessages } from 'react-intl';
-import Column from 'mastodon/components/column';
+
+import { Helmet } from 'react-helmet';
+
import api from 'mastodon/api';
+import Column from 'mastodon/components/column';
import { Skeleton } from 'mastodon/components/skeleton';
const messages = defineMessages({
diff --git a/app/javascript/mastodon/features/public_timeline/components/column_settings.jsx b/app/javascript/mastodon/features/public_timeline/components/column_settings.jsx
index 34db9149cb..1ceec1ba66 100644
--- a/app/javascript/mastodon/features/public_timeline/components/column_settings.jsx
+++ b/app/javascript/mastodon/features/public_timeline/components/column_settings.jsx
@@ -1,7 +1,10 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+import { PureComponent } from 'react';
+
import { injectIntl, FormattedMessage } from 'react-intl';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+
import SettingToggle from '../../notifications/components/setting_toggle';
class ColumnSettings extends PureComponent {
diff --git a/app/javascript/mastodon/features/public_timeline/containers/column_settings_container.js b/app/javascript/mastodon/features/public_timeline/containers/column_settings_container.js
index 8c9e8aef41..6476d51ffb 100644
--- a/app/javascript/mastodon/features/public_timeline/containers/column_settings_container.js
+++ b/app/javascript/mastodon/features/public_timeline/containers/column_settings_container.js
@@ -1,7 +1,8 @@
import { connect } from 'react-redux';
-import ColumnSettings from '../components/column_settings';
-import { changeSetting } from '../../../actions/settings';
+
import { changeColumnParams } from '../../../actions/columns';
+import { changeSetting } from '../../../actions/settings';
+import ColumnSettings from '../components/column_settings';
const mapStateToProps = (state, { columnId }) => {
const uuid = columnId;
diff --git a/app/javascript/mastodon/features/public_timeline/index.jsx b/app/javascript/mastodon/features/public_timeline/index.jsx
index f61faa1e7f..01b02d4024 100644
--- a/app/javascript/mastodon/features/public_timeline/index.jsx
+++ b/app/javascript/mastodon/features/public_timeline/index.jsx
@@ -1,16 +1,22 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
-import StatusListContainer from '../ui/containers/status_list_container';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
+import { connect } from 'react-redux';
+
+import DismissableBanner from 'mastodon/components/dismissable_banner';
+
+import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import { connectPublicStream } from '../../actions/streaming';
+import { expandPublicTimeline } from '../../actions/timelines';
import Column from '../../components/column';
import ColumnHeader from '../../components/column_header';
-import { expandPublicTimeline } from '../../actions/timelines';
-import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import StatusListContainer from '../ui/containers/status_list_container';
+
import ColumnSettingsContainer from './containers/column_settings_container';
-import { connectPublicStream } from '../../actions/streaming';
-import { Helmet } from 'react-helmet';
-import DismissableBanner from 'mastodon/components/dismissable_banner';
const messages = defineMessages({
title: { id: 'column.public', defaultMessage: 'Federated timeline' },
diff --git a/app/javascript/mastodon/features/reblogs/index.jsx b/app/javascript/mastodon/features/reblogs/index.jsx
index 2248098863..31048eba0f 100644
--- a/app/javascript/mastodon/features/reblogs/index.jsx
+++ b/app/javascript/mastodon/features/reblogs/index.jsx
@@ -1,16 +1,21 @@
-import { connect } from 'react-redux';
-import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import LoadingIndicator from '../../components/loading_indicator';
-import { fetchReblogs } from '../../actions/interactions';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { Helmet } from 'react-helmet';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { Icon } from 'mastodon/components/icon';
+
+import { fetchReblogs } from '../../actions/interactions';
+import ColumnHeader from '../../components/column_header';
+import LoadingIndicator from '../../components/loading_indicator';
+import ScrollableList from '../../components/scrollable_list';
import AccountContainer from '../../containers/account_container';
import Column from '../ui/components/column';
-import ScrollableList from '../../components/scrollable_list';
-import { Icon } from 'mastodon/components/icon';
-import ColumnHeader from '../../components/column_header';
-import { Helmet } from 'react-helmet';
const messages = defineMessages({
refresh: { id: 'refresh', defaultMessage: 'Refresh' },
diff --git a/app/javascript/mastodon/features/report/category.jsx b/app/javascript/mastodon/features/report/category.jsx
index 13a5605c65..a6e817c73d 100644
--- a/app/javascript/mastodon/features/report/category.jsx
+++ b/app/javascript/mastodon/features/report/category.jsx
@@ -1,11 +1,15 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { List as ImmutableList } from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import Button from 'mastodon/components/button';
+
import Option from './components/option';
-import { List as ImmutableList } from 'immutable';
const messages = defineMessages({
dislike: { id: 'report.reasons.dislike', defaultMessage: 'I don\'t like it' },
diff --git a/app/javascript/mastodon/features/report/comment.jsx b/app/javascript/mastodon/features/report/comment.jsx
index c4a6961817..4888b76bcb 100644
--- a/app/javascript/mastodon/features/report/comment.jsx
+++ b/app/javascript/mastodon/features/report/comment.jsx
@@ -1,9 +1,12 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
-import Button from 'mastodon/components/button';
+
import Toggle from 'react-toggle';
+import Button from 'mastodon/components/button';
+
const messages = defineMessages({
placeholder: { id: 'report.placeholder', defaultMessage: 'Type or paste additional comments' },
});
diff --git a/app/javascript/mastodon/features/report/components/option.jsx b/app/javascript/mastodon/features/report/components/option.jsx
index 9018d4775e..ffc0c7395c 100644
--- a/app/javascript/mastodon/features/report/components/option.jsx
+++ b/app/javascript/mastodon/features/report/components/option.jsx
@@ -1,6 +1,8 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import classNames from 'classnames';
+
import { Check } from 'mastodon/components/check';
export default class Option extends PureComponent {
diff --git a/app/javascript/mastodon/features/report/components/status_check_box.jsx b/app/javascript/mastodon/features/report/components/status_check_box.jsx
index 14f30a912f..9fc2655960 100644
--- a/app/javascript/mastodon/features/report/components/status_check_box.jsx
+++ b/app/javascript/mastodon/features/report/components/status_check_box.jsx
@@ -1,20 +1,24 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { injectIntl, defineMessages } from 'react-intl';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
-import StatusContent from 'mastodon/components/status_content';
+
import { Avatar } from 'mastodon/components/avatar';
import { DisplayName } from 'mastodon/components/display_name';
-import { RelativeTimestamp } from 'mastodon/components/relative_timestamp';
-import Option from './option';
-import MediaAttachments from 'mastodon/components/media_attachments';
-import { injectIntl, defineMessages } from 'react-intl';
import { Icon } from 'mastodon/components/icon';
+import MediaAttachments from 'mastodon/components/media_attachments';
+import { RelativeTimestamp } from 'mastodon/components/relative_timestamp';
+import StatusContent from 'mastodon/components/status_content';
+
+import Option from './option';
const messages = defineMessages({
public_short: { id: 'privacy.public.short', defaultMessage: 'Public' },
unlisted_short: { id: 'privacy.unlisted.short', defaultMessage: 'Unlisted' },
public_unlisted_short: { id: 'privacy.public_unlisted.short', defaultMessage: 'Public unlisted' },
- private_short: { id: 'privacy.private.short', defaultMessage: 'Followers-only' },
+ private_short: { id: 'privacy.private.short', defaultMessage: 'Followers only' },
direct_short: { id: 'privacy.direct.short', defaultMessage: 'Mentioned people only' },
});
diff --git a/app/javascript/mastodon/features/report/containers/status_check_box_container.js b/app/javascript/mastodon/features/report/containers/status_check_box_container.js
index 65a7c11fd4..45ed8f93d9 100644
--- a/app/javascript/mastodon/features/report/containers/status_check_box_container.js
+++ b/app/javascript/mastodon/features/report/containers/status_check_box_container.js
@@ -1,7 +1,9 @@
import { connect } from 'react-redux';
-import StatusCheckBox from '../components/status_check_box';
+
import { makeGetStatus } from 'mastodon/selectors';
+import StatusCheckBox from '../components/status_check_box';
+
const makeMapStateToProps = () => {
const getStatus = makeGetStatus();
diff --git a/app/javascript/mastodon/features/report/rules.jsx b/app/javascript/mastodon/features/report/rules.jsx
index 66bc29bc62..67d92839ed 100644
--- a/app/javascript/mastodon/features/report/rules.jsx
+++ b/app/javascript/mastodon/features/report/rules.jsx
@@ -1,9 +1,13 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { FormattedMessage } from 'react-intl';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
-import { FormattedMessage } from 'react-intl';
+
import Button from 'mastodon/components/button';
+
import Option from './components/option';
const mapStateToProps = state => ({
diff --git a/app/javascript/mastodon/features/report/statuses.jsx b/app/javascript/mastodon/features/report/statuses.jsx
index adf56479d1..78408c96bd 100644
--- a/app/javascript/mastodon/features/report/statuses.jsx
+++ b/app/javascript/mastodon/features/report/statuses.jsx
@@ -1,12 +1,15 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { FormattedMessage } from 'react-intl';
+
+import { OrderedSet } from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
-import StatusCheckBox from 'mastodon/features/report/containers/status_check_box_container';
-import { OrderedSet } from 'immutable';
-import { FormattedMessage } from 'react-intl';
+
import Button from 'mastodon/components/button';
import LoadingIndicator from 'mastodon/components/loading_indicator';
+import StatusCheckBox from 'mastodon/features/report/containers/status_check_box_container';
const mapStateToProps = (state, { accountId }) => ({
availableStatusIds: OrderedSet(state.getIn(['timelines', `account:${accountId}:with_replies`, 'items'])),
diff --git a/app/javascript/mastodon/features/report/thanks.jsx b/app/javascript/mastodon/features/report/thanks.jsx
index 5a4841149b..79ddc2e802 100644
--- a/app/javascript/mastodon/features/report/thanks.jsx
+++ b/app/javascript/mastodon/features/report/thanks.jsx
@@ -1,14 +1,17 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
-import Button from 'mastodon/components/button';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
+
import {
unfollowAccount,
muteAccount,
blockAccount,
} from 'mastodon/actions/accounts';
+import Button from 'mastodon/components/button';
const mapStateToProps = () => ({});
diff --git a/app/javascript/mastodon/features/standalone/compose/index.jsx b/app/javascript/mastodon/features/standalone/compose/index.jsx
index ae639bc1c3..c36e843f5a 100644
--- a/app/javascript/mastodon/features/standalone/compose/index.jsx
+++ b/app/javascript/mastodon/features/standalone/compose/index.jsx
@@ -1,8 +1,9 @@
import { PureComponent } from 'react';
+
import ComposeFormContainer from '../../compose/containers/compose_form_container';
-import NotificationsContainer from '../../ui/containers/notifications_container';
import LoadingBarContainer from '../../ui/containers/loading_bar_container';
import ModalContainer from '../../ui/containers/modal_container';
+import NotificationsContainer from '../../ui/containers/notifications_container';
export default class Compose extends PureComponent {
diff --git a/app/javascript/mastodon/features/status/components/action_bar.jsx b/app/javascript/mastodon/features/status/components/action_bar.jsx
index 811b76805b..ec0ab2285b 100644
--- a/app/javascript/mastodon/features/status/components/action_bar.jsx
+++ b/app/javascript/mastodon/features/status/components/action_bar.jsx
@@ -1,15 +1,20 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import { connect } from 'react-redux';
-import { IconButton } from '../../../components/icon_button';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
-import EmojiPickerDropdown from '../../compose/containers/emoji_picker_dropdown_container';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl } from 'react-intl';
-import { me } from '../../../initial_state';
+
import classNames from 'classnames';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { connect } from 'react-redux';
+
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions';
+import { IconButton } from '../../../components/icon_button';
+import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
+import { me } from '../../../initial_state';
+import EmojiPickerDropdown from '../../compose/containers/emoji_picker_dropdown_container';
+
const messages = defineMessages({
delete: { id: 'status.delete', defaultMessage: 'Delete' },
redraft: { id: 'status.redraft', defaultMessage: 'Delete & re-draft' },
@@ -34,9 +39,9 @@ const messages = defineMessages({
unpin: { id: 'status.unpin', defaultMessage: 'Unpin from profile' },
embed: { id: 'status.embed', defaultMessage: 'Embed' },
admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },
- admin_status: { id: 'status.admin_status', defaultMessage: 'Open this status in the moderation interface' },
+ admin_status: { id: 'status.admin_status', defaultMessage: 'Open this post in the moderation interface' },
admin_domain: { id: 'status.admin_domain', defaultMessage: 'Open moderation interface for {domain}' },
- copy: { id: 'status.copy', defaultMessage: 'Copy link to status' },
+ copy: { id: 'status.copy', defaultMessage: 'Copy link to post' },
blockDomain: { id: 'account.block_domain', defaultMessage: 'Block domain {domain}' },
unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unblock domain {domain}' },
unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' },
@@ -172,7 +177,6 @@ class ActionBar extends PureComponent {
handleShare = () => {
navigator.share({
- text: this.props.status.get('search_index'),
url: this.props.status.get('url'),
});
};
@@ -211,6 +215,11 @@ class ActionBar extends PureComponent {
}
menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy });
+
+ if ('share' in navigator) {
+ menu.push({ text: intl.formatMessage(messages.share), action: this.handleShare });
+ }
+
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
menu.push(null);
menu.push({ text: intl.formatMessage(messages.reblog), action: this.handleReblogForceModalClick });
@@ -271,10 +280,6 @@ class ActionBar extends PureComponent {
}
}
- const shareButton = ('share' in navigator) && publicStatus && (
-
- );
-
const emojiPickerButton = (
);
@@ -302,13 +307,11 @@ class ActionBar extends PureComponent {
return (
-
+
- {shareButton}
-
diff --git a/app/javascript/mastodon/features/status/components/card.jsx b/app/javascript/mastodon/features/status/components/card.jsx
index 6634d2c71f..d23bbf16a7 100644
--- a/app/javascript/mastodon/features/status/components/card.jsx
+++ b/app/javascript/mastodon/features/status/components/card.jsx
@@ -1,13 +1,18 @@
-import { PureComponent } from 'react';
+import punycode from 'punycode';
+
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { FormattedMessage } from 'react-intl';
+
+import classnames from 'classnames';
+
import Immutable from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
-import { FormattedMessage } from 'react-intl';
-import punycode from 'punycode';
-import classnames from 'classnames';
+
+import { Blurhash } from 'mastodon/components/blurhash';
import { Icon } from 'mastodon/components/icon';
import { useBlurhash } from 'mastodon/initial_state';
-import { Blurhash } from 'mastodon/components/blurhash';
const IDNA_PREFIX = 'xn--';
diff --git a/app/javascript/mastodon/features/status/components/detailed_status.jsx b/app/javascript/mastodon/features/status/components/detailed_status.jsx
index 015575df4a..18dd87f01a 100644
--- a/app/javascript/mastodon/features/status/components/detailed_status.jsx
+++ b/app/javascript/mastodon/features/status/components/detailed_status.jsx
@@ -1,29 +1,35 @@
import PropTypes from 'prop-types';
+
+import { injectIntl, defineMessages, FormattedDate, FormattedMessage } from 'react-intl';
+
+import classNames from 'classnames';
+import { Link } from 'react-router-dom';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import { AnimatedNumber } from 'mastodon/components/animated_number';
+import EditedTimestamp from 'mastodon/components/edited_timestamp';
+import { Icon } from 'mastodon/components/icon';
+import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
+
import { Avatar } from '../../../components/avatar';
import { DisplayName } from '../../../components/display_name';
+import MediaGallery from '../../../components/media_gallery';
import StatusContent from '../../../components/status_content';
import StatusEmojiReactionsBar from '../../../components/status_emoji_reactions_bar';
-import MediaGallery from '../../../components/media_gallery';
-import { Link } from 'react-router-dom';
-import { injectIntl, defineMessages, FormattedDate, FormattedMessage } from 'react-intl';
-import Card from './card';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import Video from '../../video';
import Audio from '../../audio';
import scheduleIdleTask from '../../ui/util/schedule_idle_task';
-import classNames from 'classnames';
-import { Icon } from 'mastodon/components/icon';
-import { AnimatedNumber } from 'mastodon/components/animated_number';
-import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
-import EditedTimestamp from 'mastodon/components/edited_timestamp';
+import Video from '../../video';
+
+import Card from './card';
const messages = defineMessages({
public_short: { id: 'privacy.public.short', defaultMessage: 'Public' },
unlisted_short: { id: 'privacy.unlisted.short', defaultMessage: 'Unlisted' },
public_unlisted_short: { id: 'privacy.public_unlisted.short', defaultMessage: 'Public unlisted' },
- private_short: { id: 'privacy.private.short', defaultMessage: 'Followers-only' },
- direct_short: { id: 'privacy.direct.short', defaultMessage: 'Direct' },
+ private_short: { id: 'privacy.private.short', defaultMessage: 'Followers only' },
+ direct_short: { id: 'privacy.direct.short', defaultMessage: 'Mentioned people only' },
searchability_public_short: { id: 'searchability.public.short', defaultMessage: 'Public' },
searchability_private_short: { id: 'searchability.unlisted.short', defaultMessage: 'Followers' },
searchability_direct_short: { id: 'searchability.private.short', defaultMessage: 'Reactionners' },
@@ -235,7 +241,7 @@ class DetailedStatus extends ImmutablePureComponent {
} else if (this.context.router) {
reblogLink = (
<>
- ·
+ ·
@@ -247,7 +253,7 @@ class DetailedStatus extends ImmutablePureComponent {
} else {
reblogLink = (
<>
- ·
+ ·
@@ -301,7 +307,7 @@ class DetailedStatus extends ImmutablePureComponent {
if (status.get('edited_at')) {
edited = (
<>
- ·
+ ·
>
);
diff --git a/app/javascript/mastodon/features/status/containers/detailed_status_container.js b/app/javascript/mastodon/features/status/containers/detailed_status_container.js
index f2c1d8187b..7f8449652e 100644
--- a/app/javascript/mastodon/features/status/containers/detailed_status_container.js
+++ b/app/javascript/mastodon/features/status/containers/detailed_status_container.js
@@ -1,6 +1,10 @@
+import { defineMessages, injectIntl } from 'react-intl';
+
import { connect } from 'react-redux';
-import DetailedStatus from '../components/detailed_status';
-import { makeGetStatus, makeGetPictureInPicture } from '../../../selectors';
+
+import { showAlertForError } from '../../../actions/alerts';
+import { initBlockModal } from '../../../actions/blocks';
+import { initBoostModal } from '../../../actions/boosts';
import {
replyCompose,
mentionCompose,
@@ -16,6 +20,9 @@ import {
emojiReact,
unEmojiReact,
} from '../../../actions/interactions';
+import { openModal } from '../../../actions/modal';
+import { initMuteModal } from '../../../actions/mutes';
+import { initReport } from '../../../actions/reports';
import {
muteStatus,
unmuteStatus,
@@ -23,14 +30,9 @@ import {
hideStatus,
revealStatus,
} from '../../../actions/statuses';
-import { initMuteModal } from '../../../actions/mutes';
-import { initBlockModal } from '../../../actions/blocks';
-import { initBoostModal } from '../../../actions/boosts';
-import { initReport } from '../../../actions/reports';
-import { openModal } from '../../../actions/modal';
-import { defineMessages, injectIntl } from 'react-intl';
import { boostModal, deleteModal } from '../../../initial_state';
-import { showAlertForError } from '../../../actions/alerts';
+import { makeGetStatus, makeGetPictureInPicture } from '../../../selectors';
+import DetailedStatus from '../components/detailed_status';
const messages = defineMessages({
deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx
index 43377433c4..939c303fc7 100644
--- a/app/javascript/mastodon/features/status/index.jsx
+++ b/app/javascript/mastodon/features/status/index.jsx
@@ -1,24 +1,38 @@
-import Immutable from 'immutable';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
+
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
import classNames from 'classnames';
+import { Helmet } from 'react-helmet';
+
+import Immutable from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
import { createSelector } from 'reselect';
-import {
- fetchStatus,
- muteStatus,
- unmuteStatus,
- deleteStatus,
- editStatus,
- hideStatus,
- revealStatus,
- translateStatus,
- undoStatusTranslation,
-} from '../../actions/statuses';
+
+import { HotKeys } from 'react-hotkeys';
+
+import { Icon } from 'mastodon/components/icon';
import LoadingIndicator from 'mastodon/components/loading_indicator';
-import DetailedStatus from './components/detailed_status';
-import ActionBar from './components/action_bar';
-import Column from '../ui/components/column';
+import ScrollContainer from 'mastodon/containers/scroll_container';
+import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
+
+import {
+ unblockAccount,
+ unmuteAccount,
+} from '../../actions/accounts';
+import { initBlockModal } from '../../actions/blocks';
+import { initBoostModal } from '../../actions/boosts';
+import {
+ replyCompose,
+ mentionCompose,
+ directCompose,
+} from '../../actions/compose';
+import {
+ blockDomain,
+ unblockDomain,
+} from '../../actions/domain_blocks';
import {
favourite,
unfavourite,
@@ -31,37 +45,30 @@ import {
pin,
unpin,
} from '../../actions/interactions';
-import {
- replyCompose,
- mentionCompose,
- directCompose,
-} from '../../actions/compose';
-import {
- unblockAccount,
- unmuteAccount,
-} from '../../actions/accounts';
-import {
- blockDomain,
- unblockDomain,
-} from '../../actions/domain_blocks';
-import { initMuteModal } from '../../actions/mutes';
-import { initBlockModal } from '../../actions/blocks';
-import { initBoostModal } from '../../actions/boosts';
-import { initReport } from '../../actions/reports';
-import { makeGetStatus, makeGetPictureInPicture } from '../../selectors';
-import ScrollContainer from 'mastodon/containers/scroll_container';
-import ColumnHeader from '../../components/column_header';
-import StatusContainer from '../../containers/status_container';
import { openModal } from '../../actions/modal';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { HotKeys } from 'react-hotkeys';
-import { boostModal, deleteModal } from '../../initial_state';
-import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
+import { initMuteModal } from '../../actions/mutes';
+import { initReport } from '../../actions/reports';
+import {
+ fetchStatus,
+ muteStatus,
+ unmuteStatus,
+ deleteStatus,
+ editStatus,
+ hideStatus,
+ revealStatus,
+ translateStatus,
+ undoStatusTranslation,
+} from '../../actions/statuses';
+import ColumnHeader from '../../components/column_header';
import { textForScreenReader, defaultMediaVisibility } from '../../components/status';
-import { Icon } from 'mastodon/components/icon';
-import { Helmet } from 'react-helmet';
-import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
+import StatusContainer from '../../containers/status_container';
+import { boostModal, deleteModal } from '../../initial_state';
+import { makeGetStatus, makeGetPictureInPicture } from '../../selectors';
+import Column from '../ui/components/column';
+import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
+
+import ActionBar from './components/action_bar';
+import DetailedStatus from './components/detailed_status';
const messages = defineMessages({
deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
@@ -74,7 +81,7 @@ const messages = defineMessages({
detailedStatus: { id: 'status.detailed_status', defaultMessage: 'Detailed conversation view' },
replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },
replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },
- blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Hide entire domain' },
+ blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Block entire domain' },
});
const makeMapStateToProps = () => {
diff --git a/app/javascript/mastodon/features/subscribed_languages_modal/index.jsx b/app/javascript/mastodon/features/subscribed_languages_modal/index.jsx
index 6ef6ce86af..eb128f68e7 100644
--- a/app/javascript/mastodon/features/subscribed_languages_modal/index.jsx
+++ b/app/javascript/mastodon/features/subscribed_languages_modal/index.jsx
@@ -1,15 +1,18 @@
import PropTypes from 'prop-types';
-import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
+
+import { is, List as ImmutableList, Set as ImmutableSet } from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
-import { is, List as ImmutableList, Set as ImmutableSet } from 'immutable';
-import { languages as preloadedLanguages } from 'mastodon/initial_state';
-import Option from 'mastodon/features/report/components/option';
-import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
-import { IconButton } from 'mastodon/components/icon_button';
-import Button from 'mastodon/components/button';
+
import { followAccount } from 'mastodon/actions/accounts';
+import Button from 'mastodon/components/button';
+import { IconButton } from 'mastodon/components/icon_button';
+import Option from 'mastodon/features/report/components/option';
+import { languages as preloadedLanguages } from 'mastodon/initial_state';
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
diff --git a/app/javascript/mastodon/features/ui/components/__tests__/column-test.jsx b/app/javascript/mastodon/features/ui/components/__tests__/column-test.jsx
index 8f935299fa..0482942426 100644
--- a/app/javascript/mastodon/features/ui/components/__tests__/column-test.jsx
+++ b/app/javascript/mastodon/features/ui/components/__tests__/column-test.jsx
@@ -1,4 +1,5 @@
import { render, fireEvent, screen } from '@testing-library/react';
+
import Column from '../column';
describe('', () => {
diff --git a/app/javascript/mastodon/features/ui/components/actions_modal.jsx b/app/javascript/mastodon/features/ui/components/actions_modal.jsx
index d8d9ef9637..b6a9abddae 100644
--- a/app/javascript/mastodon/features/ui/components/actions_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/actions_modal.jsx
@@ -1,8 +1,11 @@
import PropTypes from 'prop-types';
+
+import classNames from 'classnames';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { IconButton } from '../../../components/icon_button';
-import classNames from 'classnames';
export default class ActionsModal extends ImmutablePureComponent {
diff --git a/app/javascript/mastodon/features/ui/components/audio_modal.jsx b/app/javascript/mastodon/features/ui/components/audio_modal.jsx
index a1dbe9b730..b8e6ee5e41 100644
--- a/app/javascript/mastodon/features/ui/components/audio_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/audio_modal.jsx
@@ -1,8 +1,10 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import Audio from 'mastodon/features/audio';
-import { connect } from 'react-redux';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import Audio from 'mastodon/features/audio';
import Footer from 'mastodon/features/picture_in_picture/components/footer';
const mapStateToProps = (state, { statusId }) => ({
diff --git a/app/javascript/mastodon/features/ui/components/block_modal.jsx b/app/javascript/mastodon/features/ui/components/block_modal.jsx
index 3e3f7c83ac..962b19344e 100644
--- a/app/javascript/mastodon/features/ui/components/block_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/block_modal.jsx
@@ -1,13 +1,15 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
-import { injectIntl, FormattedMessage } from 'react-intl';
-import { makeGetAccount } from '../../../selectors';
-import Button from '../../../components/button';
-import { closeModal } from '../../../actions/modal';
-import { blockAccount } from '../../../actions/accounts';
-import { initReport } from '../../../actions/reports';
+import { PureComponent } from 'react';
+import { injectIntl, FormattedMessage } from 'react-intl';
+
+import { connect } from 'react-redux';
+
+import { blockAccount } from '../../../actions/accounts';
+import { closeModal } from '../../../actions/modal';
+import { initReport } from '../../../actions/reports';
+import Button from '../../../components/button';
+import { makeGetAccount } from '../../../selectors';
const makeMapStateToProps = () => {
const getAccount = makeGetAccount();
diff --git a/app/javascript/mastodon/features/ui/components/boost_modal.jsx b/app/javascript/mastodon/features/ui/components/boost_modal.jsx
index bfa3c875e1..38a106fad2 100644
--- a/app/javascript/mastodon/features/ui/components/boost_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/boost_modal.jsx
@@ -1,18 +1,23 @@
-import { connect } from 'react-redux';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import Button from '../../../components/button';
-import StatusContent from '../../../components/status_content';
-import { Avatar } from '../../../components/avatar';
-import { RelativeTimestamp } from '../../../components/relative_timestamp';
-import { DisplayName } from '../../../components/display_name';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { Icon } from 'mastodon/components/icon';
-import AttachmentList from 'mastodon/components/attachment_list';
-import PrivacyDropdown from 'mastodon/features/compose/components/privacy_dropdown';
+
import classNames from 'classnames';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
import { changeBoostPrivacy } from 'mastodon/actions/boosts';
+import AttachmentList from 'mastodon/components/attachment_list';
+import { Icon } from 'mastodon/components/icon';
+import PrivacyDropdown from 'mastodon/features/compose/components/privacy_dropdown';
+
+import { Avatar } from '../../../components/avatar';
+import Button from '../../../components/button';
+import { DisplayName } from '../../../components/display_name';
+import { RelativeTimestamp } from '../../../components/relative_timestamp';
+import StatusContent from '../../../components/status_content';
const messages = defineMessages({
cancel_reblog: { id: 'status.cancel_reblog_private', defaultMessage: 'Unboost' },
@@ -20,8 +25,8 @@ const messages = defineMessages({
public_short: { id: 'privacy.public.short', defaultMessage: 'Public' },
unlisted_short: { id: 'privacy.unlisted.short', defaultMessage: 'Unlisted' },
public_unlisted_short: { id: 'privacy.public_unlisted.short', defaultMessage: 'Public unlisted' },
- private_short: { id: 'privacy.private.short', defaultMessage: 'Followers-only' },
- direct_short: { id: 'privacy.direct.short', defaultMessage: 'Direct' },
+ private_short: { id: 'privacy.private.short', defaultMessage: 'Followers only' },
+ direct_short: { id: 'privacy.direct.short', defaultMessage: 'Mentioned people only' },
});
const mapStateToProps = state => {
diff --git a/app/javascript/mastodon/features/ui/components/bundle.jsx b/app/javascript/mastodon/features/ui/components/bundle.jsx
index 1474d89a44..15c4220b34 100644
--- a/app/javascript/mastodon/features/ui/components/bundle.jsx
+++ b/app/javascript/mastodon/features/ui/components/bundle.jsx
@@ -1,5 +1,5 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
const emptyComponent = () => null;
const noop = () => { };
diff --git a/app/javascript/mastodon/features/ui/components/bundle_column_error.jsx b/app/javascript/mastodon/features/ui/components/bundle_column_error.jsx
index f92b44f5d1..b85d5ec011 100644
--- a/app/javascript/mastodon/features/ui/components/bundle_column_error.jsx
+++ b/app/javascript/mastodon/features/ui/components/bundle_column_error.jsx
@@ -1,11 +1,14 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { injectIntl, FormattedMessage } from 'react-intl';
-import Column from 'mastodon/components/column';
-import Button from 'mastodon/components/button';
+
+import classNames from 'classnames';
import { Helmet } from 'react-helmet';
import { Link } from 'react-router-dom';
-import classNames from 'classnames';
+
+import Button from 'mastodon/components/button';
+import Column from 'mastodon/components/column';
import { autoPlayGif } from 'mastodon/initial_state';
class GIF extends PureComponent {
diff --git a/app/javascript/mastodon/features/ui/components/bundle_modal_error.jsx b/app/javascript/mastodon/features/ui/components/bundle_modal_error.jsx
index e39b8c4b25..67dba3ce0c 100644
--- a/app/javascript/mastodon/features/ui/components/bundle_modal_error.jsx
+++ b/app/javascript/mastodon/features/ui/components/bundle_modal_error.jsx
@@ -1,5 +1,6 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl } from 'react-intl';
import { IconButton } from '../../../components/icon_button';
diff --git a/app/javascript/mastodon/features/ui/components/column.jsx b/app/javascript/mastodon/features/ui/components/column.jsx
index 69bf7ca4d6..2a70162d8a 100644
--- a/app/javascript/mastodon/features/ui/components/column.jsx
+++ b/app/javascript/mastodon/features/ui/components/column.jsx
@@ -1,9 +1,12 @@
-import { PureComponent } from 'react';
-import ColumnHeader from './column_header';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { debounce } from 'lodash';
-import { scrollTop } from '../../../scroll';
+
import { isMobile } from '../../../is_mobile';
+import { scrollTop } from '../../../scroll';
+
+import ColumnHeader from './column_header';
export default class Column extends PureComponent {
diff --git a/app/javascript/mastodon/features/ui/components/column_header.jsx b/app/javascript/mastodon/features/ui/components/column_header.jsx
index b1ac14338f..8d21e2ba5e 100644
--- a/app/javascript/mastodon/features/ui/components/column_header.jsx
+++ b/app/javascript/mastodon/features/ui/components/column_header.jsx
@@ -1,6 +1,8 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import classNames from 'classnames';
+
import { Icon } from 'mastodon/components/icon';
export default class ColumnHeader extends PureComponent {
diff --git a/app/javascript/mastodon/features/ui/components/column_link.jsx b/app/javascript/mastodon/features/ui/components/column_link.jsx
index 434244fbdc..09a2e44bf2 100644
--- a/app/javascript/mastodon/features/ui/components/column_link.jsx
+++ b/app/javascript/mastodon/features/ui/components/column_link.jsx
@@ -1,7 +1,9 @@
import PropTypes from 'prop-types';
-import { NavLink } from 'react-router-dom';
-import { Icon } from 'mastodon/components/icon';
+
import classNames from 'classnames';
+import { NavLink } from 'react-router-dom';
+
+import { Icon } from 'mastodon/components/icon';
const ColumnLink = ({ icon, text, to, href, method, badge, transparent, ...other }) => {
const className = classNames('column-link', { 'column-link--transparent': transparent });
diff --git a/app/javascript/mastodon/features/ui/components/column_loading.jsx b/app/javascript/mastodon/features/ui/components/column_loading.jsx
index 72cc68e824..102550edf1 100644
--- a/app/javascript/mastodon/features/ui/components/column_loading.jsx
+++ b/app/javascript/mastodon/features/ui/components/column_loading.jsx
@@ -1,8 +1,9 @@
import PropTypes from 'prop-types';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
import Column from '../../../components/column';
import ColumnHeader from '../../../components/column_header';
-import ImmutablePureComponent from 'react-immutable-pure-component';
export default class ColumnLoading extends ImmutablePureComponent {
diff --git a/app/javascript/mastodon/features/ui/components/columns_area.jsx b/app/javascript/mastodon/features/ui/components/columns_area.jsx
index e6c327d2d2..47eae61fbe 100644
--- a/app/javascript/mastodon/features/ui/components/columns_area.jsx
+++ b/app/javascript/mastodon/features/ui/components/columns_area.jsx
@@ -1,11 +1,13 @@
-import { Children, cloneElement } from 'react';
import PropTypes from 'prop-types';
+import { Children, cloneElement } from 'react';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import { supportsPassiveEvents } from 'detect-passive-events';
+
+import { scrollRight } from '../../../scroll';
import BundleContainer from '../containers/bundle_container';
-import ColumnLoading from './column_loading';
-import DrawerLoading from './drawer_loading';
-import BundleColumnError from './bundle_column_error';
import {
Compose,
Notifications,
@@ -20,10 +22,12 @@ import {
ListTimeline,
Directory,
} from '../util/async-components';
+
+import BundleColumnError from './bundle_column_error';
+import ColumnLoading from './column_loading';
import ComposePanel from './compose_panel';
+import DrawerLoading from './drawer_loading';
import NavigationPanel from './navigation_panel';
-import { supportsPassiveEvents } from 'detect-passive-events';
-import { scrollRight } from '../../../scroll';
const componentMap = {
'COMPOSE': Compose,
diff --git a/app/javascript/mastodon/features/ui/components/compare_history_modal.jsx b/app/javascript/mastodon/features/ui/components/compare_history_modal.jsx
index b100a43062..4a55f25cbe 100644
--- a/app/javascript/mastodon/features/ui/components/compare_history_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/compare_history_modal.jsx
@@ -1,15 +1,19 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { FormattedMessage } from 'react-intl';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
-import { FormattedMessage } from 'react-intl';
-import { closeModal } from 'mastodon/actions/modal';
-import emojify from 'mastodon/features/emoji/emoji';
+
import escapeTextContentForBrowser from 'escape-html';
-import InlineAccount from 'mastodon/components/inline_account';
+
+import { closeModal } from 'mastodon/actions/modal';
import { IconButton } from 'mastodon/components/icon_button';
-import { RelativeTimestamp } from 'mastodon/components/relative_timestamp';
+import InlineAccount from 'mastodon/components/inline_account';
import MediaAttachments from 'mastodon/components/media_attachments';
+import { RelativeTimestamp } from 'mastodon/components/relative_timestamp';
+import emojify from 'mastodon/features/emoji/emoji';
const mapStateToProps = (state, { statusId }) => ({
language: state.getIn(['statuses', statusId, 'language']),
diff --git a/app/javascript/mastodon/features/ui/components/compose_panel.jsx b/app/javascript/mastodon/features/ui/components/compose_panel.jsx
index 51cd2a5ecd..713ecb472b 100644
--- a/app/javascript/mastodon/features/ui/components/compose_panel.jsx
+++ b/app/javascript/mastodon/features/ui/components/compose_panel.jsx
@@ -1,12 +1,15 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
-import SearchContainer from 'mastodon/features/compose/containers/search_container';
+import { PureComponent } from 'react';
+
+import { connect } from 'react-redux';
+
+import { changeComposing, mountCompose, unmountCompose } from 'mastodon/actions/compose';
+import ServerBanner from 'mastodon/components/server_banner';
import ComposeFormContainer from 'mastodon/features/compose/containers/compose_form_container';
import NavigationContainer from 'mastodon/features/compose/containers/navigation_container';
+import SearchContainer from 'mastodon/features/compose/containers/search_container';
+
import LinkFooter from './link_footer';
-import ServerBanner from 'mastodon/components/server_banner';
-import { changeComposing, mountCompose, unmountCompose } from 'mastodon/actions/compose';
class ComposePanel extends PureComponent {
diff --git a/app/javascript/mastodon/features/ui/components/confirmation_modal.jsx b/app/javascript/mastodon/features/ui/components/confirmation_modal.jsx
index 412993ea2c..5a940e09c9 100644
--- a/app/javascript/mastodon/features/ui/components/confirmation_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/confirmation_modal.jsx
@@ -1,6 +1,8 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { injectIntl, FormattedMessage } from 'react-intl';
+
import Button from '../../../components/button';
class ConfirmationModal extends PureComponent {
diff --git a/app/javascript/mastodon/features/ui/components/disabled_account_banner.jsx b/app/javascript/mastodon/features/ui/components/disabled_account_banner.jsx
index 0fa497e8bf..6c4fefb0d5 100644
--- a/app/javascript/mastodon/features/ui/components/disabled_account_banner.jsx
+++ b/app/javascript/mastodon/features/ui/components/disabled_account_banner.jsx
@@ -1,10 +1,14 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import { connect } from 'react-redux';
-import { Link } from 'react-router-dom';
+import { PureComponent } from 'react';
+
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
-import { disabledAccountId, movedToAccountId, domain } from 'mastodon/initial_state';
+
+import { Link } from 'react-router-dom';
+
+import { connect } from 'react-redux';
+
import { openModal } from 'mastodon/actions/modal';
+import { disabledAccountId, movedToAccountId, domain } from 'mastodon/initial_state';
import { logOut } from 'mastodon/utils/log_out';
const messages = defineMessages({
diff --git a/app/javascript/mastodon/features/ui/components/embed_modal.jsx b/app/javascript/mastodon/features/ui/components/embed_modal.jsx
index 6187bfeb20..b08d53ab10 100644
--- a/app/javascript/mastodon/features/ui/components/embed_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/embed_modal.jsx
@@ -1,6 +1,9 @@
import PropTypes from 'prop-types';
-import ImmutablePureComponent from 'react-immutable-pure-component';
+
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
+
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
import api from 'mastodon/api';
import { IconButton } from 'mastodon/components/icon_button';
diff --git a/app/javascript/mastodon/features/ui/components/filter_modal.jsx b/app/javascript/mastodon/features/ui/components/filter_modal.jsx
index 7b5a1a03a6..12ebf29728 100644
--- a/app/javascript/mastodon/features/ui/components/filter_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/filter_modal.jsx
@@ -1,12 +1,15 @@
-import { connect } from 'react-redux';
-import { fetchStatus } from 'mastodon/actions/statuses';
-import { fetchFilters, createFilter, createFilterStatus } from 'mastodon/actions/filters';
import PropTypes from 'prop-types';
+
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
+
import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { fetchFilters, createFilter, createFilterStatus } from 'mastodon/actions/filters';
+import { fetchStatus } from 'mastodon/actions/statuses';
import { IconButton } from 'mastodon/components/icon_button';
-import SelectFilter from 'mastodon/features/filters/select_filter';
import AddedToFilter from 'mastodon/features/filters/added_to_filter';
+import SelectFilter from 'mastodon/features/filters/select_filter';
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
diff --git a/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx b/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx
index d4d852d246..7169b8a279 100644
--- a/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx
@@ -1,28 +1,34 @@
-import { PureComponent } from 'react';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
+
+import classNames from 'classnames';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
-import classNames from 'classnames';
-import { changeUploadCompose, uploadThumbnail, onChangeMediaDescription, onChangeMediaFocus } from '../../../actions/compose';
-import Video, { getPointerPosition } from '../../video';
-import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
-import { IconButton } from 'mastodon/components/icon_button';
-import Button from 'mastodon/components/button';
-import Audio from 'mastodon/features/audio';
+
import Textarea from 'react-textarea-autosize';
-import UploadProgress from 'mastodon/features/compose/components/upload_progress';
-import CharacterCounter from 'mastodon/features/compose/components/character_counter';
import { length } from 'stringz';
-import { Tesseract as fetchTesseract } from 'mastodon/features/ui/util/async-components';
-import { GIFV } from 'mastodon/components/gifv';
-import { me } from 'mastodon/initial_state';
-// eslint-disable-next-line import/no-extraneous-dependencies
-import tesseractCorePath from 'tesseract.js-core/tesseract-core.wasm.js';
// eslint-disable-next-line import/extensions
import tesseractWorkerPath from 'tesseract.js/dist/worker.min.js';
+// eslint-disable-next-line import/no-extraneous-dependencies
+import tesseractCorePath from 'tesseract.js-core/tesseract-core.wasm.js';
+
+import Button from 'mastodon/components/button';
+import { GIFV } from 'mastodon/components/gifv';
+import { IconButton } from 'mastodon/components/icon_button';
+import Audio from 'mastodon/features/audio';
+import CharacterCounter from 'mastodon/features/compose/components/character_counter';
+import UploadProgress from 'mastodon/features/compose/components/upload_progress';
+import { Tesseract as fetchTesseract } from 'mastodon/features/ui/util/async-components';
+import { me } from 'mastodon/initial_state';
import { assetHost } from 'mastodon/utils/config';
+import { changeUploadCompose, uploadThumbnail, onChangeMediaDescription, onChangeMediaFocus } from '../../../actions/compose';
+import Video, { getPointerPosition } from '../../video';
+
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
apply: { id: 'upload_modal.apply', defaultMessage: 'Apply' },
diff --git a/app/javascript/mastodon/features/ui/components/follow_requests_column_link.jsx b/app/javascript/mastodon/features/ui/components/follow_requests_column_link.jsx
index fcc2e180a0..d8859167b2 100644
--- a/app/javascript/mastodon/features/ui/components/follow_requests_column_link.jsx
+++ b/app/javascript/mastodon/features/ui/components/follow_requests_column_link.jsx
@@ -1,12 +1,15 @@
-import { Component } from 'react';
import PropTypes from 'prop-types';
-import { fetchFollowRequests } from 'mastodon/actions/accounts';
-import { connect } from 'react-redux';
-import ColumnLink from 'mastodon/features/ui/components/column_link';
-import { IconWithBadge } from 'mastodon/components/icon_with_badge';
-import { List as ImmutableList } from 'immutable';
+import { Component } from 'react';
+
import { injectIntl, defineMessages } from 'react-intl';
+import { List as ImmutableList } from 'immutable';
+import { connect } from 'react-redux';
+
+import { fetchFollowRequests } from 'mastodon/actions/accounts';
+import { IconWithBadge } from 'mastodon/components/icon_with_badge';
+import ColumnLink from 'mastodon/features/ui/components/column_link';
+
const messages = defineMessages({
text: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
});
diff --git a/app/javascript/mastodon/features/ui/components/header.jsx b/app/javascript/mastodon/features/ui/components/header.jsx
index 79b43ecb60..04651bab18 100644
--- a/app/javascript/mastodon/features/ui/components/header.jsx
+++ b/app/javascript/mastodon/features/ui/components/header.jsx
@@ -1,12 +1,16 @@
-import { PureComponent } from 'react';
-import { WordmarkLogo, SymbolLogo } from 'mastodon/components/logo';
-import { Link, withRouter } from 'react-router-dom';
-import { FormattedMessage } from 'react-intl';
-import { registrationsOpen, me } from 'mastodon/initial_state';
-import { Avatar } from 'mastodon/components/avatar';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
+import { FormattedMessage } from 'react-intl';
+
+import { Link, withRouter } from 'react-router-dom';
+
import { connect } from 'react-redux';
+
import { openModal } from 'mastodon/actions/modal';
+import { Avatar } from 'mastodon/components/avatar';
+import { WordmarkLogo, SymbolLogo } from 'mastodon/components/logo';
+import { registrationsOpen, me } from 'mastodon/initial_state';
const Account = connect(state => ({
account: state.getIn(['accounts', me]),
@@ -16,6 +20,10 @@ const Account = connect(state => ({
));
+const mapStateToProps = (state) => ({
+ signupUrl: state.getIn(['server', 'server', 'registrations', 'url'], null) || '/auth/sign_up',
+});
+
const mapDispatchToProps = (dispatch) => ({
openClosedRegistrationsModal() {
dispatch(openModal('CLOSED_REGISTRATIONS'));
@@ -31,11 +39,12 @@ class Header extends PureComponent {
static propTypes = {
openClosedRegistrationsModal: PropTypes.func,
location: PropTypes.object,
+ signupUrl: PropTypes.string.isRequired,
};
render () {
const { signedIn } = this.context.identity;
- const { location, openClosedRegistrationsModal } = this.props;
+ const { location, openClosedRegistrationsModal, signupUrl } = this.props;
let content;
@@ -51,7 +60,7 @@ class Header extends PureComponent {
if (registrationsOpen) {
signupButton = (
-
+
);
@@ -87,4 +96,4 @@ class Header extends PureComponent {
}
-export default withRouter(connect(null, mapDispatchToProps)(Header));
+export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Header));
diff --git a/app/javascript/mastodon/features/ui/components/image_loader.jsx b/app/javascript/mastodon/features/ui/components/image_loader.jsx
index 62b54a3e97..9dabc621b4 100644
--- a/app/javascript/mastodon/features/ui/components/image_loader.jsx
+++ b/app/javascript/mastodon/features/ui/components/image_loader.jsx
@@ -1,7 +1,10 @@
-import classNames from 'classnames';
import PropTypes from 'prop-types';
import { PureComponent } from 'react';
+
+import classNames from 'classnames';
+
import { LoadingBar } from 'react-redux-loading-bar';
+
import ZoomableImage from './zoomable_image';
export default class ImageLoader extends PureComponent {
diff --git a/app/javascript/mastodon/features/ui/components/image_modal.jsx b/app/javascript/mastodon/features/ui/components/image_modal.jsx
index a55095dc0f..4a73e86a99 100644
--- a/app/javascript/mastodon/features/ui/components/image_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/image_modal.jsx
@@ -1,8 +1,12 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import classNames from 'classnames';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl } from 'react-intl';
+
+import classNames from 'classnames';
+
import { IconButton } from 'mastodon/components/icon_button';
+
import ImageLoader from './image_loader';
const messages = defineMessages({
diff --git a/app/javascript/mastodon/features/ui/components/link_footer.jsx b/app/javascript/mastodon/features/ui/components/link_footer.jsx
index 273b089bb2..4ae6f1dcf4 100644
--- a/app/javascript/mastodon/features/ui/components/link_footer.jsx
+++ b/app/javascript/mastodon/features/ui/components/link_footer.jsx
@@ -1,12 +1,16 @@
-import { connect } from 'react-redux';
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
+
import { Link } from 'react-router-dom';
-import { domain, version, source_url, statusPageUrl, profile_directory as profileDirectory } from 'mastodon/initial_state';
-import { logOut } from 'mastodon/utils/log_out';
+
+import { connect } from 'react-redux';
+
import { openModal } from 'mastodon/actions/modal';
+import { domain, version, source_url, statusPageUrl, profile_directory as profileDirectory } from 'mastodon/initial_state';
import { PERMISSION_INVITE_USERS } from 'mastodon/permissions';
+import { logOut } from 'mastodon/utils/log_out';
const messages = defineMessages({
logoutMessage: { id: 'confirmations.logout.message', defaultMessage: 'Are you sure you want to log out?' },
diff --git a/app/javascript/mastodon/features/ui/components/list_panel.jsx b/app/javascript/mastodon/features/ui/components/list_panel.jsx
index c153c6edd9..8ecf70631b 100644
--- a/app/javascript/mastodon/features/ui/components/list_panel.jsx
+++ b/app/javascript/mastodon/features/ui/components/list_panel.jsx
@@ -1,10 +1,14 @@
import PropTypes from 'prop-types';
-import { createSelector } from 'reselect';
+
+import { withRouter } from 'react-router-dom';
+
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
-import { withRouter } from 'react-router-dom';
+import { createSelector } from 'reselect';
+
import { fetchLists } from 'mastodon/actions/lists';
+
import ColumnLink from './column_link';
const getOrderedLists = createSelector([state => state.get('lists')], lists => {
diff --git a/app/javascript/mastodon/features/ui/components/media_modal.jsx b/app/javascript/mastodon/features/ui/components/media_modal.jsx
index 1c9cf19e09..fad08b6750 100644
--- a/app/javascript/mastodon/features/ui/components/media_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/media_modal.jsx
@@ -1,17 +1,23 @@
-import ReactSwipeableViews from 'react-swipeable-views';
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import Video from 'mastodon/features/video';
-import classNames from 'classnames';
+
import { defineMessages, injectIntl } from 'react-intl';
-import { IconButton } from 'mastodon/components/icon_button';
+
+import classNames from 'classnames';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import ImageLoader from './image_loader';
-import { Icon } from 'mastodon/components/icon';
-import { GIFV } from 'mastodon/components/gifv';
-import { disableSwiping } from 'mastodon/initial_state';
-import Footer from 'mastodon/features/picture_in_picture/components/footer';
+
+import ReactSwipeableViews from 'react-swipeable-views';
+
import { getAverageFromBlurhash } from 'mastodon/blurhash';
+import { GIFV } from 'mastodon/components/gifv';
+import { Icon } from 'mastodon/components/icon';
+import { IconButton } from 'mastodon/components/icon_button';
+import Footer from 'mastodon/features/picture_in_picture/components/footer';
+import Video from 'mastodon/features/video';
+import { disableSwiping } from 'mastodon/initial_state';
+
+import ImageLoader from './image_loader';
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
diff --git a/app/javascript/mastodon/features/ui/components/modal_root.jsx b/app/javascript/mastodon/features/ui/components/modal_root.jsx
index b1777ad11d..4107c9faae 100644
--- a/app/javascript/mastodon/features/ui/components/modal_root.jsx
+++ b/app/javascript/mastodon/features/ui/components/modal_root.jsx
@@ -1,18 +1,9 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import { getScrollbarWidth } from 'mastodon/utils/scrollbar';
+import { PureComponent } from 'react';
+
+import { Helmet } from 'react-helmet';
+
import Base from 'mastodon/components/modal_root';
-import BundleContainer from '../containers/bundle_container';
-import BundleModalError from './bundle_modal_error';
-import ModalLoading from './modal_loading';
-import ActionsModal from './actions_modal';
-import MediaModal from './media_modal';
-import VideoModal from './video_modal';
-import BoostModal from './boost_modal';
-import AudioModal from './audio_modal';
-import ConfirmationModal from './confirmation_modal';
-import FocalPointModal from './focal_point_modal';
-import ImageModal from './image_modal';
import {
MuteModal,
BlockModal,
@@ -27,7 +18,20 @@ import {
SubscribedLanguagesModal,
ClosedRegistrationsModal,
} from 'mastodon/features/ui/util/async-components';
-import { Helmet } from 'react-helmet';
+import { getScrollbarWidth } from 'mastodon/utils/scrollbar';
+
+import BundleContainer from '../containers/bundle_container';
+
+import ActionsModal from './actions_modal';
+import AudioModal from './audio_modal';
+import BoostModal from './boost_modal';
+import BundleModalError from './bundle_modal_error';
+import ConfirmationModal from './confirmation_modal';
+import FocalPointModal from './focal_point_modal';
+import ImageModal from './image_modal';
+import MediaModal from './media_modal';
+import ModalLoading from './modal_loading';
+import VideoModal from './video_modal';
const MODAL_COMPONENTS = {
'MEDIA': () => Promise.resolve({ default: MediaModal }),
diff --git a/app/javascript/mastodon/features/ui/components/mute_modal.jsx b/app/javascript/mastodon/features/ui/components/mute_modal.jsx
index f43a9b8ede..dd21fa0465 100644
--- a/app/javascript/mastodon/features/ui/components/mute_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/mute_modal.jsx
@@ -1,12 +1,16 @@
-import { PureComponent } from 'react';
-import { connect } from 'react-redux';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+
+import { connect } from 'react-redux';
+
import Toggle from 'react-toggle';
-import Button from '../../../components/button';
-import { closeModal } from '../../../actions/modal';
+
import { muteAccount } from '../../../actions/accounts';
+import { closeModal } from '../../../actions/modal';
import { toggleHideNotifications, changeMuteDuration } from '../../../actions/mutes';
+import Button from '../../../components/button';
const messages = defineMessages({
minutes: { id: 'intervals.full.minutes', defaultMessage: '{number, plural, one {# minute} other {# minutes}}' },
diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx
index e4857093a5..4de6c2ae63 100644
--- a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx
+++ b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx
@@ -1,16 +1,20 @@
-import { Component } from 'react';
import PropTypes from 'prop-types';
+import { Component } from 'react';
+
import { defineMessages, injectIntl } from 'react-intl';
+
import { Link } from 'react-router-dom';
+
import { WordmarkLogo } from 'mastodon/components/logo';
+import NavigationPortal from 'mastodon/components/navigation_portal';
import { timelinePreview, showTrends } from 'mastodon/initial_state';
+
import ColumnLink from './column_link';
import DisabledAccountBanner from './disabled_account_banner';
import FollowRequestsColumnLink from './follow_requests_column_link';
import ListPanel from './list_panel';
import NotificationsCounterIcon from './notifications_counter_icon';
import SignInBanner from './sign_in_banner';
-import NavigationPortal from 'mastodon/components/navigation_portal';
const messages = defineMessages({
home: { id: 'tabs_bar.home', defaultMessage: 'Home' },
diff --git a/app/javascript/mastodon/features/ui/components/notifications_counter_icon.js b/app/javascript/mastodon/features/ui/components/notifications_counter_icon.js
index 7ef251603c..7a9032b984 100644
--- a/app/javascript/mastodon/features/ui/components/notifications_counter_icon.js
+++ b/app/javascript/mastodon/features/ui/components/notifications_counter_icon.js
@@ -1,4 +1,5 @@
import { connect } from 'react-redux';
+
import { IconWithBadge } from 'mastodon/components/icon_with_badge';
const mapStateToProps = state => ({
diff --git a/app/javascript/mastodon/features/ui/components/report_modal.jsx b/app/javascript/mastodon/features/ui/components/report_modal.jsx
index c7909040ed..9958df6180 100644
--- a/app/javascript/mastodon/features/ui/components/report_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/report_modal.jsx
@@ -1,19 +1,22 @@
-import { connect } from 'react-redux';
-import { submitReport } from 'mastodon/actions/reports';
-import { expandAccountTimeline } from 'mastodon/actions/timelines';
-import { fetchServer } from 'mastodon/actions/server';
import PropTypes from 'prop-types';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { makeGetAccount } from 'mastodon/selectors';
+
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
+
import { OrderedSet } from 'immutable';
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+import { connect } from 'react-redux';
+
+import { submitReport } from 'mastodon/actions/reports';
+import { fetchServer } from 'mastodon/actions/server';
+import { expandAccountTimeline } from 'mastodon/actions/timelines';
import { IconButton } from 'mastodon/components/icon_button';
import Category from 'mastodon/features/report/category';
-import Statuses from 'mastodon/features/report/statuses';
-import Rules from 'mastodon/features/report/rules';
import Comment from 'mastodon/features/report/comment';
+import Rules from 'mastodon/features/report/rules';
+import Statuses from 'mastodon/features/report/statuses';
import Thanks from 'mastodon/features/report/thanks';
+import { makeGetAccount } from 'mastodon/selectors';
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
diff --git a/app/javascript/mastodon/features/ui/components/sign_in_banner.jsx b/app/javascript/mastodon/features/ui/components/sign_in_banner.jsx
index 984a574e56..25de95fd37 100644
--- a/app/javascript/mastodon/features/ui/components/sign_in_banner.jsx
+++ b/app/javascript/mastodon/features/ui/components/sign_in_banner.jsx
@@ -1,11 +1,14 @@
import { useCallback } from 'react';
+
import { FormattedMessage } from 'react-intl';
-import { useDispatch } from 'react-redux';
-import { registrationsOpen } from 'mastodon/initial_state';
+
+
import { openModal } from 'mastodon/actions/modal';
+import { registrationsOpen } from 'mastodon/initial_state';
+import { useAppDispatch, useAppSelector } from 'mastodon/store';
const SignInBanner = () => {
- const dispatch = useDispatch();
+ const dispatch = useAppDispatch();
const openClosedRegistrationsModal = useCallback(
() => dispatch(openModal('CLOSED_REGISTRATIONS')),
@@ -14,9 +17,11 @@ const SignInBanner = () => {
let signupButton;
+ const signupUrl = useAppSelector((state) => state.getIn(['server', 'server', 'registrations', 'url'], '/auth/sign_up'));
+
if (registrationsOpen) {
signupButton = (
-
+
);
diff --git a/app/javascript/mastodon/features/ui/components/upload_area.jsx b/app/javascript/mastodon/features/ui/components/upload_area.jsx
index 64df8fbf7d..b2702d35ef 100644
--- a/app/javascript/mastodon/features/ui/components/upload_area.jsx
+++ b/app/javascript/mastodon/features/ui/components/upload_area.jsx
@@ -1,9 +1,12 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import Motion from '../util/optional_motion';
-import spring from 'react-motion/lib/spring';
+import { PureComponent } from 'react';
+
import { FormattedMessage } from 'react-intl';
+import spring from 'react-motion/lib/spring';
+
+import Motion from '../util/optional_motion';
+
export default class UploadArea extends PureComponent {
static propTypes = {
diff --git a/app/javascript/mastodon/features/ui/components/video_modal.jsx b/app/javascript/mastodon/features/ui/components/video_modal.jsx
index ffc863530d..2cc88c0432 100644
--- a/app/javascript/mastodon/features/ui/components/video_modal.jsx
+++ b/app/javascript/mastodon/features/ui/components/video_modal.jsx
@@ -1,10 +1,12 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import Video from 'mastodon/features/video';
-import { connect } from 'react-redux';
+
+import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import Footer from 'mastodon/features/picture_in_picture/components/footer';
+import { connect } from 'react-redux';
+
import { getAverageFromBlurhash } from 'mastodon/blurhash';
+import Footer from 'mastodon/features/picture_in_picture/components/footer';
+import Video from 'mastodon/features/video';
const mapStateToProps = (state, { statusId }) => ({
language: state.getIn(['statuses', statusId, 'language']),
diff --git a/app/javascript/mastodon/features/ui/components/zoomable_image.jsx b/app/javascript/mastodon/features/ui/components/zoomable_image.jsx
index 47d8b63ed0..f2cada3f6a 100644
--- a/app/javascript/mastodon/features/ui/components/zoomable_image.jsx
+++ b/app/javascript/mastodon/features/ui/components/zoomable_image.jsx
@@ -1,8 +1,10 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
-import { IconButton } from 'mastodon/components/icon_button';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl } from 'react-intl';
+import { IconButton } from 'mastodon/components/icon_button';
+
const messages = defineMessages({
compress: { id: 'lightbox.compress', defaultMessage: 'Compress image view box' },
expand: { id: 'lightbox.expand', defaultMessage: 'Expand image view box' },
diff --git a/app/javascript/mastodon/features/ui/containers/bundle_container.js b/app/javascript/mastodon/features/ui/containers/bundle_container.js
index 7e3f0c3a6b..6a476fe248 100644
--- a/app/javascript/mastodon/features/ui/containers/bundle_container.js
+++ b/app/javascript/mastodon/features/ui/containers/bundle_container.js
@@ -1,8 +1,7 @@
import { connect } from 'react-redux';
-import Bundle from '../components/bundle';
-
import { fetchBundleRequest, fetchBundleSuccess, fetchBundleFail } from '../../../actions/bundles';
+import Bundle from '../components/bundle';
const mapDispatchToProps = dispatch => ({
onFetch () {
diff --git a/app/javascript/mastodon/features/ui/containers/columns_area_container.js b/app/javascript/mastodon/features/ui/containers/columns_area_container.js
index 42b9e48247..f8473d38ba 100644
--- a/app/javascript/mastodon/features/ui/containers/columns_area_container.js
+++ b/app/javascript/mastodon/features/ui/containers/columns_area_container.js
@@ -1,4 +1,5 @@
import { connect } from 'react-redux';
+
import ColumnsArea from '../components/columns_area';
const mapStateToProps = state => ({
diff --git a/app/javascript/mastodon/features/ui/containers/loading_bar_container.js b/app/javascript/mastodon/features/ui/containers/loading_bar_container.js
index 63e994f927..7efdac55ee 100644
--- a/app/javascript/mastodon/features/ui/containers/loading_bar_container.js
+++ b/app/javascript/mastodon/features/ui/containers/loading_bar_container.js
@@ -1,4 +1,5 @@
import { connect } from 'react-redux';
+
import LoadingBar from 'react-redux-loading-bar';
const mapStateToProps = (state, ownProps) => ({
diff --git a/app/javascript/mastodon/features/ui/containers/modal_container.js b/app/javascript/mastodon/features/ui/containers/modal_container.js
index 35be262221..b14d0410d1 100644
--- a/app/javascript/mastodon/features/ui/containers/modal_container.js
+++ b/app/javascript/mastodon/features/ui/containers/modal_container.js
@@ -1,4 +1,5 @@
import { connect } from 'react-redux';
+
import { openModal, closeModal } from '../../../actions/modal';
import ModalRoot from '../components/modal_root';
diff --git a/app/javascript/mastodon/features/ui/containers/notifications_container.js b/app/javascript/mastodon/features/ui/containers/notifications_container.js
index 3819da3d85..c1d19f7100 100644
--- a/app/javascript/mastodon/features/ui/containers/notifications_container.js
+++ b/app/javascript/mastodon/features/ui/containers/notifications_container.js
@@ -1,6 +1,9 @@
import { injectIntl } from 'react-intl';
+
import { connect } from 'react-redux';
+
import { NotificationStack } from 'react-notification';
+
import { dismissAlert } from '../../../actions/alerts';
import { getAlerts } from '../../../selectors';
diff --git a/app/javascript/mastodon/features/ui/containers/status_list_container.js b/app/javascript/mastodon/features/ui/containers/status_list_container.js
index 8e97460c4b..36a8f58f8b 100644
--- a/app/javascript/mastodon/features/ui/containers/status_list_container.js
+++ b/app/javascript/mastodon/features/ui/containers/status_list_container.js
@@ -1,9 +1,11 @@
-import { connect } from 'react-redux';
-import StatusList from '../../../components/status_list';
-import { scrollTopTimeline, loadPending } from '../../../actions/timelines';
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+import { connect } from 'react-redux';
import { createSelector } from 'reselect';
+
import { debounce } from 'lodash';
+
+import { scrollTopTimeline, loadPending } from '../../../actions/timelines';
+import StatusList from '../../../components/status_list';
import { me } from '../../../initial_state';
const makeGetStatusIds = (pending = false) => createSelector([
diff --git a/app/javascript/mastodon/features/ui/index.jsx b/app/javascript/mastodon/features/ui/index.jsx
index edf039dcb2..8528bca4ae 100644
--- a/app/javascript/mastodon/features/ui/index.jsx
+++ b/app/javascript/mastodon/features/ui/index.jsx
@@ -1,27 +1,36 @@
-import classNames from 'classnames';
-import { PureComponent } from 'react';
-import { HotKeys } from 'react-hotkeys';
-import { defineMessages, injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
-import { Redirect, Route, withRouter } from 'react-router-dom';
import PropTypes from 'prop-types';
-import NotificationsContainer from './containers/notifications_container';
-import LoadingBarContainer from './containers/loading_bar_container';
-import ModalContainer from './containers/modal_container';
-import { layoutFromWindow } from 'mastodon/is_mobile';
+import { PureComponent } from 'react';
+
+import { defineMessages, injectIntl } from 'react-intl';
+
+import classNames from 'classnames';
+import { Redirect, Route, withRouter } from 'react-router-dom';
+
+import { connect } from 'react-redux';
+
import { debounce } from 'lodash';
-import { uploadCompose, resetCompose, changeComposeSpoilerness } from '../../actions/compose';
-import { expandHomeTimeline } from '../../actions/timelines';
-import { expandNotifications } from '../../actions/notifications';
-import { fetchServer, fetchServerTranslationLanguages } from '../../actions/server';
-import { clearHeight } from '../../actions/height_cache';
+import { HotKeys } from 'react-hotkeys';
+
import { focusApp, unfocusApp, changeLayout } from 'mastodon/actions/app';
import { synchronouslySubmitMarkers, submitMarkers, fetchMarkers } from 'mastodon/actions/markers';
-import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
+import { INTRODUCTION_VERSION } from 'mastodon/actions/onboarding';
+import PictureInPicture from 'mastodon/features/picture_in_picture';
+import { layoutFromWindow } from 'mastodon/is_mobile';
+
+import { uploadCompose, resetCompose, changeComposeSpoilerness } from '../../actions/compose';
+import { clearHeight } from '../../actions/height_cache';
+import { expandNotifications } from '../../actions/notifications';
+import { fetchServer, fetchServerTranslationLanguages } from '../../actions/server';
+import { expandHomeTimeline } from '../../actions/timelines';
+import initialState, { me, owner, singleUserMode, showTrends, trendsAsLanding } from '../../initial_state';
+
import BundleColumnError from './components/bundle_column_error';
+import Header from './components/header';
import UploadArea from './components/upload_area';
import ColumnsAreaContainer from './containers/columns_area_container';
-import PictureInPicture from 'mastodon/features/picture_in_picture';
+import LoadingBarContainer from './containers/loading_bar_container';
+import ModalContainer from './containers/modal_container';
+import NotificationsContainer from './containers/notifications_container';
import {
Compose,
Status,
@@ -57,9 +66,7 @@ import {
About,
PrivacyPolicy,
} from './util/async-components';
-import initialState, { me, owner, singleUserMode, showTrends, trendsAsLanding } from '../../initial_state';
-import { INTRODUCTION_VERSION } from 'mastodon/actions/onboarding';
-import Header from './components/header';
+import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
// Dummy import, to make sure that ends up in the application bundle.
// Without this it ends up in ~8 very commonly used bundles.
diff --git a/app/javascript/mastodon/features/ui/util/optional_motion.js b/app/javascript/mastodon/features/ui/util/optional_motion.js
index df3a8b54af..0b6d4d97f7 100644
--- a/app/javascript/mastodon/features/ui/util/optional_motion.js
+++ b/app/javascript/mastodon/features/ui/util/optional_motion.js
@@ -1,5 +1,7 @@
-import { reduceMotion } from '../../../initial_state';
-import ReducedMotion from './reduced_motion';
import Motion from 'react-motion/lib/Motion';
+import { reduceMotion } from '../../../initial_state';
+
+import ReducedMotion from './reduced_motion';
+
export default reduceMotion ? ReducedMotion : Motion;
diff --git a/app/javascript/mastodon/features/ui/util/react_router_helpers.jsx b/app/javascript/mastodon/features/ui/util/react_router_helpers.jsx
index 64aad000ac..66cfee9708 100644
--- a/app/javascript/mastodon/features/ui/util/react_router_helpers.jsx
+++ b/app/javascript/mastodon/features/ui/util/react_router_helpers.jsx
@@ -1,9 +1,12 @@
-import { Component, PureComponent, cloneElement, Children } from 'react';
import PropTypes from 'prop-types';
+import { Component, PureComponent, cloneElement, Children } from 'react';
+
import { Switch, Route } from 'react-router-dom';
+
import StackTrace from 'stacktrace-js';
-import ColumnLoading from '../components/column_loading';
+
import BundleColumnError from '../components/bundle_column_error';
+import ColumnLoading from '../components/column_loading';
import BundleContainer from '../containers/bundle_container';
// Small wrapper to pass multiColumn to the route components
diff --git a/app/javascript/mastodon/features/ui/util/reduced_motion.jsx b/app/javascript/mastodon/features/ui/util/reduced_motion.jsx
index 85ede744c8..fd044497f8 100644
--- a/app/javascript/mastodon/features/ui/util/reduced_motion.jsx
+++ b/app/javascript/mastodon/features/ui/util/reduced_motion.jsx
@@ -1,8 +1,9 @@
// Like react-motion's Motion, but reduces all animations to cross-fades
// for the benefit of users with motion sickness.
-import { Component } from 'react';
-import Motion from 'react-motion/lib/Motion';
import PropTypes from 'prop-types';
+import { Component } from 'react';
+
+import Motion from 'react-motion/lib/Motion';
const stylesToKeep = ['opacity', 'backgroundOpacity'];
diff --git a/app/javascript/mastodon/features/video/index.jsx b/app/javascript/mastodon/features/video/index.jsx
index 81ed457c99..78650d34f8 100644
--- a/app/javascript/mastodon/features/video/index.jsx
+++ b/app/javascript/mastodon/features/video/index.jsx
@@ -1,13 +1,19 @@
-import { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { PureComponent } from 'react';
+
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import { is } from 'immutable';
-import { throttle } from 'lodash';
+
import classNames from 'classnames';
-import { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen';
-import { displayMedia, useBlurhash } from '../../initial_state';
-import { Icon } from 'mastodon/components/icon';
+
+import { is } from 'immutable';
+
+import { throttle } from 'lodash';
+
import { Blurhash } from 'mastodon/components/blurhash';
+import { Icon } from 'mastodon/components/icon';
+
+import { displayMedia, useBlurhash } from '../../initial_state';
+import { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen';
const messages = defineMessages({
play: { id: 'video.play', defaultMessage: 'Play' },
diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json
index c64a970ead..d446989ab6 100644
--- a/app/javascript/mastodon/locales/defaultMessages.json
+++ b/app/javascript/mastodon/locales/defaultMessages.json
@@ -57,7 +57,7 @@
"id": "account.unfollow"
},
{
- "defaultMessage": "Awaiting approval",
+ "defaultMessage": "Awaiting approval. Click to cancel follow request",
"id": "account.requested"
},
{
@@ -721,7 +721,7 @@
"id": "privacy.unlisted.short"
},
{
- "defaultMessage": "Followers-only",
+ "defaultMessage": "Followers only",
"id": "privacy.private.short"
},
{
@@ -792,7 +792,7 @@
"id": "confirmations.domain_block.confirm"
},
{
- "defaultMessage": "Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.",
+ "defaultMessage": "Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.",
"id": "confirmations.domain_block.message"
}
],
@@ -833,7 +833,7 @@
"id": "confirmations.edit.message"
},
{
- "defaultMessage": "Hide entire domain",
+ "defaultMessage": "Block entire domain",
"id": "confirmations.domain_block.confirm"
},
{
@@ -980,7 +980,7 @@
"id": "confirmations.unfollow.confirm"
},
{
- "defaultMessage": "Hide entire domain",
+ "defaultMessage": "Block entire domain",
"id": "confirmations.domain_block.confirm"
},
{
@@ -1412,7 +1412,7 @@
"id": "navigation_bar.blocks"
},
{
- "defaultMessage": "Hidden domains",
+ "defaultMessage": "Blocked domains",
"id": "navigation_bar.domain_blocks"
},
{
@@ -2430,7 +2430,7 @@
"id": "navigation_bar.blocks"
},
{
- "defaultMessage": "Hidden domains",
+ "defaultMessage": "Blocked domains",
"id": "navigation_bar.domain_blocks"
},
{
@@ -3535,7 +3535,7 @@
"id": "privacy.unlisted.short"
},
{
- "defaultMessage": "Followers-only",
+ "defaultMessage": "Followers only",
"id": "privacy.private.short"
},
{
@@ -3743,7 +3743,7 @@
"id": "status.admin_account"
},
{
- "defaultMessage": "Open this status in the moderation interface",
+ "defaultMessage": "Open this post in the moderation interface",
"id": "status.admin_status"
},
{
@@ -3751,7 +3751,7 @@
"id": "status.admin_domain"
},
{
- "defaultMessage": "Copy link to status",
+ "defaultMessage": "Copy link to post",
"id": "status.copy"
},
{
@@ -3797,11 +3797,11 @@
"id": "privacy.unlisted.short"
},
{
- "defaultMessage": "Followers-only",
+ "defaultMessage": "Followers only",
"id": "privacy.private.short"
},
{
- "defaultMessage": "Direct",
+ "defaultMessage": "Mentioned people only",
"id": "privacy.direct.short"
},
{
@@ -3854,7 +3854,7 @@
"id": "confirmations.reply.message"
},
{
- "defaultMessage": "Hide entire domain",
+ "defaultMessage": "Block entire domain",
"id": "confirmations.domain_block.confirm"
},
{
@@ -3925,11 +3925,11 @@
"id": "privacy.unlisted.short"
},
{
- "defaultMessage": "Followers-only",
+ "defaultMessage": "Followers only",
"id": "privacy.private.short"
},
{
- "defaultMessage": "Direct",
+ "defaultMessage": "Mentioned people only",
"id": "privacy.direct.short"
},
{
diff --git a/app/javascript/mastodon/main.jsx b/app/javascript/mastodon/main.jsx
index 8f45e18f72..f826036318 100644
--- a/app/javascript/mastodon/main.jsx
+++ b/app/javascript/mastodon/main.jsx
@@ -1,10 +1,11 @@
import { createRoot } from 'react-dom/client';
+
import { setupBrowserNotifications } from 'mastodon/actions/notifications';
import Mastodon from 'mastodon/containers/mastodon';
-import { store } from 'mastodon/store';
import { me } from 'mastodon/initial_state';
-import ready from 'mastodon/ready';
import * as perf from 'mastodon/performance';
+import ready from 'mastodon/ready';
+import { store } from 'mastodon/store';
/**
* @returns {Promise}
diff --git a/app/javascript/mastodon/reducers/accounts.js b/app/javascript/mastodon/reducers/accounts.js
index 44973e9395..76122cc63b 100644
--- a/app/javascript/mastodon/reducers/accounts.js
+++ b/app/javascript/mastodon/reducers/accounts.js
@@ -1,7 +1,8 @@
-import { ACCOUNT_IMPORT, ACCOUNTS_IMPORT } from 'mastodon/actions/importer';
-import { ACCOUNT_REVEAL } from 'mastodon/actions/accounts';
import { Map as ImmutableMap, fromJS } from 'immutable';
+import { ACCOUNT_REVEAL } from 'mastodon/actions/accounts';
+import { ACCOUNT_IMPORT, ACCOUNTS_IMPORT } from 'mastodon/actions/importer';
+
const initialState = ImmutableMap();
const normalizeAccount = (state, account) => {
diff --git a/app/javascript/mastodon/reducers/accounts_counters.js b/app/javascript/mastodon/reducers/accounts_counters.js
index 640b2a889f..eb7878deb9 100644
--- a/app/javascript/mastodon/reducers/accounts_counters.js
+++ b/app/javascript/mastodon/reducers/accounts_counters.js
@@ -1,10 +1,12 @@
+import { Map as ImmutableMap, fromJS } from 'immutable';
+
+import { me } from 'mastodon/initial_state';
+
import {
ACCOUNT_FOLLOW_SUCCESS,
ACCOUNT_UNFOLLOW_SUCCESS,
} from '../actions/accounts';
import { ACCOUNT_IMPORT, ACCOUNTS_IMPORT } from '../actions/importer';
-import { Map as ImmutableMap, fromJS } from 'immutable';
-import { me } from 'mastodon/initial_state';
const normalizeAccount = (state, account) => state.set(account.id, fromJS({
followers_count: account.followers_count,
diff --git a/app/javascript/mastodon/reducers/accounts_map.js b/app/javascript/mastodon/reducers/accounts_map.js
index 8412ad4d0c..fca0e3ce1e 100644
--- a/app/javascript/mastodon/reducers/accounts_map.js
+++ b/app/javascript/mastodon/reducers/accounts_map.js
@@ -1,7 +1,8 @@
-import { ACCOUNT_IMPORT, ACCOUNTS_IMPORT } from '../actions/importer';
-import { ACCOUNT_LOOKUP_FAIL } from '../actions/accounts';
import { Map as ImmutableMap } from 'immutable';
+import { ACCOUNT_LOOKUP_FAIL } from '../actions/accounts';
+import { ACCOUNT_IMPORT, ACCOUNTS_IMPORT } from '../actions/importer';
+
export const normalizeForLookup = str => str.toLowerCase();
const initialState = ImmutableMap();
diff --git a/app/javascript/mastodon/reducers/alerts.js b/app/javascript/mastodon/reducers/alerts.js
index 5b3010a599..bd49d748f9 100644
--- a/app/javascript/mastodon/reducers/alerts.js
+++ b/app/javascript/mastodon/reducers/alerts.js
@@ -1,9 +1,10 @@
+import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
import {
ALERT_SHOW,
ALERT_DISMISS,
ALERT_CLEAR,
} from '../actions/alerts';
-import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
const initialState = ImmutableList([]);
diff --git a/app/javascript/mastodon/reducers/announcements.js b/app/javascript/mastodon/reducers/announcements.js
index b53f93a4a9..2134b04c6d 100644
--- a/app/javascript/mastodon/reducers/announcements.js
+++ b/app/javascript/mastodon/reducers/announcements.js
@@ -1,3 +1,5 @@
+import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
+
import {
ANNOUNCEMENTS_FETCH_REQUEST,
ANNOUNCEMENTS_FETCH_SUCCESS,
@@ -12,7 +14,6 @@ import {
ANNOUNCEMENTS_DELETE,
ANNOUNCEMENTS_DISMISS_SUCCESS,
} from '../actions/announcements';
-import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
const initialState = ImmutableMap({
items: ImmutableList(),
diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js
index c24b899a9a..ebb046da89 100644
--- a/app/javascript/mastodon/reducers/compose.js
+++ b/app/javascript/mastodon/reducers/compose.js
@@ -1,3 +1,5 @@
+import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
+
import {
COMPOSE_MOUNT,
COMPOSE_UNMOUNT,
@@ -51,13 +53,12 @@ import {
COMPOSE_SEARCHABILITY_CHANGE,
COMPOSE_FOCUS,
} from '../actions/compose';
-import { TIMELINE_DELETE } from '../actions/timelines';
-import { STORE_HYDRATE } from '../actions/store';
import { REDRAFT } from '../actions/statuses';
-import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
-import { uuid } from '../uuid';
+import { STORE_HYDRATE } from '../actions/store';
+import { TIMELINE_DELETE } from '../actions/timelines';
import { me } from '../initial_state';
import { unescapeHTML } from '../utils/html';
+import { uuid } from '../uuid';
const initialState = ImmutableMap({
mounted: 0,
diff --git a/app/javascript/mastodon/reducers/contexts.js b/app/javascript/mastodon/reducers/contexts.js
index 8772e175ea..32e194dd42 100644
--- a/app/javascript/mastodon/reducers/contexts.js
+++ b/app/javascript/mastodon/reducers/contexts.js
@@ -1,10 +1,11 @@
+import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
import {
ACCOUNT_BLOCK_SUCCESS,
ACCOUNT_MUTE_SUCCESS,
} from '../actions/accounts';
import { CONTEXT_FETCH_SUCCESS } from '../actions/statuses';
import { TIMELINE_DELETE, TIMELINE_UPDATE } from '../actions/timelines';
-import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import { compareId } from '../compare_id';
const initialState = ImmutableMap({
diff --git a/app/javascript/mastodon/reducers/conversations.js b/app/javascript/mastodon/reducers/conversations.js
index 942c6941b6..247e8a5977 100644
--- a/app/javascript/mastodon/reducers/conversations.js
+++ b/app/javascript/mastodon/reducers/conversations.js
@@ -1,4 +1,8 @@
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
+import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'mastodon/actions/accounts';
+import { DOMAIN_BLOCK_SUCCESS } from 'mastodon/actions/domain_blocks';
+
import {
CONVERSATIONS_MOUNT,
CONVERSATIONS_UNMOUNT,
@@ -9,8 +13,6 @@ import {
CONVERSATIONS_READ,
CONVERSATIONS_DELETE_SUCCESS,
} from '../actions/conversations';
-import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'mastodon/actions/accounts';
-import { DOMAIN_BLOCK_SUCCESS } from 'mastodon/actions/domain_blocks';
import { compareId } from '../compare_id';
const initialState = ImmutableMap({
diff --git a/app/javascript/mastodon/reducers/custom_emojis.js b/app/javascript/mastodon/reducers/custom_emojis.js
index 0338c2e532..56ec80f2ff 100644
--- a/app/javascript/mastodon/reducers/custom_emojis.js
+++ b/app/javascript/mastodon/reducers/custom_emojis.js
@@ -1,7 +1,8 @@
import { List as ImmutableList, fromJS as ConvertToImmutable } from 'immutable';
+
import { CUSTOM_EMOJIS_FETCH_SUCCESS } from '../actions/custom_emojis';
-import { search as emojiSearch } from '../features/emoji/emoji_mart_search_light';
import { buildCustomEmojis } from '../features/emoji/emoji';
+import { search as emojiSearch } from '../features/emoji/emoji_mart_search_light';
const initialState = ImmutableList([]);
diff --git a/app/javascript/mastodon/reducers/domain_lists.js b/app/javascript/mastodon/reducers/domain_lists.js
index 6bf8cee681..8cdd3ba376 100644
--- a/app/javascript/mastodon/reducers/domain_lists.js
+++ b/app/javascript/mastodon/reducers/domain_lists.js
@@ -1,9 +1,10 @@
+import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutable';
+
import {
DOMAIN_BLOCKS_FETCH_SUCCESS,
DOMAIN_BLOCKS_EXPAND_SUCCESS,
DOMAIN_UNBLOCK_SUCCESS,
} from '../actions/domain_blocks';
-import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutable';
const initialState = ImmutableMap({
blocks: ImmutableMap({
diff --git a/app/javascript/mastodon/reducers/dropdown_menu.js b/app/javascript/mastodon/reducers/dropdown_menu.js
index 51bf9375bf..6f92f1bbe8 100644
--- a/app/javascript/mastodon/reducers/dropdown_menu.js
+++ b/app/javascript/mastodon/reducers/dropdown_menu.js
@@ -1,4 +1,5 @@
import Immutable from 'immutable';
+
import {
DROPDOWN_MENU_OPEN,
DROPDOWN_MENU_CLOSE,
diff --git a/app/javascript/mastodon/reducers/filters.js b/app/javascript/mastodon/reducers/filters.js
index e1f0140465..566ad0c6ca 100644
--- a/app/javascript/mastodon/reducers/filters.js
+++ b/app/javascript/mastodon/reducers/filters.js
@@ -1,7 +1,8 @@
-import { FILTERS_IMPORT } from '../actions/importer';
-import { FILTERS_FETCH_SUCCESS, FILTERS_CREATE_SUCCESS } from '../actions/filters';
import { Map as ImmutableMap, is, fromJS } from 'immutable';
+import { FILTERS_FETCH_SUCCESS, FILTERS_CREATE_SUCCESS } from '../actions/filters';
+import { FILTERS_IMPORT } from '../actions/importer';
+
const normalizeFilter = (state, filter) => {
const normalizedFilter = fromJS({
id: filter.id,
diff --git a/app/javascript/mastodon/reducers/followed_tags.js b/app/javascript/mastodon/reducers/followed_tags.js
index da20b7b12e..afea8e3b35 100644
--- a/app/javascript/mastodon/reducers/followed_tags.js
+++ b/app/javascript/mastodon/reducers/followed_tags.js
@@ -1,3 +1,5 @@
+import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
+
import {
FOLLOWED_HASHTAGS_FETCH_REQUEST,
FOLLOWED_HASHTAGS_FETCH_SUCCESS,
@@ -6,7 +8,6 @@ import {
FOLLOWED_HASHTAGS_EXPAND_SUCCESS,
FOLLOWED_HASHTAGS_EXPAND_FAIL,
} from 'mastodon/actions/tags';
-import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
const initialState = ImmutableMap({
items: ImmutableList(),
diff --git a/app/javascript/mastodon/reducers/height_cache.js b/app/javascript/mastodon/reducers/height_cache.js
index 77a59c8c56..2664d4f824 100644
--- a/app/javascript/mastodon/reducers/height_cache.js
+++ b/app/javascript/mastodon/reducers/height_cache.js
@@ -1,4 +1,5 @@
import { Map as ImmutableMap } from 'immutable';
+
import { HEIGHT_CACHE_SET, HEIGHT_CACHE_CLEAR } from '../actions/height_cache';
const initialState = ImmutableMap();
diff --git a/app/javascript/mastodon/reducers/history.js b/app/javascript/mastodon/reducers/history.js
index 00b01aa6e7..a0f868b1d1 100644
--- a/app/javascript/mastodon/reducers/history.js
+++ b/app/javascript/mastodon/reducers/history.js
@@ -1,6 +1,7 @@
-import { HISTORY_FETCH_REQUEST, HISTORY_FETCH_SUCCESS, HISTORY_FETCH_FAIL } from 'mastodon/actions/history';
import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
+import { HISTORY_FETCH_REQUEST, HISTORY_FETCH_SUCCESS, HISTORY_FETCH_FAIL } from 'mastodon/actions/history';
+
const initialHistory = ImmutableMap({
loading: false,
items: ImmutableList(),
diff --git a/app/javascript/mastodon/reducers/list_adder.js b/app/javascript/mastodon/reducers/list_adder.js
index b144610a52..0f61273aa6 100644
--- a/app/javascript/mastodon/reducers/list_adder.js
+++ b/app/javascript/mastodon/reducers/list_adder.js
@@ -1,4 +1,5 @@
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
import {
LIST_ADDER_RESET,
LIST_ADDER_SETUP,
diff --git a/app/javascript/mastodon/reducers/list_editor.js b/app/javascript/mastodon/reducers/list_editor.js
index 6e020dbe64..ceceb27c7a 100644
--- a/app/javascript/mastodon/reducers/list_editor.js
+++ b/app/javascript/mastodon/reducers/list_editor.js
@@ -1,4 +1,5 @@
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
import {
LIST_CREATE_REQUEST,
LIST_CREATE_FAIL,
diff --git a/app/javascript/mastodon/reducers/lists.js b/app/javascript/mastodon/reducers/lists.js
index ba3e2b3cb5..2a797772b3 100644
--- a/app/javascript/mastodon/reducers/lists.js
+++ b/app/javascript/mastodon/reducers/lists.js
@@ -1,3 +1,5 @@
+import { Map as ImmutableMap, fromJS } from 'immutable';
+
import {
LIST_FETCH_SUCCESS,
LIST_FETCH_FAIL,
@@ -6,7 +8,6 @@ import {
LIST_UPDATE_SUCCESS,
LIST_DELETE_SUCCESS,
} from '../actions/lists';
-import { Map as ImmutableMap, fromJS } from 'immutable';
const initialState = ImmutableMap();
diff --git a/app/javascript/mastodon/reducers/markers.js b/app/javascript/mastodon/reducers/markers.js
index 3e8b1780a7..c7c5d99f61 100644
--- a/app/javascript/mastodon/reducers/markers.js
+++ b/app/javascript/mastodon/reducers/markers.js
@@ -1,8 +1,9 @@
+import { Map as ImmutableMap } from 'immutable';
+
import {
MARKERS_SUBMIT_SUCCESS,
} from '../actions/markers';
-import { Map as ImmutableMap } from 'immutable';
const initialState = ImmutableMap({
home: '0',
diff --git a/app/javascript/mastodon/reducers/media_attachments.js b/app/javascript/mastodon/reducers/media_attachments.js
index 7a155b77fb..cbb4933bc7 100644
--- a/app/javascript/mastodon/reducers/media_attachments.js
+++ b/app/javascript/mastodon/reducers/media_attachments.js
@@ -1,6 +1,7 @@
-import { STORE_HYDRATE } from '../actions/store';
import { Map as ImmutableMap } from 'immutable';
+import { STORE_HYDRATE } from '../actions/store';
+
const initialState = ImmutableMap({
accept_content_types: [],
});
diff --git a/app/javascript/mastodon/reducers/meta.js b/app/javascript/mastodon/reducers/meta.js
index 16ce751aad..96baf2f115 100644
--- a/app/javascript/mastodon/reducers/meta.js
+++ b/app/javascript/mastodon/reducers/meta.js
@@ -1,6 +1,7 @@
-import { STORE_HYDRATE } from 'mastodon/actions/store';
-import { changeLayout } from 'mastodon/actions/app';
import { Map as ImmutableMap } from 'immutable';
+
+import { changeLayout } from 'mastodon/actions/app';
+import { STORE_HYDRATE } from 'mastodon/actions/store';
import { layoutFromWindow } from 'mastodon/is_mobile';
const initialState = ImmutableMap({
diff --git a/app/javascript/mastodon/reducers/modal.js b/app/javascript/mastodon/reducers/modal.js
index edde2f947e..348f538991 100644
--- a/app/javascript/mastodon/reducers/modal.js
+++ b/app/javascript/mastodon/reducers/modal.js
@@ -1,7 +1,8 @@
+import { Stack as ImmutableStack, Map as ImmutableMap } from 'immutable';
+
+import { COMPOSE_UPLOAD_CHANGE_SUCCESS } from '../actions/compose';
import { MODAL_OPEN, MODAL_CLOSE } from '../actions/modal';
import { TIMELINE_DELETE } from '../actions/timelines';
-import { COMPOSE_UPLOAD_CHANGE_SUCCESS } from '../actions/compose';
-import { Stack as ImmutableStack, Map as ImmutableMap } from 'immutable';
const initialState = ImmutableMap({
ignoreFocus: false,
diff --git a/app/javascript/mastodon/reducers/notifications.js b/app/javascript/mastodon/reducers/notifications.js
index 7730a02947..984097ca0f 100644
--- a/app/javascript/mastodon/reducers/notifications.js
+++ b/app/javascript/mastodon/reducers/notifications.js
@@ -1,3 +1,20 @@
+import { fromJS, Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
+import { DOMAIN_BLOCK_SUCCESS } from 'mastodon/actions/domain_blocks';
+
+import {
+ ACCOUNT_BLOCK_SUCCESS,
+ ACCOUNT_MUTE_SUCCESS,
+ FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
+ FOLLOW_REQUEST_REJECT_SUCCESS,
+} from '../actions/accounts';
+import {
+ focusApp,
+ unfocusApp,
+} from '../actions/app';
+import {
+ MARKERS_FETCH_SUCCESS,
+} from '../actions/markers';
import {
NOTIFICATIONS_UPDATE,
NOTIFICATIONS_EXPAND_SUCCESS,
@@ -13,22 +30,7 @@ import {
NOTIFICATIONS_SET_BROWSER_SUPPORT,
NOTIFICATIONS_SET_BROWSER_PERMISSION,
} from '../actions/notifications';
-import {
- ACCOUNT_BLOCK_SUCCESS,
- ACCOUNT_MUTE_SUCCESS,
- FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
- FOLLOW_REQUEST_REJECT_SUCCESS,
-} from '../actions/accounts';
-import {
- MARKERS_FETCH_SUCCESS,
-} from '../actions/markers';
-import {
- focusApp,
- unfocusApp,
-} from '../actions/app';
-import { DOMAIN_BLOCK_SUCCESS } from 'mastodon/actions/domain_blocks';
import { TIMELINE_DELETE, TIMELINE_DISCONNECT } from '../actions/timelines';
-import { fromJS, Map as ImmutableMap, List as ImmutableList } from 'immutable';
import { compareId } from '../compare_id';
const initialState = ImmutableMap({
diff --git a/app/javascript/mastodon/reducers/picture_in_picture.js b/app/javascript/mastodon/reducers/picture_in_picture.js
index 10fbc16958..6824ad9303 100644
--- a/app/javascript/mastodon/reducers/picture_in_picture.js
+++ b/app/javascript/mastodon/reducers/picture_in_picture.js
@@ -1,4 +1,5 @@
import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'mastodon/actions/picture_in_picture';
+
import { TIMELINE_DELETE } from '../actions/timelines';
const initialState = {
diff --git a/app/javascript/mastodon/reducers/polls.js b/app/javascript/mastodon/reducers/polls.js
index 9956cf83f6..901fdc449d 100644
--- a/app/javascript/mastodon/reducers/polls.js
+++ b/app/javascript/mastodon/reducers/polls.js
@@ -1,6 +1,7 @@
-import { POLLS_IMPORT } from 'mastodon/actions/importer';
import { Map as ImmutableMap, fromJS } from 'immutable';
+import { POLLS_IMPORT } from 'mastodon/actions/importer';
+
const importPolls = (state, polls) => state.withMutations(map => polls.forEach(poll => map.set(poll.id, fromJS(poll))));
const initialState = ImmutableMap();
diff --git a/app/javascript/mastodon/reducers/push_notifications.js b/app/javascript/mastodon/reducers/push_notifications.js
index 6a62ecb816..fa8af0e8cc 100644
--- a/app/javascript/mastodon/reducers/push_notifications.js
+++ b/app/javascript/mastodon/reducers/push_notifications.js
@@ -1,7 +1,8 @@
-import { STORE_HYDRATE } from '../actions/store';
-import { SET_BROWSER_SUPPORT, SET_SUBSCRIPTION, CLEAR_SUBSCRIPTION, SET_ALERTS } from '../actions/push_notifications';
import Immutable from 'immutable';
+import { SET_BROWSER_SUPPORT, SET_SUBSCRIPTION, CLEAR_SUBSCRIPTION, SET_ALERTS } from '../actions/push_notifications';
+import { STORE_HYDRATE } from '../actions/store';
+
const initialState = Immutable.Map({
subscription: null,
alerts: new Immutable.Map({
diff --git a/app/javascript/mastodon/reducers/relationships.js b/app/javascript/mastodon/reducers/relationships.js
index a3b01a0f64..d1ccf9ac95 100644
--- a/app/javascript/mastodon/reducers/relationships.js
+++ b/app/javascript/mastodon/reducers/relationships.js
@@ -1,6 +1,8 @@
+import { Map as ImmutableMap, fromJS } from 'immutable';
+
import {
- NOTIFICATIONS_UPDATE,
-} from '../actions/notifications';
+ ACCOUNT_NOTE_SUBMIT_SUCCESS,
+} from '../actions/account_notes';
import {
ACCOUNT_FOLLOW_SUCCESS,
ACCOUNT_FOLLOW_REQUEST,
@@ -23,9 +25,9 @@ import {
DOMAIN_UNBLOCK_SUCCESS,
} from '../actions/domain_blocks';
import {
- ACCOUNT_NOTE_SUBMIT_SUCCESS,
-} from '../actions/account_notes';
-import { Map as ImmutableMap, fromJS } from 'immutable';
+ NOTIFICATIONS_UPDATE,
+} from '../actions/notifications';
+
const normalizeRelationship = (state, relationship) => state.set(relationship.id, fromJS(relationship));
diff --git a/app/javascript/mastodon/reducers/search.js b/app/javascript/mastodon/reducers/search.js
index f56d85542f..dbc3517cf7 100644
--- a/app/javascript/mastodon/reducers/search.js
+++ b/app/javascript/mastodon/reducers/search.js
@@ -1,3 +1,10 @@
+import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
+
+import {
+ COMPOSE_MENTION,
+ COMPOSE_REPLY,
+ COMPOSE_DIRECT,
+} from '../actions/compose';
import {
SEARCH_CHANGE,
SEARCH_CLEAR,
@@ -9,12 +16,6 @@ import {
SEARCH_RESULT_CLICK,
SEARCH_RESULT_FORGET,
} from '../actions/search';
-import {
- COMPOSE_MENTION,
- COMPOSE_REPLY,
- COMPOSE_DIRECT,
-} from '../actions/compose';
-import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
const initialState = ImmutableMap({
value: '',
diff --git a/app/javascript/mastodon/reducers/server.js b/app/javascript/mastodon/reducers/server.js
index 909ab2a661..486314c338 100644
--- a/app/javascript/mastodon/reducers/server.js
+++ b/app/javascript/mastodon/reducers/server.js
@@ -1,3 +1,5 @@
+import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
+
import {
SERVER_FETCH_REQUEST,
SERVER_FETCH_SUCCESS,
@@ -12,7 +14,6 @@ import {
SERVER_DOMAIN_BLOCKS_FETCH_SUCCESS,
SERVER_DOMAIN_BLOCKS_FETCH_FAIL,
} from 'mastodon/actions/server';
-import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
const initialState = ImmutableMap({
server: ImmutableMap({
diff --git a/app/javascript/mastodon/reducers/settings.js b/app/javascript/mastodon/reducers/settings.js
index c8fdf1bc86..3641c00a45 100644
--- a/app/javascript/mastodon/reducers/settings.js
+++ b/app/javascript/mastodon/reducers/settings.js
@@ -1,11 +1,12 @@
-import { SETTING_CHANGE, SETTING_SAVE } from '../actions/settings';
-import { NOTIFICATIONS_FILTER_SET } from '../actions/notifications';
+import { Map as ImmutableMap, fromJS } from 'immutable';
+
import { COLUMN_ADD, COLUMN_REMOVE, COLUMN_MOVE, COLUMN_PARAMS_CHANGE } from '../actions/columns';
-import { STORE_HYDRATE } from '../actions/store';
import { EMOJI_USE } from '../actions/emojis';
import { LANGUAGE_USE } from '../actions/languages';
import { LIST_DELETE_SUCCESS, LIST_FETCH_FAIL } from '../actions/lists';
-import { Map as ImmutableMap, fromJS } from 'immutable';
+import { NOTIFICATIONS_FILTER_SET } from '../actions/notifications';
+import { SETTING_CHANGE, SETTING_SAVE } from '../actions/settings';
+import { STORE_HYDRATE } from '../actions/store';
import { uuid } from '../uuid';
const initialState = ImmutableMap({
diff --git a/app/javascript/mastodon/reducers/status_lists.js b/app/javascript/mastodon/reducers/status_lists.js
index 508637b8be..6786bbf4d7 100644
--- a/app/javascript/mastodon/reducers/status_lists.js
+++ b/app/javascript/mastodon/reducers/status_lists.js
@@ -1,19 +1,9 @@
+import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutable';
+
import {
- FAVOURITED_STATUSES_FETCH_REQUEST,
- FAVOURITED_STATUSES_FETCH_SUCCESS,
- FAVOURITED_STATUSES_FETCH_FAIL,
- FAVOURITED_STATUSES_EXPAND_REQUEST,
- FAVOURITED_STATUSES_EXPAND_SUCCESS,
- FAVOURITED_STATUSES_EXPAND_FAIL,
-} from '../actions/favourites';
-import {
- EMOJI_REACTED_STATUSES_FETCH_REQUEST,
- EMOJI_REACTED_STATUSES_FETCH_SUCCESS,
- EMOJI_REACTED_STATUSES_FETCH_FAIL,
- EMOJI_REACTED_STATUSES_EXPAND_REQUEST,
- EMOJI_REACTED_STATUSES_EXPAND_SUCCESS,
- EMOJI_REACTED_STATUSES_EXPAND_FAIL,
-} from '../actions/emoji_reactions';
+ ACCOUNT_BLOCK_SUCCESS,
+ ACCOUNT_MUTE_SUCCESS,
+} from '../actions/accounts';
import {
BOOKMARKED_STATUSES_FETCH_REQUEST,
BOOKMARKED_STATUSES_FETCH_SUCCESS,
@@ -23,17 +13,21 @@ import {
BOOKMARKED_STATUSES_EXPAND_FAIL,
} from '../actions/bookmarks';
import {
- PINNED_STATUSES_FETCH_SUCCESS,
-} from '../actions/pin_statuses';
+ EMOJI_REACTED_STATUSES_FETCH_REQUEST,
+ EMOJI_REACTED_STATUSES_FETCH_SUCCESS,
+ EMOJI_REACTED_STATUSES_FETCH_FAIL,
+ EMOJI_REACTED_STATUSES_EXPAND_REQUEST,
+ EMOJI_REACTED_STATUSES_EXPAND_SUCCESS,
+ EMOJI_REACTED_STATUSES_EXPAND_FAIL,
+} from '../actions/emoji_reactions';
import {
- TRENDS_STATUSES_FETCH_REQUEST,
- TRENDS_STATUSES_FETCH_SUCCESS,
- TRENDS_STATUSES_FETCH_FAIL,
- TRENDS_STATUSES_EXPAND_REQUEST,
- TRENDS_STATUSES_EXPAND_SUCCESS,
- TRENDS_STATUSES_EXPAND_FAIL,
-} from '../actions/trends';
-import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutable';
+ FAVOURITED_STATUSES_FETCH_REQUEST,
+ FAVOURITED_STATUSES_FETCH_SUCCESS,
+ FAVOURITED_STATUSES_FETCH_FAIL,
+ FAVOURITED_STATUSES_EXPAND_REQUEST,
+ FAVOURITED_STATUSES_EXPAND_SUCCESS,
+ FAVOURITED_STATUSES_EXPAND_FAIL,
+} from '../actions/favourites';
import {
FAVOURITE_SUCCESS,
UNFAVOURITE_SUCCESS,
@@ -45,9 +39,18 @@ import {
UNPIN_SUCCESS,
} from '../actions/interactions';
import {
- ACCOUNT_BLOCK_SUCCESS,
- ACCOUNT_MUTE_SUCCESS,
-} from '../actions/accounts';
+ PINNED_STATUSES_FETCH_SUCCESS,
+} from '../actions/pin_statuses';
+import {
+ TRENDS_STATUSES_FETCH_REQUEST,
+ TRENDS_STATUSES_FETCH_SUCCESS,
+ TRENDS_STATUSES_FETCH_FAIL,
+ TRENDS_STATUSES_EXPAND_REQUEST,
+ TRENDS_STATUSES_EXPAND_SUCCESS,
+ TRENDS_STATUSES_EXPAND_FAIL,
+} from '../actions/trends';
+
+
const initialState = ImmutableMap({
favourites: ImmutableMap({
diff --git a/app/javascript/mastodon/reducers/statuses.js b/app/javascript/mastodon/reducers/statuses.js
index 28c760f9a0..2b2d2c4622 100644
--- a/app/javascript/mastodon/reducers/statuses.js
+++ b/app/javascript/mastodon/reducers/statuses.js
@@ -1,3 +1,6 @@
+import { Map as ImmutableMap, ImmutableList, fromJS } from 'immutable';
+
+import { STATUS_IMPORT, STATUSES_IMPORT } from '../actions/importer';
import {
REBLOG_REQUEST,
REBLOG_FAIL,
@@ -20,8 +23,6 @@ import {
STATUS_EMOJI_REACTION_UPDATE,
} from '../actions/statuses';
import { TIMELINE_DELETE } from '../actions/timelines';
-import { STATUS_IMPORT, STATUSES_IMPORT } from '../actions/importer';
-import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
const importStatus = (state, status) => state.set(status.id, fromJS(status));
diff --git a/app/javascript/mastodon/reducers/suggestions.js b/app/javascript/mastodon/reducers/suggestions.js
index 0b4bc77899..ce1bcc7740 100644
--- a/app/javascript/mastodon/reducers/suggestions.js
+++ b/app/javascript/mastodon/reducers/suggestions.js
@@ -1,12 +1,15 @@
+import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
+
+import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'mastodon/actions/accounts';
+import { DOMAIN_BLOCK_SUCCESS } from 'mastodon/actions/domain_blocks';
+
import {
SUGGESTIONS_FETCH_REQUEST,
SUGGESTIONS_FETCH_SUCCESS,
SUGGESTIONS_FETCH_FAIL,
SUGGESTIONS_DISMISS,
} from '../actions/suggestions';
-import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'mastodon/actions/accounts';
-import { DOMAIN_BLOCK_SUCCESS } from 'mastodon/actions/domain_blocks';
-import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
+
const initialState = ImmutableMap({
items: ImmutableList(),
diff --git a/app/javascript/mastodon/reducers/tags.js b/app/javascript/mastodon/reducers/tags.js
index ea73af452a..23a1ae82b5 100644
--- a/app/javascript/mastodon/reducers/tags.js
+++ b/app/javascript/mastodon/reducers/tags.js
@@ -1,3 +1,5 @@
+import { Map as ImmutableMap, fromJS } from 'immutable';
+
import {
HASHTAG_FETCH_SUCCESS,
HASHTAG_FOLLOW_REQUEST,
@@ -5,7 +7,6 @@ import {
HASHTAG_UNFOLLOW_REQUEST,
HASHTAG_UNFOLLOW_FAIL,
} from 'mastodon/actions/tags';
-import { Map as ImmutableMap, fromJS } from 'immutable';
const initialState = ImmutableMap();
diff --git a/app/javascript/mastodon/reducers/timelines.js b/app/javascript/mastodon/reducers/timelines.js
index 41892ae462..cb3da50727 100644
--- a/app/javascript/mastodon/reducers/timelines.js
+++ b/app/javascript/mastodon/reducers/timelines.js
@@ -1,3 +1,10 @@
+import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
+
+import {
+ ACCOUNT_BLOCK_SUCCESS,
+ ACCOUNT_MUTE_SUCCESS,
+ ACCOUNT_UNFOLLOW_SUCCESS,
+} from '../actions/accounts';
import {
TIMELINE_UPDATE,
TIMELINE_DELETE,
@@ -11,12 +18,6 @@ import {
TIMELINE_LOAD_PENDING,
TIMELINE_MARK_AS_PARTIAL,
} from '../actions/timelines';
-import {
- ACCOUNT_BLOCK_SUCCESS,
- ACCOUNT_MUTE_SUCCESS,
- ACCOUNT_UNFOLLOW_SUCCESS,
-} from '../actions/accounts';
-import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
import { compareId } from '../compare_id';
const initialState = ImmutableMap();
diff --git a/app/javascript/mastodon/reducers/trends.js b/app/javascript/mastodon/reducers/trends.js
index 3d5f6ecd67..819e9152fb 100644
--- a/app/javascript/mastodon/reducers/trends.js
+++ b/app/javascript/mastodon/reducers/trends.js
@@ -1,3 +1,5 @@
+import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
+
import {
TRENDS_TAGS_FETCH_REQUEST,
TRENDS_TAGS_FETCH_SUCCESS,
@@ -6,7 +8,6 @@ import {
TRENDS_LINKS_FETCH_SUCCESS,
TRENDS_LINKS_FETCH_FAIL,
} from 'mastodon/actions/trends';
-import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
const initialState = ImmutableMap({
tags: ImmutableMap({
diff --git a/app/javascript/mastodon/reducers/user_lists.js b/app/javascript/mastodon/reducers/user_lists.js
index 86f95bed1b..e731b619c0 100644
--- a/app/javascript/mastodon/reducers/user_lists.js
+++ b/app/javascript/mastodon/reducers/user_lists.js
@@ -1,6 +1,19 @@
+import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
+
import {
- NOTIFICATIONS_UPDATE,
-} from '../actions/notifications';
+ DIRECTORY_FETCH_REQUEST,
+ DIRECTORY_FETCH_SUCCESS,
+ DIRECTORY_FETCH_FAIL,
+ DIRECTORY_EXPAND_REQUEST,
+ DIRECTORY_EXPAND_SUCCESS,
+ DIRECTORY_EXPAND_FAIL,
+} from 'mastodon/actions/directory';
+import {
+ FEATURED_TAGS_FETCH_REQUEST,
+ FEATURED_TAGS_FETCH_SUCCESS,
+ FEATURED_TAGS_FETCH_FAIL,
+} from 'mastodon/actions/featured_tags';
+
import {
FOLLOWERS_FETCH_REQUEST,
FOLLOWERS_FETCH_SUCCESS,
@@ -23,11 +36,6 @@ import {
FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
FOLLOW_REQUEST_REJECT_SUCCESS,
} from '../actions/accounts';
-import {
- REBLOGS_FETCH_SUCCESS,
- FAVOURITES_FETCH_SUCCESS,
- EMOJI_REACTIONS_FETCH_SUCCESS,
-} from '../actions/interactions';
import {
BLOCKS_FETCH_REQUEST,
BLOCKS_FETCH_SUCCESS,
@@ -36,6 +44,11 @@ import {
BLOCKS_EXPAND_SUCCESS,
BLOCKS_EXPAND_FAIL,
} from '../actions/blocks';
+import {
+ REBLOGS_FETCH_SUCCESS,
+ FAVOURITES_FETCH_SUCCESS,
+ EMOJI_REACTIONS_FETCH_SUCCESS,
+} from '../actions/interactions';
import {
MUTES_FETCH_REQUEST,
MUTES_FETCH_SUCCESS,
@@ -45,19 +58,10 @@ import {
MUTES_EXPAND_FAIL,
} from '../actions/mutes';
import {
- DIRECTORY_FETCH_REQUEST,
- DIRECTORY_FETCH_SUCCESS,
- DIRECTORY_FETCH_FAIL,
- DIRECTORY_EXPAND_REQUEST,
- DIRECTORY_EXPAND_SUCCESS,
- DIRECTORY_EXPAND_FAIL,
-} from 'mastodon/actions/directory';
-import {
- FEATURED_TAGS_FETCH_REQUEST,
- FEATURED_TAGS_FETCH_SUCCESS,
- FEATURED_TAGS_FETCH_FAIL,
-} from 'mastodon/actions/featured_tags';
-import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
+ NOTIFICATIONS_UPDATE,
+} from '../actions/notifications';
+
+
const initialListState = ImmutableMap({
next: null,
diff --git a/app/javascript/mastodon/selectors/index.js b/app/javascript/mastodon/selectors/index.js
index 58972bdf7f..b67734316b 100644
--- a/app/javascript/mastodon/selectors/index.js
+++ b/app/javascript/mastodon/selectors/index.js
@@ -1,6 +1,8 @@
-import { createSelector } from 'reselect';
import { List as ImmutableList, Map as ImmutableMap } from 'immutable';
+import { createSelector } from 'reselect';
+
import { toServerSideType } from 'mastodon/utils/filters';
+
import { me } from '../initial_state';
const getAccountBase = (state, id) => state.getIn(['accounts', id], null);
diff --git a/app/javascript/mastodon/service_worker/entry.js b/app/javascript/mastodon/service_worker/entry.js
index 9026012feb..a4aebcd3a7 100644
--- a/app/javascript/mastodon/service_worker/entry.js
+++ b/app/javascript/mastodon/service_worker/entry.js
@@ -2,6 +2,7 @@ import { ExpirationPlugin } from 'workbox-expiration';
import { precacheAndRoute } from 'workbox-precaching';
import { registerRoute } from 'workbox-routing';
import { CacheFirst } from 'workbox-strategies';
+
import { handleNotificationClick, handlePush } from './web_push_notifications';
const CACHE_NAME_PREFIX = 'mastodon-';
diff --git a/app/javascript/mastodon/service_worker/web_push_notifications.js b/app/javascript/mastodon/service_worker/web_push_notifications.js
index b9d6266940..54247e6f66 100644
--- a/app/javascript/mastodon/service_worker/web_push_notifications.js
+++ b/app/javascript/mastodon/service_worker/web_push_notifications.js
@@ -1,5 +1,7 @@
import IntlMessageFormat from 'intl-messageformat';
+
import { unescape } from 'lodash';
+
import locales from './web_push_locales';
const MAX_NOTIFICATIONS = 5;
diff --git a/app/javascript/packs/admin.jsx b/app/javascript/packs/admin.jsx
index 2fd7879836..39a56c52b0 100644
--- a/app/javascript/packs/admin.jsx
+++ b/app/javascript/packs/admin.jsx
@@ -1,9 +1,11 @@
import './public-path';
-import { delegate } from '@rails/ujs';
-import ready from '../mastodon/ready';
import React from 'react';
import { createRoot } from 'react-dom/client';
+import { delegate } from '@rails/ujs';
+
+import ready from '../mastodon/ready';
+
const setAnnouncementEndsAttributes = (target) => {
const valid = target?.value && target?.validity?.valid;
const element = document.querySelector('input[type="datetime-local"]#announcement_ends_at');
diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js
index ab87083659..29fd5cde9b 100644
--- a/app/javascript/packs/application.js
+++ b/app/javascript/packs/application.js
@@ -1,6 +1,6 @@
import './public-path';
-import { loadPolyfills } from '../mastodon/polyfills';
import { start } from '../mastodon/common';
+import { loadPolyfills } from '../mastodon/polyfills';
start();
diff --git a/app/javascript/packs/public.jsx b/app/javascript/packs/public.jsx
index ab4ef573b9..72c7acbb4e 100644
--- a/app/javascript/packs/public.jsx
+++ b/app/javascript/packs/public.jsx
@@ -1,22 +1,25 @@
+import { createRoot } from 'react-dom/client';
+
import './public-path';
+
+import * as IntlMessageFormat from 'intl-messageformat';
+import { defineMessages } from 'react-intl';
+
+import { delegate } from '@rails/ujs';
+import axios from 'axios';
import escapeTextContentForBrowser from 'escape-html';
+import { createBrowserHistory } from 'history';
+import { throttle } from 'lodash';
+
+import { start } from '../mastodon/common';
+import { timeAgoString } from '../mastodon/components/relative_timestamp';
+import emojify from '../mastodon/features/emoji/emoji';
+import loadKeyboardExtensions from '../mastodon/load_keyboard_extensions';
+import { getLocale } from '../mastodon/locales';
import { loadPolyfills } from '../mastodon/polyfills';
import ready from '../mastodon/ready';
-import { start } from '../mastodon/common';
-import loadKeyboardExtensions from '../mastodon/load_keyboard_extensions';
import 'cocoon-js-vanilla';
-import axios from 'axios';
-import { throttle } from 'lodash';
-import { defineMessages } from 'react-intl';
-import * as IntlMessageFormat from 'intl-messageformat';
-import { timeAgoString } from '../mastodon/components/relative_timestamp';
-import { delegate } from '@rails/ujs';
-import emojify from '../mastodon/features/emoji/emoji';
-import { getLocale } from '../mastodon/locales';
-import React from 'react';
-import { createRoot } from 'react-dom/client';
-import { createBrowserHistory } from 'history';
start();
diff --git a/app/javascript/packs/share.jsx b/app/javascript/packs/share.jsx
index 6a87eccda3..3bec37d1e4 100644
--- a/app/javascript/packs/share.jsx
+++ b/app/javascript/packs/share.jsx
@@ -1,11 +1,12 @@
import './public-path';
-import { loadPolyfills } from '../mastodon/polyfills';
-import { start } from '../mastodon/common';
-import ready from '../mastodon/ready';
-import ComposeContainer from '../mastodon/containers/compose_container';
import React from 'react';
import { createRoot } from 'react-dom/client';
+import { start } from '../mastodon/common';
+import ComposeContainer from '../mastodon/containers/compose_container';
+import { loadPolyfills } from '../mastodon/polyfills';
+import ready from '../mastodon/ready';
+
start();
function loaded() {
diff --git a/app/javascript/packs/sign_up.js b/app/javascript/packs/sign_up.js
index 260e404eb7..9aae9c11b8 100644
--- a/app/javascript/packs/sign_up.js
+++ b/app/javascript/packs/sign_up.js
@@ -1,7 +1,8 @@
import './public-path';
-import ready from '../mastodon/ready';
import axios from 'axios';
+import ready from '../mastodon/ready';
+
ready(() => {
setInterval(() => {
axios.get('/api/v1/emails/check_confirmation').then((response) => {
diff --git a/app/javascript/packs/two_factor_authentication.js b/app/javascript/packs/two_factor_authentication.js
index dde06be8c1..e77965c757 100644
--- a/app/javascript/packs/two_factor_authentication.js
+++ b/app/javascript/packs/two_factor_authentication.js
@@ -1,5 +1,6 @@
-import axios from 'axios';
import * as WebAuthnJSON from '@github/webauthn-json';
+import axios from 'axios';
+
import ready from '../mastodon/ready';
import 'regenerator-runtime/runtime';
diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb
index c456b1cd95..b25fba1475 100644
--- a/app/serializers/rest/instance_serializer.rb
+++ b/app/serializers/rest/instance_serializer.rb
@@ -96,6 +96,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
enabled: registrations_enabled?,
approval_required: Setting.registrations_mode == 'approved',
message: registrations_enabled? ? nil : registrations_message,
+ url: ENV.fetch('SSO_ACCOUNT_SIGN_UP', nil),
}
end
diff --git a/bin/tootctl b/bin/tootctl
index 9c7ae8b871..b3311c6b2a 100755
--- a/bin/tootctl
+++ b/bin/tootctl
@@ -2,11 +2,11 @@
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
-require_relative '../lib/cli'
+require_relative '../lib/mastodon/cli/main'
begin
Chewy.strategy(:mastodon) do
- Mastodon::CLI.start(ARGV)
+ Mastodon::CLI::Main.start(ARGV)
end
rescue Interrupt
exit(130)
diff --git a/config/webpack/configuration.js b/config/webpack/configuration.js
index 25b6b7abd6..a647b45992 100644
--- a/config/webpack/configuration.js
+++ b/config/webpack/configuration.js
@@ -1,9 +1,10 @@
// Common configuration for webpacker loaded from config/webpacker.yml
+const { readFileSync } = require('fs');
const { resolve } = require('path');
const { env } = require('process');
+
const { load } = require('js-yaml');
-const { readFileSync } = require('fs');
const configPath = resolve('config', 'webpacker.yml');
const settings = load(readFileSync(configPath), 'utf8')[env.RAILS_ENV || env.NODE_ENV];
diff --git a/config/webpack/development.js b/config/webpack/development.js
index c3cf1b655c..e3fbfe4b9d 100644
--- a/config/webpack/development.js
+++ b/config/webpack/development.js
@@ -1,8 +1,9 @@
// Note: You must restart bin/webpack-dev-server for changes to take effect
const { merge } = require('webpack-merge');
-const sharedConfig = require('./shared');
+
const { settings, output } = require('./configuration');
+const sharedConfig = require('./shared');
const watchOptions = {};
diff --git a/config/webpack/generateLocalePacks.js b/config/webpack/generateLocalePacks.js
index be2f35ef4e..b8d5d82c6d 100644
--- a/config/webpack/generateLocalePacks.js
+++ b/config/webpack/generateLocalePacks.js
@@ -4,8 +4,9 @@
const fs = require('fs');
const path = require('path');
-const rimraf = require('rimraf');
+
const { mkdirp } = require('mkdirp');
+const rimraf = require('rimraf');
const localesJsonPath = path.join(__dirname, '../../app/javascript/mastodon/locales');
const locales = fs.readdirSync(localesJsonPath).filter(filename => {
diff --git a/config/webpack/production.js b/config/webpack/production.js
index 143a23b99e..7f1ee4a8f9 100644
--- a/config/webpack/production.js
+++ b/config/webpack/production.js
@@ -3,11 +3,13 @@
const { createHash } = require('crypto');
const { readFileSync } = require('fs');
const { resolve } = require('path');
-const { merge } = require('webpack-merge');
-const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
-const TerserPlugin = require('terser-webpack-plugin');
+
const CompressionPlugin = require('compression-webpack-plugin');
+const TerserPlugin = require('terser-webpack-plugin');
+const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
+const { merge } = require('webpack-merge');
const { InjectManifest } = require('workbox-webpack-plugin');
+
const sharedConfig = require('./shared');
const root = resolve(__dirname, '..', '..');
diff --git a/config/webpack/rules/babel.js b/config/webpack/rules/babel.js
index ba1aff93aa..2811a1674d 100644
--- a/config/webpack/rules/babel.js
+++ b/config/webpack/rules/babel.js
@@ -1,4 +1,5 @@
const { join, resolve } = require('path');
+
const { env, settings } = require('../configuration');
module.exports = {
diff --git a/config/webpack/rules/file.js b/config/webpack/rules/file.js
index f2fb587801..25cda0eae5 100644
--- a/config/webpack/rules/file.js
+++ b/config/webpack/rules/file.js
@@ -1,4 +1,5 @@
const { join } = require('path');
+
const { settings } = require('../configuration');
module.exports = {
diff --git a/config/webpack/rules/index.js b/config/webpack/rules/index.js
index 92a384e6d8..7e1857341c 100644
--- a/config/webpack/rules/index.js
+++ b/config/webpack/rules/index.js
@@ -1,8 +1,8 @@
const babel = require('./babel');
const css = require('./css');
const file = require('./file');
-const tesseract = require('./tesseract');
const nodeModules = require('./node_modules');
+const tesseract = require('./tesseract');
// Webpack loaders are processed in reverse order
// https://webpack.js.org/concepts/loaders/#loader-features
diff --git a/config/webpack/rules/node_modules.js b/config/webpack/rules/node_modules.js
index c084d3a57e..89c9d422d3 100644
--- a/config/webpack/rules/node_modules.js
+++ b/config/webpack/rules/node_modules.js
@@ -1,4 +1,5 @@
const { join } = require('path');
+
const { settings, env } = require('../configuration');
module.exports = {
diff --git a/config/webpack/shared.js b/config/webpack/shared.js
index 037243965f..f2f182c566 100644
--- a/config/webpack/shared.js
+++ b/config/webpack/shared.js
@@ -1,14 +1,16 @@
// Note: You must restart bin/webpack-dev-server for changes to take effect
-const webpack = require('webpack');
const { basename, dirname, join, relative, resolve } = require('path');
+
const { sync } = require('glob');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const AssetsManifestPlugin = require('webpack-assets-manifest');
const extname = require('path-complete-extname');
+const webpack = require('webpack');
+const AssetsManifestPlugin = require('webpack-assets-manifest');
+
const { env, settings, themes, output } = require('./configuration');
-const rules = require('./rules');
const localePackPaths = require('./generateLocalePacks');
+const rules = require('./rules');
const extensionGlob = `**/*{${settings.extensions.join(',')}}*`;
const entryPath = join(settings.source_path, settings.source_entry_path);
diff --git a/config/webpack/tests.js b/config/webpack/tests.js
index 84f008eac8..1f7bdea9da 100644
--- a/config/webpack/tests.js
+++ b/config/webpack/tests.js
@@ -1,6 +1,7 @@
// Note: You must restart bin/webpack-dev-server for changes to take effect
const { merge } = require('webpack-merge');
+
const sharedConfig = require('./shared');
module.exports = merge(sharedConfig, {
diff --git a/config/webpack/translationRunner.js b/config/webpack/translationRunner.js
index 38050baf8d..9c684c277f 100644
--- a/config/webpack/translationRunner.js
+++ b/config/webpack/translationRunner.js
@@ -1,5 +1,7 @@
const fs = require('fs');
const path = require('path');
+
+// eslint-disable-next-line import/order
const { default: manageTranslations } = require('react-intl-translations-manager');
const RFC5646_REGEXP = /^[a-z]{2,3}(?:-(?:x|[A-Za-z]{2,4}))*$/;
diff --git a/lib/mastodon/accounts_cli.rb b/lib/mastodon/cli/accounts.rb
similarity index 99%
rename from lib/mastodon/accounts_cli.rb
rename to lib/mastodon/cli/accounts.rb
index c09577c9ef..417f126ccd 100644
--- a/lib/mastodon/accounts_cli.rb
+++ b/lib/mastodon/cli/accounts.rb
@@ -1,18 +1,10 @@
# frozen_string_literal: true
require 'set'
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class AccountsCLI < Thor
- include CLIHelper
-
- def self.exit_on_failure?
- true
- end
+require_relative 'base'
+module Mastodon::CLI
+ class Accounts < Base
option :all, type: :boolean
desc 'rotate [USERNAME]', 'Generate and broadcast new keys'
long_desc <<-LONG_DESC
diff --git a/lib/mastodon/cli/base.rb b/lib/mastodon/cli/base.rb
new file mode 100644
index 0000000000..f3c9fea921
--- /dev/null
+++ b/lib/mastodon/cli/base.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+require_relative '../../../config/boot'
+require_relative '../../../config/environment'
+
+require 'thor'
+require_relative 'helper'
+
+module Mastodon
+ module CLI
+ class Base < Thor
+ include CLI::Helper
+
+ def self.exit_on_failure?
+ true
+ end
+ end
+ end
+end
diff --git a/lib/mastodon/cache_cli.rb b/lib/mastodon/cli/cache.rb
similarity index 89%
rename from lib/mastodon/cache_cli.rb
rename to lib/mastodon/cli/cache.rb
index 71da961799..3097a99678 100644
--- a/lib/mastodon/cache_cli.rb
+++ b/lib/mastodon/cli/cache.rb
@@ -1,17 +1,9 @@
# frozen_string_literal: true
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class CacheCLI < Thor
- include CLIHelper
-
- def self.exit_on_failure?
- true
- end
+require_relative 'base'
+module Mastodon::CLI
+ class Cache < Base
desc 'clear', 'Clear out the cache storage'
def clear
Rails.cache.clear
diff --git a/lib/mastodon/canonical_email_blocks_cli.rb b/lib/mastodon/cli/canonical_email_blocks.rb
similarity index 83%
rename from lib/mastodon/canonical_email_blocks_cli.rb
rename to lib/mastodon/cli/canonical_email_blocks.rb
index ec228d466a..dd5e6596dd 100644
--- a/lib/mastodon/canonical_email_blocks_cli.rb
+++ b/lib/mastodon/cli/canonical_email_blocks.rb
@@ -1,18 +1,10 @@
# frozen_string_literal: true
require 'concurrent'
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class CanonicalEmailBlocksCLI < Thor
- include CLIHelper
-
- def self.exit_on_failure?
- true
- end
+require_relative 'base'
+module Mastodon::CLI
+ class CanonicalEmailBlocks < Base
desc 'find EMAIL', 'Find a given e-mail address in the canonical e-mail blocks'
long_desc <<-LONG_DESC
When suspending a local user, a hash of a "canonical" version of their e-mail
diff --git a/lib/mastodon/domains_cli.rb b/lib/mastodon/cli/domains.rb
similarity index 97%
rename from lib/mastodon/domains_cli.rb
rename to lib/mastodon/cli/domains.rb
index 05f08f4623..d885c95638 100644
--- a/lib/mastodon/domains_cli.rb
+++ b/lib/mastodon/cli/domains.rb
@@ -1,18 +1,10 @@
# frozen_string_literal: true
require 'concurrent'
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class DomainsCLI < Thor
- include CLIHelper
-
- def self.exit_on_failure?
- true
- end
+require_relative 'base'
+module Mastodon::CLI
+ class Domains < Base
option :concurrency, type: :numeric, default: 5, aliases: [:c]
option :verbose, type: :boolean, aliases: [:v]
option :dry_run, type: :boolean
diff --git a/lib/mastodon/email_domain_blocks_cli.rb b/lib/mastodon/cli/email_domain_blocks.rb
similarity index 93%
rename from lib/mastodon/email_domain_blocks_cli.rb
rename to lib/mastodon/cli/email_domain_blocks.rb
index f39f470691..abbbdfe31c 100644
--- a/lib/mastodon/email_domain_blocks_cli.rb
+++ b/lib/mastodon/cli/email_domain_blocks.rb
@@ -1,18 +1,10 @@
# frozen_string_literal: true
require 'concurrent'
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class EmailDomainBlocksCLI < Thor
- include CLIHelper
-
- def self.exit_on_failure?
- true
- end
+require_relative 'base'
+module Mastodon::CLI
+ class EmailDomainBlocks < Base
desc 'list', 'List blocked e-mail domains'
def list
EmailDomainBlock.where(parent_id: nil).order(id: 'DESC').find_each do |entry|
diff --git a/lib/mastodon/emoji_cli.rb b/lib/mastodon/cli/emoji.rb
similarity index 96%
rename from lib/mastodon/emoji_cli.rb
rename to lib/mastodon/cli/emoji.rb
index 8077d12915..dc4c73166a 100644
--- a/lib/mastodon/emoji_cli.rb
+++ b/lib/mastodon/cli/emoji.rb
@@ -1,16 +1,10 @@
# frozen_string_literal: true
require 'rubygems/package'
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class EmojiCLI < Thor
- def self.exit_on_failure?
- true
- end
+require_relative 'base'
+module Mastodon::CLI
+ class Emoji < Base
option :prefix
option :suffix
option :overwrite, type: :boolean
diff --git a/lib/mastodon/feeds_cli.rb b/lib/mastodon/cli/feeds.rb
similarity index 87%
rename from lib/mastodon/feeds_cli.rb
rename to lib/mastodon/cli/feeds.rb
index fcfb487404..342b550ca3 100644
--- a/lib/mastodon/feeds_cli.rb
+++ b/lib/mastodon/cli/feeds.rb
@@ -1,18 +1,11 @@
# frozen_string_literal: true
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
+require_relative 'base'
-module Mastodon
- class FeedsCLI < Thor
- include CLIHelper
+module Mastodon::CLI
+ class Feeds < Base
include Redisable
- def self.exit_on_failure?
- true
- end
-
option :all, type: :boolean, default: false
option :concurrency, type: :numeric, default: 5, aliases: [:c]
option :verbose, type: :boolean, aliases: [:v]
diff --git a/lib/mastodon/cli_helper.rb b/lib/mastodon/cli/helper.rb
similarity index 98%
rename from lib/mastodon/cli_helper.rb
rename to lib/mastodon/cli/helper.rb
index ab1351ae80..b277e16ebd 100644
--- a/lib/mastodon/cli_helper.rb
+++ b/lib/mastodon/cli/helper.rb
@@ -9,8 +9,8 @@ HttpLog.configuration.logger = dev_null
Paperclip.options[:log] = false
Chewy.logger = dev_null
-module Mastodon
- module CLIHelper
+module Mastodon::CLI
+ module Helper
def dry_run?
options[:dry_run]
end
diff --git a/lib/mastodon/ip_blocks_cli.rb b/lib/mastodon/cli/ip_blocks.rb
similarity index 95%
rename from lib/mastodon/ip_blocks_cli.rb
rename to lib/mastodon/cli/ip_blocks.rb
index 82a08753bc..d12919c360 100644
--- a/lib/mastodon/ip_blocks_cli.rb
+++ b/lib/mastodon/cli/ip_blocks.rb
@@ -1,16 +1,10 @@
# frozen_string_literal: true
require 'rubygems/package'
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class IpBlocksCLI < Thor
- def self.exit_on_failure?
- true
- end
+require_relative 'base'
+module Mastodon::CLI
+ class IpBlocks < Base
option :severity, required: true, enum: %w(no_access sign_up_requires_approval sign_up_block), desc: 'Severity of the block'
option :comment, aliases: [:c], desc: 'Optional comment'
option :duration, aliases: [:d], type: :numeric, desc: 'Duration of the block in seconds'
diff --git a/lib/cli.rb b/lib/mastodon/cli/main.rb
similarity index 74%
rename from lib/cli.rb
rename to lib/mastodon/cli/main.rb
index ac235cf039..e61a6f9c46 100644
--- a/lib/cli.rb
+++ b/lib/mastodon/cli/main.rb
@@ -1,73 +1,69 @@
# frozen_string_literal: true
-require 'thor'
-require_relative 'mastodon/media_cli'
-require_relative 'mastodon/emoji_cli'
-require_relative 'mastodon/accounts_cli'
-require_relative 'mastodon/feeds_cli'
-require_relative 'mastodon/search_cli'
-require_relative 'mastodon/settings_cli'
-require_relative 'mastodon/statuses_cli'
-require_relative 'mastodon/domains_cli'
-require_relative 'mastodon/preview_cards_cli'
-require_relative 'mastodon/cache_cli'
-require_relative 'mastodon/upgrade_cli'
-require_relative 'mastodon/email_domain_blocks_cli'
-require_relative 'mastodon/canonical_email_blocks_cli'
-require_relative 'mastodon/ip_blocks_cli'
-require_relative 'mastodon/maintenance_cli'
-require_relative 'mastodon/version'
+require_relative 'base'
-module Mastodon
- class CLI < Thor
- def self.exit_on_failure?
- true
- end
+require_relative 'accounts'
+require_relative 'cache'
+require_relative 'canonical_email_blocks'
+require_relative 'domains'
+require_relative 'email_domain_blocks'
+require_relative 'emoji'
+require_relative 'feeds'
+require_relative 'ip_blocks'
+require_relative 'maintenance'
+require_relative 'media'
+require_relative 'preview_cards'
+require_relative 'search'
+require_relative 'settings'
+require_relative 'statuses'
+require_relative 'upgrade'
+module Mastodon::CLI
+ class Main < Base
desc 'media SUBCOMMAND ...ARGS', 'Manage media files'
- subcommand 'media', Mastodon::MediaCLI
+ subcommand 'media', Media
desc 'emoji SUBCOMMAND ...ARGS', 'Manage custom emoji'
- subcommand 'emoji', Mastodon::EmojiCLI
+ subcommand 'emoji', Emoji
desc 'accounts SUBCOMMAND ...ARGS', 'Manage accounts'
- subcommand 'accounts', Mastodon::AccountsCLI
+ subcommand 'accounts', Accounts
desc 'feeds SUBCOMMAND ...ARGS', 'Manage feeds'
- subcommand 'feeds', Mastodon::FeedsCLI
+ subcommand 'feeds', Feeds
desc 'search SUBCOMMAND ...ARGS', 'Manage the search engine'
- subcommand 'search', Mastodon::SearchCLI
+ subcommand 'search', Search
desc 'settings SUBCOMMAND ...ARGS', 'Manage dynamic settings'
- subcommand 'settings', Mastodon::SettingsCLI
+ subcommand 'settings', Settings
desc 'statuses SUBCOMMAND ...ARGS', 'Manage statuses'
- subcommand 'statuses', Mastodon::StatusesCLI
+ subcommand 'statuses', Statuses
desc 'domains SUBCOMMAND ...ARGS', 'Manage account domains'
- subcommand 'domains', Mastodon::DomainsCLI
+ subcommand 'domains', Domains
desc 'preview_cards SUBCOMMAND ...ARGS', 'Manage preview cards'
- subcommand 'preview_cards', Mastodon::PreviewCardsCLI
+ subcommand 'preview_cards', PreviewCards
desc 'cache SUBCOMMAND ...ARGS', 'Manage cache'
- subcommand 'cache', Mastodon::CacheCLI
+ subcommand 'cache', Cache
desc 'upgrade SUBCOMMAND ...ARGS', 'Various version upgrade utilities'
- subcommand 'upgrade', Mastodon::UpgradeCLI
+ subcommand 'upgrade', Upgrade
desc 'email_domain_blocks SUBCOMMAND ...ARGS', 'Manage e-mail domain blocks'
- subcommand 'email_domain_blocks', Mastodon::EmailDomainBlocksCLI
+ subcommand 'email_domain_blocks', EmailDomainBlocks
desc 'ip_blocks SUBCOMMAND ...ARGS', 'Manage IP blocks'
- subcommand 'ip_blocks', Mastodon::IpBlocksCLI
+ subcommand 'ip_blocks', IpBlocks
desc 'canonical_email_blocks SUBCOMMAND ...ARGS', 'Manage canonical e-mail blocks'
- subcommand 'canonical_email_blocks', Mastodon::CanonicalEmailBlocksCLI
+ subcommand 'canonical_email_blocks', CanonicalEmailBlocks
desc 'maintenance SUBCOMMAND ...ARGS', 'Various maintenance utilities'
- subcommand 'maintenance', Mastodon::MaintenanceCLI
+ subcommand 'maintenance', Maintenance
option :dry_run, type: :boolean
desc 'self-destruct', 'Erase the server from the federation'
diff --git a/lib/mastodon/maintenance_cli.rb b/lib/mastodon/cli/maintenance.rb
similarity index 99%
rename from lib/mastodon/maintenance_cli.rb
rename to lib/mastodon/cli/maintenance.rb
index 88bd191ea9..660adef80e 100644
--- a/lib/mastodon/maintenance_cli.rb
+++ b/lib/mastodon/cli/maintenance.rb
@@ -1,18 +1,10 @@
# frozen_string_literal: true
require 'tty-prompt'
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class MaintenanceCLI < Thor
- include CLIHelper
-
- def self.exit_on_failure?
- true
- end
+require_relative 'base'
+module Mastodon::CLI
+ class Maintenance < Base
MIN_SUPPORTED_VERSION = 2019_10_01_213028
MAX_SUPPORTED_VERSION = 2022_11_04_133904
diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/cli/media.rb
similarity index 98%
rename from lib/mastodon/media_cli.rb
rename to lib/mastodon/cli/media.rb
index 1bedcd9beb..045f6351ad 100644
--- a/lib/mastodon/media_cli.rb
+++ b/lib/mastodon/cli/media.rb
@@ -1,20 +1,13 @@
# frozen_string_literal: true
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
+require_relative 'base'
-module Mastodon
- class MediaCLI < Thor
+module Mastodon::CLI
+ class Media < Base
include ActionView::Helpers::NumberHelper
- include CLIHelper
VALID_PATH_SEGMENTS_SIZE = [7, 10].freeze
- def self.exit_on_failure?
- true
- end
-
option :days, type: :numeric, default: 7, aliases: [:d]
option :prune_profiles, type: :boolean, default: false
option :remove_headers, type: :boolean, default: false
diff --git a/lib/mastodon/preview_cards_cli.rb b/lib/mastodon/cli/preview_cards.rb
similarity index 88%
rename from lib/mastodon/preview_cards_cli.rb
rename to lib/mastodon/cli/preview_cards.rb
index cf4407250c..c66bcb504a 100644
--- a/lib/mastodon/preview_cards_cli.rb
+++ b/lib/mastodon/cli/preview_cards.rb
@@ -1,18 +1,11 @@
# frozen_string_literal: true
require 'tty-prompt'
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
+require_relative 'base'
-module Mastodon
- class PreviewCardsCLI < Thor
+module Mastodon::CLI
+ class PreviewCards < Base
include ActionView::Helpers::NumberHelper
- include CLIHelper
-
- def self.exit_on_failure?
- true
- end
option :days, type: :numeric, default: 180
option :concurrency, type: :numeric, default: 5, aliases: [:c]
diff --git a/lib/mastodon/search_cli.rb b/lib/mastodon/cli/search.rb
similarity index 95%
rename from lib/mastodon/search_cli.rb
rename to lib/mastodon/cli/search.rb
index 31e9a3d5af..6f48dcb096 100644
--- a/lib/mastodon/search_cli.rb
+++ b/lib/mastodon/cli/search.rb
@@ -1,13 +1,9 @@
# frozen_string_literal: true
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class SearchCLI < Thor
- include CLIHelper
+require_relative 'base'
+module Mastodon::CLI
+ class Search < Base
# Indices are sorted by amount of data to be expected in each, so that
# smaller indices can go online sooner
INDICES = [
diff --git a/lib/mastodon/settings_cli.rb b/lib/mastodon/cli/settings.rb
similarity index 76%
rename from lib/mastodon/settings_cli.rb
rename to lib/mastodon/cli/settings.rb
index 488c655dee..7d4c13b78e 100644
--- a/lib/mastodon/settings_cli.rb
+++ b/lib/mastodon/cli/settings.rb
@@ -1,15 +1,9 @@
# frozen_string_literal: true
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class RegistrationsCLI < Thor
- def self.exit_on_failure?
- true
- end
+require_relative 'base'
+module Mastodon::CLI
+ class Registrations < Base
desc 'open', 'Open registrations'
def open
Setting.registrations_mode = 'open'
@@ -37,8 +31,8 @@ module Mastodon
end
end
- class SettingsCLI < Thor
+ class Settings < Base
desc 'registrations SUBCOMMAND ...ARGS', 'Manage state of registrations'
- subcommand 'registrations', RegistrationsCLI
+ subcommand 'registrations', Registrations
end
end
diff --git a/lib/mastodon/statuses_cli.rb b/lib/mastodon/cli/statuses.rb
similarity index 97%
rename from lib/mastodon/statuses_cli.rb
rename to lib/mastodon/cli/statuses.rb
index baab83e297..bd5b047077 100644
--- a/lib/mastodon/statuses_cli.rb
+++ b/lib/mastodon/cli/statuses.rb
@@ -1,18 +1,11 @@
# frozen_string_literal: true
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
+require_relative 'base'
-module Mastodon
- class StatusesCLI < Thor
- include CLIHelper
+module Mastodon::CLI
+ class Statuses < Base
include ActionView::Helpers::NumberHelper
- def self.exit_on_failure?
- true
- end
-
option :days, type: :numeric, default: 90
option :batch_size, type: :numeric, default: 1_000, aliases: [:b], desc: 'Number of records in each batch'
option :continue, type: :boolean, default: false, desc: 'If remove is not completed, execute from the previous continuation'
diff --git a/lib/mastodon/upgrade_cli.rb b/lib/mastodon/cli/upgrade.rb
similarity index 95%
rename from lib/mastodon/upgrade_cli.rb
rename to lib/mastodon/cli/upgrade.rb
index 2b60f9eee5..e5c86b3d73 100644
--- a/lib/mastodon/upgrade_cli.rb
+++ b/lib/mastodon/cli/upgrade.rb
@@ -1,17 +1,9 @@
# frozen_string_literal: true
-require_relative '../../config/boot'
-require_relative '../../config/environment'
-require_relative 'cli_helper'
-
-module Mastodon
- class UpgradeCLI < Thor
- include CLIHelper
-
- def self.exit_on_failure?
- true
- end
+require_relative 'base'
+module Mastodon::CLI
+ class Upgrade < Base
CURRENT_STORAGE_SCHEMA_VERSION = 1
option :dry_run, type: :boolean, default: false
diff --git a/package.json b/package.json
index 38eaa7bf87..13720c56b4 100644
--- a/package.json
+++ b/package.json
@@ -97,7 +97,7 @@
"react-motion": "^0.5.2",
"react-notification": "^6.8.5",
"react-overlays": "^5.2.1",
- "react-redux": "^7.2.9",
+ "react-redux": "^8.0.4",
"react-redux-loading-bar": "^5.0.4",
"react-router-dom": "^4.1.1",
"react-router-scroll-4": "^1.0.0-beta.1",
@@ -162,7 +162,6 @@
"@types/react-intl": "2.3.18",
"@types/react-motion": "^0.0.33",
"@types/react-overlays": "^3.1.0",
- "@types/react-redux": "^7.1.25",
"@types/react-router-dom": "^5.3.3",
"@types/react-select": "^5.0.1",
"@types/react-sparklines": "^1.7.2",
@@ -178,12 +177,12 @@
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"babel-jest": "^29.5.0",
- "eslint": "^8.40.0",
+ "eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-formatjs": "^4.10.1",
"eslint-plugin-import": "~2.27.5",
- "eslint-plugin-jsdoc": "^44.2.4",
+ "eslint-plugin-jsdoc": "^44.2.5",
"eslint-plugin-jsx-a11y": "~6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "~6.1.1",
diff --git a/spec/controllers/admin/account_moderation_notes_controller_spec.rb b/spec/controllers/admin/account_moderation_notes_controller_spec.rb
index 848281c290..3e1b4b280f 100644
--- a/spec/controllers/admin/account_moderation_notes_controller_spec.rb
+++ b/spec/controllers/admin/account_moderation_notes_controller_spec.rb
@@ -19,7 +19,7 @@ RSpec.describe Admin::AccountModerationNotesController do
let(:params) { { account_moderation_note: { target_account_id: target_account.id, content: 'test content' } } }
it 'successfully creates a note' do
- expect { subject }.to change { AccountModerationNote.count }.by(1)
+ expect { subject }.to change(AccountModerationNote, :count).by(1)
expect(subject).to redirect_to admin_account_path(target_account.id)
end
end
@@ -28,7 +28,7 @@ RSpec.describe Admin::AccountModerationNotesController do
let(:params) { { account_moderation_note: { target_account_id: target_account.id, content: '' } } }
it 'falls to create a note' do
- expect { subject }.to_not change { AccountModerationNote.count }
+ expect { subject }.to_not change(AccountModerationNote, :count)
expect(subject).to render_template 'admin/accounts/show'
end
end
@@ -41,7 +41,7 @@ RSpec.describe Admin::AccountModerationNotesController do
let(:account) { Fabricate(:account) }
it 'destroys note' do
- expect { subject }.to change { AccountModerationNote.count }.by(-1)
+ expect { subject }.to change(AccountModerationNote, :count).by(-1)
expect(subject).to redirect_to admin_account_path(target_account.id)
end
end
diff --git a/spec/controllers/admin/custom_emojis_controller_spec.rb b/spec/controllers/admin/custom_emojis_controller_spec.rb
index d40691e1bf..6c32a3a579 100644
--- a/spec/controllers/admin/custom_emojis_controller_spec.rb
+++ b/spec/controllers/admin/custom_emojis_controller_spec.rb
@@ -42,7 +42,7 @@ describe Admin::CustomEmojisController do
let(:params) { { shortcode: 'test', image: image } }
it 'creates custom emoji' do
- expect { subject }.to change { CustomEmoji.count }.by(1)
+ expect { subject }.to change(CustomEmoji, :count).by(1)
end
end
diff --git a/spec/controllers/admin/invites_controller_spec.rb b/spec/controllers/admin/invites_controller_spec.rb
index 92ec4e4491..ca87417305 100644
--- a/spec/controllers/admin/invites_controller_spec.rb
+++ b/spec/controllers/admin/invites_controller_spec.rb
@@ -26,7 +26,7 @@ describe Admin::InvitesController do
subject { post :create, params: { invite: { max_uses: '10', expires_in: 1800 } } }
it 'succeeds to create a invite' do
- expect { subject }.to change { Invite.count }.by(1)
+ expect { subject }.to change(Invite, :count).by(1)
expect(subject).to redirect_to admin_invites_path
expect(Invite.last).to have_attributes(user_id: user.id, max_uses: 10)
end
diff --git a/spec/controllers/admin/report_notes_controller_spec.rb b/spec/controllers/admin/report_notes_controller_spec.rb
index fb2fbd0588..b5ba4a84dc 100644
--- a/spec/controllers/admin/report_notes_controller_spec.rb
+++ b/spec/controllers/admin/report_notes_controller_spec.rb
@@ -25,7 +25,7 @@ describe Admin::ReportNotesController do
let(:params) { { report_note: { content: 'test content', report_id: report.id }, create_and_resolve: nil } }
it 'creates a report note and resolves report' do
- expect { subject }.to change { ReportNote.count }.by(1)
+ expect { subject }.to change(ReportNote, :count).by(1)
expect(report.reload).to be_action_taken
expect(subject).to redirect_to admin_reports_path
end
@@ -35,7 +35,7 @@ describe Admin::ReportNotesController do
let(:params) { { report_note: { content: 'test content', report_id: report.id } } }
it 'creates a report note and does not resolve report' do
- expect { subject }.to change { ReportNote.count }.by(1)
+ expect { subject }.to change(ReportNote, :count).by(1)
expect(report.reload).to_not be_action_taken
expect(subject).to redirect_to admin_report_path(report)
end
@@ -50,7 +50,7 @@ describe Admin::ReportNotesController do
let(:params) { { report_note: { content: 'test content', report_id: report.id }, create_and_unresolve: nil } }
it 'creates a report note and unresolves report' do
- expect { subject }.to change { ReportNote.count }.by(1)
+ expect { subject }.to change(ReportNote, :count).by(1)
expect(report.reload).to_not be_action_taken
expect(subject).to redirect_to admin_report_path(report)
end
@@ -60,7 +60,7 @@ describe Admin::ReportNotesController do
let(:params) { { report_note: { content: 'test content', report_id: report.id } } }
it 'creates a report note and does not unresolve report' do
- expect { subject }.to change { ReportNote.count }.by(1)
+ expect { subject }.to change(ReportNote, :count).by(1)
expect(report.reload).to be_action_taken
expect(subject).to redirect_to admin_report_path(report)
end
@@ -85,7 +85,7 @@ describe Admin::ReportNotesController do
let!(:report_note) { Fabricate(:report_note) }
it 'deletes note' do
- expect { subject }.to change { ReportNote.count }.by(-1)
+ expect { subject }.to change(ReportNote, :count).by(-1)
expect(subject).to redirect_to admin_report_path(report_note.report)
end
end
diff --git a/spec/controllers/api/v1/accounts/notes_controller_spec.rb b/spec/controllers/api/v1/accounts/notes_controller_spec.rb
index fd4d34f691..4107105afd 100644
--- a/spec/controllers/api/v1/accounts/notes_controller_spec.rb
+++ b/spec/controllers/api/v1/accounts/notes_controller_spec.rb
@@ -43,7 +43,7 @@ describe Api::V1::Accounts::NotesController do
it 'does not create account note' do
subject
- expect(AccountNote.where(account_id: user.account.id, target_account_id: account.id).exists?).to be_falsey
+ expect(AccountNote.where(account_id: user.account.id, target_account_id: account.id)).to_not exist
end
end
end
diff --git a/spec/controllers/api/v1/media_controller_spec.rb b/spec/controllers/api/v1/media_controller_spec.rb
index 20d58e8c03..79a9d1474a 100644
--- a/spec/controllers/api/v1/media_controller_spec.rb
+++ b/spec/controllers/api/v1/media_controller_spec.rb
@@ -15,23 +15,19 @@ RSpec.describe Api::V1::MediaController do
describe 'POST #create' do
describe 'with paperclip errors' do
context 'when imagemagick cant identify the file type' do
- before do
+ it 'returns http 422' do
expect_any_instance_of(Account).to receive_message_chain(:media_attachments, :create!).and_raise(Paperclip::Errors::NotIdentifiedByImageMagickError)
post :create, params: { file: fixture_file_upload('attachment.jpg', 'image/jpeg') }
- end
- it 'returns http 422' do
expect(response).to have_http_status(422)
end
end
context 'when there is a generic error' do
- before do
+ it 'returns http 422' do
expect_any_instance_of(Account).to receive_message_chain(:media_attachments, :create!).and_raise(Paperclip::Error)
post :create, params: { file: fixture_file_upload('attachment.jpg', 'image/jpeg') }
- end
- it 'returns http 422' do
expect(response).to have_http_status(500)
end
end
diff --git a/spec/controllers/concerns/accountable_concern_spec.rb b/spec/controllers/concerns/accountable_concern_spec.rb
index 3c10082c34..cd06d872bb 100644
--- a/spec/controllers/concerns/accountable_concern_spec.rb
+++ b/spec/controllers/concerns/accountable_concern_spec.rb
@@ -22,7 +22,7 @@ RSpec.describe AccountableConcern do
it 'creates Admin::ActionLog' do
expect do
hoge.log_action(:create, target)
- end.to change { Admin::ActionLog.count }.by(1)
+ end.to change(Admin::ActionLog, :count).by(1)
end
end
end
diff --git a/spec/controllers/invites_controller_spec.rb b/spec/controllers/invites_controller_spec.rb
index 8718403bf3..3190c82884 100644
--- a/spec/controllers/invites_controller_spec.rb
+++ b/spec/controllers/invites_controller_spec.rb
@@ -52,7 +52,7 @@ describe InvitesController do
end
it 'succeeds to create a invite' do
- expect { subject }.to change { Invite.count }.by(1)
+ expect { subject }.to change(Invite, :count).by(1)
expect(subject).to redirect_to invites_path
expect(Invite.last).to have_attributes(user_id: user.id, max_uses: 10)
end
diff --git a/spec/controllers/settings/applications_controller_spec.rb b/spec/controllers/settings/applications_controller_spec.rb
index c0a57380e8..169304b3ed 100644
--- a/spec/controllers/settings/applications_controller_spec.rb
+++ b/spec/controllers/settings/applications_controller_spec.rb
@@ -182,12 +182,10 @@ describe Settings::ApplicationsController do
describe 'regenerate' do
let(:token) { user.token_for_app(app) }
- before do
+ it 'creates new token' do
expect(token).to_not be_nil
post :regenerate, params: { id: app.id }
- end
- it 'creates new token' do
expect(user.token_for_app(app)).to_not eql(token)
end
end
diff --git a/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb
index 48dea62765..fe4868956c 100644
--- a/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb
+++ b/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb
@@ -134,7 +134,7 @@ describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do
end
it 'does not change webauthn_id' do
- expect { get :options }.to_not change { user.webauthn_id }
+ expect { get :options }.to_not change(user, :webauthn_id)
end
it 'includes existing credentials in list of excluded credentials' do
@@ -238,7 +238,7 @@ describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do
expect do
post :create, params: { credential: new_webauthn_credential, nickname: nickname }
- end.to_not change { user.webauthn_id }
+ end.to_not change(user, :webauthn_id)
end
end
diff --git a/spec/lib/mastodon/cli/accounts_spec.rb b/spec/lib/mastodon/cli/accounts_spec.rb
new file mode 100644
index 0000000000..25f1311d40
--- /dev/null
+++ b/spec/lib/mastodon/cli/accounts_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/accounts'
+
+describe Mastodon::CLI::Accounts do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/cli/cache_spec.rb b/spec/lib/mastodon/cli/cache_spec.rb
new file mode 100644
index 0000000000..f101bc200f
--- /dev/null
+++ b/spec/lib/mastodon/cli/cache_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/cache'
+
+describe Mastodon::CLI::Cache do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb b/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb
new file mode 100644
index 0000000000..fb481e8a82
--- /dev/null
+++ b/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/canonical_email_blocks'
+
+describe Mastodon::CLI::CanonicalEmailBlocks do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/cli/domains_spec.rb b/spec/lib/mastodon/cli/domains_spec.rb
new file mode 100644
index 0000000000..ea58845c00
--- /dev/null
+++ b/spec/lib/mastodon/cli/domains_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/domains'
+
+describe Mastodon::CLI::Domains do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb
new file mode 100644
index 0000000000..333ae3f2b7
--- /dev/null
+++ b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/email_domain_blocks'
+
+describe Mastodon::CLI::EmailDomainBlocks do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/cli/emoji_spec.rb b/spec/lib/mastodon/cli/emoji_spec.rb
new file mode 100644
index 0000000000..9b58653729
--- /dev/null
+++ b/spec/lib/mastodon/cli/emoji_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/emoji'
+
+describe Mastodon::CLI::Emoji do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/cli/feeds_spec.rb b/spec/lib/mastodon/cli/feeds_spec.rb
new file mode 100644
index 0000000000..4e1e214eff
--- /dev/null
+++ b/spec/lib/mastodon/cli/feeds_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/feeds'
+
+describe Mastodon::CLI::Feeds do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/ip_blocks_cli_spec.rb b/spec/lib/mastodon/cli/ip_blocks_spec.rb
similarity index 97%
rename from spec/lib/mastodon/ip_blocks_cli_spec.rb
rename to spec/lib/mastodon/cli/ip_blocks_spec.rb
index 27c005772b..e192679a59 100644
--- a/spec/lib/mastodon/ip_blocks_cli_spec.rb
+++ b/spec/lib/mastodon/cli/ip_blocks_spec.rb
@@ -1,11 +1,17 @@
# frozen_string_literal: true
require 'rails_helper'
-require 'mastodon/ip_blocks_cli'
+require 'mastodon/cli/ip_blocks'
-RSpec.describe Mastodon::IpBlocksCLI do
+describe Mastodon::CLI::IpBlocks do
let(:cli) { described_class.new }
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+
describe '#add' do
let(:ip_list) do
[
diff --git a/spec/lib/mastodon/cli_spec.rb b/spec/lib/mastodon/cli/main_spec.rb
similarity index 58%
rename from spec/lib/mastodon/cli_spec.rb
rename to spec/lib/mastodon/cli/main_spec.rb
index 419f8b864e..e3709afe37 100644
--- a/spec/lib/mastodon/cli_spec.rb
+++ b/spec/lib/mastodon/cli/main_spec.rb
@@ -1,9 +1,15 @@
# frozen_string_literal: true
require 'rails_helper'
-require 'cli'
+require 'mastodon/cli/main'
+
+describe Mastodon::CLI::Main do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
-describe Mastodon::CLI do
describe 'version' do
it 'returns the Mastodon version' do
expect { described_class.new.invoke(:version) }.to output(
diff --git a/spec/lib/mastodon/cli/maintenance_spec.rb b/spec/lib/mastodon/cli/maintenance_spec.rb
new file mode 100644
index 0000000000..12cd9ca8a6
--- /dev/null
+++ b/spec/lib/mastodon/cli/maintenance_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/maintenance'
+
+describe Mastodon::CLI::Maintenance do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/cli/media_spec.rb b/spec/lib/mastodon/cli/media_spec.rb
new file mode 100644
index 0000000000..29f7d424a9
--- /dev/null
+++ b/spec/lib/mastodon/cli/media_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/media'
+
+describe Mastodon::CLI::Media do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/cli/preview_cards_spec.rb b/spec/lib/mastodon/cli/preview_cards_spec.rb
new file mode 100644
index 0000000000..b4b018b3be
--- /dev/null
+++ b/spec/lib/mastodon/cli/preview_cards_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/preview_cards'
+
+describe Mastodon::CLI::PreviewCards do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/cli/search_spec.rb b/spec/lib/mastodon/cli/search_spec.rb
new file mode 100644
index 0000000000..d5cae5bf49
--- /dev/null
+++ b/spec/lib/mastodon/cli/search_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/search'
+
+describe Mastodon::CLI::Search do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/settings_cli_spec.rb b/spec/lib/mastodon/cli/settings_spec.rb
similarity index 86%
rename from spec/lib/mastodon/settings_cli_spec.rb
rename to spec/lib/mastodon/cli/settings_spec.rb
index 713cb7e437..ae58e74e56 100644
--- a/spec/lib/mastodon/settings_cli_spec.rb
+++ b/spec/lib/mastodon/cli/settings_spec.rb
@@ -1,11 +1,17 @@
# frozen_string_literal: true
require 'rails_helper'
-require 'mastodon/settings_cli'
+require 'mastodon/cli/settings'
+
+describe Mastodon::CLI::Settings do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
-RSpec.describe Mastodon::SettingsCLI do
describe 'subcommand "registrations"' do
- let(:cli) { Mastodon::RegistrationsCLI.new }
+ let(:cli) { Mastodon::CLI::Registrations.new }
before do
Setting.registrations_mode = nil
diff --git a/spec/lib/mastodon/cli/statuses_spec.rb b/spec/lib/mastodon/cli/statuses_spec.rb
new file mode 100644
index 0000000000..2430a88416
--- /dev/null
+++ b/spec/lib/mastodon/cli/statuses_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/statuses'
+
+describe Mastodon::CLI::Statuses do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/mastodon/cli/upgrade_spec.rb b/spec/lib/mastodon/cli/upgrade_spec.rb
new file mode 100644
index 0000000000..9e0ab9d06e
--- /dev/null
+++ b/spec/lib/mastodon/cli/upgrade_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+require 'mastodon/cli/upgrade'
+
+describe Mastodon::CLI::Upgrade do
+ describe '.exit_on_failure?' do
+ it 'returns true' do
+ expect(described_class.exit_on_failure?).to be true
+ end
+ end
+end
diff --git a/spec/lib/status_filter_spec.rb b/spec/lib/status_filter_spec.rb
index 08519bc590..98e2ef913a 100644
--- a/spec/lib/status_filter_spec.rb
+++ b/spec/lib/status_filter_spec.rb
@@ -7,7 +7,7 @@ describe StatusFilter do
let(:status) { Fabricate(:status) }
context 'without an account' do
- subject { described_class.new(status, nil) }
+ subject(:filter) { described_class.new(status, nil) }
context 'when there are no connections' do
it { is_expected.to_not be_filtered }
@@ -22,16 +22,16 @@ describe StatusFilter do
end
context 'when status policy does not allow show' do
- before do
+ it 'filters the status' do
expect_any_instance_of(StatusPolicy).to receive(:show?).and_return(false)
- end
- it { is_expected.to be_filtered }
+ expect(filter).to be_filtered
+ end
end
end
context 'with real account' do
- subject { described_class.new(status, account) }
+ subject(:filter) { described_class.new(status, account) }
let(:account) { Fabricate(:account) }
@@ -73,11 +73,11 @@ describe StatusFilter do
end
context 'when status policy does not allow show' do
- before do
+ it 'filters the status' do
expect_any_instance_of(StatusPolicy).to receive(:show?).and_return(false)
- end
- it { is_expected.to be_filtered }
+ expect(filter).to be_filtered
+ end
end
end
end
diff --git a/spec/models/admin/account_action_spec.rb b/spec/models/admin/account_action_spec.rb
index 442815c889..df79d9f287 100644
--- a/spec/models/admin/account_action_spec.rb
+++ b/spec/models/admin/account_action_spec.rb
@@ -58,7 +58,7 @@ RSpec.describe Admin::AccountAction do
it 'creates Admin::ActionLog' do
expect do
subject
- end.to change { Admin::ActionLog.count }.by 1
+ end.to change(Admin::ActionLog, :count).by 1
end
it 'calls process_email!' do
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index ae46f0ae45..d3e0ac63a4 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -115,19 +115,19 @@ RSpec.describe User do
it 'allows a non-blacklisted user to be created' do
user = User.new(email: 'foo@example.com', account: account, password: password, agreement: true)
- expect(user.valid?).to be_truthy
+ expect(user).to be_valid
end
it 'does not allow a blacklisted user to be created' do
user = User.new(email: 'foo@mvrht.com', account: account, password: password, agreement: true)
- expect(user.valid?).to be_falsey
+ expect(user).to_not be_valid
end
it 'does not allow a subdomain blacklisted user to be created' do
user = User.new(email: 'foo@mvrht.com.topdomain.tld', account: account, password: password, agreement: true)
- expect(user.valid?).to be_falsey
+ expect(user).to_not be_valid
end
end
@@ -350,17 +350,17 @@ RSpec.describe User do
it 'does not allow a user to be created unless they are whitelisted' do
user = User.new(email: 'foo@example.com', account: account, password: password, agreement: true)
- expect(user.valid?).to be_falsey
+ expect(user).to_not be_valid
end
it 'allows a user to be created if they are whitelisted' do
user = User.new(email: 'foo@mastodon.space', account: account, password: password, agreement: true)
- expect(user.valid?).to be_truthy
+ expect(user).to be_valid
end
it 'does not allow a user with a whitelisted top domain as subdomain in their email address to be created' do
user = User.new(email: 'foo@mastodon.space.userdomain.com', account: account, password: password, agreement: true)
- expect(user.valid?).to be_falsey
+ expect(user).to_not be_valid
end
context do
@@ -374,7 +374,7 @@ RSpec.describe User do
Rails.configuration.x.email_domains_blacklist = 'blacklisted.mastodon.space'
user = User.new(email: 'foo@blacklisted.mastodon.space', account: account, password: password)
- expect(user.valid?).to be_falsey
+ expect(user).to_not be_valid
end
end
end
diff --git a/spec/requests/backups_spec.rb b/spec/requests/backups_spec.rb
new file mode 100644
index 0000000000..a6c2efe0db
--- /dev/null
+++ b/spec/requests/backups_spec.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+
+describe 'Backups' do
+ include RoutingHelper
+
+ describe 'GET backups#download' do
+ let(:user) { Fabricate(:user) }
+ let(:backup) { Fabricate(:backup, user: user) }
+
+ before do
+ sign_in user
+ end
+
+ it 'Downloads a user backup' do
+ get download_backup_path(backup)
+
+ expect(response).to redirect_to(backup_dump_url)
+ end
+
+ def backup_dump_url
+ full_asset_url(backup.dump.url)
+ end
+ end
+end
diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb
index 33153c3d07..f577122710 100644
--- a/spec/services/post_status_service_spec.rb
+++ b/spec/services/post_status_service_spec.rb
@@ -48,7 +48,7 @@ RSpec.describe PostStatusService, type: :service do
expect(status.params['text']).to eq 'Hi future!'
expect(status.params['media_ids']).to eq [media.id]
expect(media.reload.status).to be_nil
- expect(Status.where(text: 'Hi future!').exists?).to be_falsey
+ expect(Status.where(text: 'Hi future!')).to_not exist
end
it 'does not change statuses count' do
diff --git a/spec/services/suspend_account_service_spec.rb b/spec/services/suspend_account_service_spec.rb
index 4489bfed57..f9206b7ea2 100644
--- a/spec/services/suspend_account_service_spec.rb
+++ b/spec/services/suspend_account_service_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe SuspendAccountService, type: :service do
end
it 'does not change the “suspended” flag' do
- expect { subject }.to_not change { account.suspended? }
+ expect { subject }.to_not change(account, :suspended?)
end
end
diff --git a/spec/services/unsuspend_account_service_spec.rb b/spec/services/unsuspend_account_service_spec.rb
index 80285cc12b..e02ae41b99 100644
--- a/spec/services/unsuspend_account_service_spec.rb
+++ b/spec/services/unsuspend_account_service_spec.rb
@@ -33,7 +33,7 @@ RSpec.describe UnsuspendAccountService, type: :service do
end
it 'does not change the “suspended” flag' do
- expect { subject }.to_not change { account.suspended? }
+ expect { subject }.to_not change(account, :suspended?)
end
include_examples 'with common context' do
@@ -86,7 +86,7 @@ RSpec.describe UnsuspendAccountService, type: :service do
end
it 'does not change the “suspended” flag' do
- expect { subject }.to_not change { account.suspended? }
+ expect { subject }.to_not change(account, :suspended?)
end
end
@@ -110,7 +110,7 @@ RSpec.describe UnsuspendAccountService, type: :service do
end
it 'marks account as suspended' do
- expect { subject }.to change { account.suspended? }.from(false).to(true)
+ expect { subject }.to change(account, :suspended?).from(false).to(true)
end
end
diff --git a/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb b/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb
index 8e747d04f5..fb626596fe 100644
--- a/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb
+++ b/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb
@@ -103,7 +103,7 @@ describe Scheduler::AccountsStatusesCleanupScheduler do
describe '#perform' do
context 'when the budget is lower than the number of toots to delete' do
it 'deletes as many statuses as the given budget' do
- expect { subject.perform }.to change { Status.count }.by(-subject.compute_budget)
+ expect { subject.perform }.to change(Status, :count).by(-subject.compute_budget)
end
it 'does not delete from accounts with no cleanup policy' do
@@ -117,7 +117,7 @@ describe Scheduler::AccountsStatusesCleanupScheduler do
it 'eventually deletes every deletable toot given enough runs' do
stub_const 'Scheduler::AccountsStatusesCleanupScheduler::MAX_BUDGET', 4
- expect { 10.times { subject.perform } }.to change { Status.count }.by(-30)
+ expect { 10.times { subject.perform } }.to change(Status, :count).by(-30)
end
it 'correctly round-trips between users across several runs' do
@@ -125,7 +125,7 @@ describe Scheduler::AccountsStatusesCleanupScheduler do
stub_const 'Scheduler::AccountsStatusesCleanupScheduler::PER_ACCOUNT_BUDGET', 2
expect { 3.times { subject.perform } }
- .to change { Status.count }.by(-3 * 3)
+ .to change(Status, :count).by(-3 * 3)
.and change { account1.statuses.count }
.and change { account3.statuses.count }
.and change { account5.statuses.count }
@@ -140,7 +140,7 @@ describe Scheduler::AccountsStatusesCleanupScheduler do
it 'correctly handles looping in a single run' do
expect(subject.compute_budget).to eq(400)
- expect { subject.perform }.to change { Status.count }.by(-30)
+ expect { subject.perform }.to change(Status, :count).by(-30)
end
end
@@ -154,7 +154,7 @@ describe Scheduler::AccountsStatusesCleanupScheduler do
it 'does not get stuck' do
expect(subject.compute_budget).to eq(400)
- expect { subject.perform }.to_not change { Status.count }
+ expect { subject.perform }.to_not change(Status, :count)
end
end
end
diff --git a/streaming/index.js b/streaming/index.js
index 07cc91f3f6..279ebbad83 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -1,17 +1,18 @@
// @ts-check
+const fs = require('fs');
+const http = require('http');
+const url = require('url');
+
const dotenv = require('dotenv');
const express = require('express');
-const http = require('http');
-const redis = require('redis');
+const { JSDOM } = require('jsdom');
+const log = require('npmlog');
const pg = require('pg');
const dbUrlToConfig = require('pg-connection-string').parse;
-const log = require('npmlog');
-const url = require('url');
+const redis = require('redis');
const uuid = require('uuid');
-const fs = require('fs');
const WebSocket = require('ws');
-const { JSDOM } = require('jsdom');
const environment = process.env.NODE_ENV || 'development';
diff --git a/yarn.lock b/yarn.lock
index 88603113bd..ae89f81d37 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1062,7 +1062,7 @@
dependencies:
regenerator-runtime "^0.12.0"
-"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.13.8", "@babel/runtime@^7.15.4", "@babel/runtime@^7.2.0", "@babel/runtime@^7.20.13", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
+"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.13.8", "@babel/runtime@^7.2.0", "@babel/runtime@^7.20.13", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
version "7.21.5"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200"
integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q==
@@ -1216,10 +1216,10 @@
resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46"
integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==
-"@es-joy/jsdoccomment@~0.39.3":
- version "0.39.3"
- resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.39.3.tgz#76b55203bf447d608e4e299ecb62d7ef14db72bb"
- integrity sha512-q6pObzaS+aTA96kl4DF91QILNpSiDE8S89cQdJnhIc7hWzwIHPnfBnsiBVa0Z/R9pLHdZTnXEMnggGMmCq7HmA==
+"@es-joy/jsdoccomment@~0.39.4":
+ version "0.39.4"
+ resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.39.4.tgz#6b8a62e9b3077027837728818d3c4389a898b392"
+ integrity sha512-Jvw915fjqQct445+yron7Dufix9A+m9j1fCJYlCo1FWlRvTxa3pjJelxdSTdaLWcTwRU6vbL+NYjO4YuNIS5Qg==
dependencies:
comment-parser "1.3.1"
esquery "^1.5.0"
@@ -1252,10 +1252,10 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@eslint/js@8.40.0":
- version "8.40.0"
- resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.40.0.tgz#3ba73359e11f5a7bd3e407f70b3528abfae69cec"
- integrity sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==
+"@eslint/js@8.41.0":
+ version "8.41.0"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.41.0.tgz#080321c3b68253522f7646b55b577dd99d2950b3"
+ integrity sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==
"@floating-ui/core@^1.0.1":
version "1.0.1"
@@ -2006,7 +2006,7 @@
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64"
integrity sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==
-"@types/hoist-non-react-statics@^3.3.0":
+"@types/hoist-non-react-statics@^3.3.1":
version "3.3.1"
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f"
integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==
@@ -2222,26 +2222,6 @@
dependencies:
react-overlays "*"
-"@types/react-redux@^7.1.20":
- version "7.1.20"
- resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.20.tgz#42f0e61ababb621e12c66c96dda94c58423bd7df"
- integrity sha512-q42es4c8iIeTgcnB+yJgRTTzftv3eYYvCZOh1Ckn2eX/3o5TdsQYKUWpLoLuGlcY/p+VAhV9IOEZJcWk/vfkXw==
- dependencies:
- "@types/hoist-non-react-statics" "^3.3.0"
- "@types/react" "*"
- hoist-non-react-statics "^3.3.0"
- redux "^4.0.0"
-
-"@types/react-redux@^7.1.25":
- version "7.1.25"
- resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.25.tgz#de841631205b24f9dfb4967dd4a7901e048f9a88"
- integrity sha512-bAGh4e+w5D8dajd6InASVIyCo4pZLJ66oLb80F9OBLO1gKESbZcRCJpTT6uLXX+HAB57zw1WTdwJdAsewuTweg==
- dependencies:
- "@types/hoist-non-react-statics" "^3.3.0"
- "@types/react" "*"
- hoist-non-react-statics "^3.3.0"
- redux "^4.0.0"
-
"@types/react-router-dom@^5.3.3":
version "5.3.3"
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.3.3.tgz#e9d6b4a66fcdbd651a5f106c2656a30088cc1e83"
@@ -2399,6 +2379,11 @@
dependencies:
source-map "^0.6.1"
+"@types/use-sync-external-store@^0.0.3":
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43"
+ integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==
+
"@types/uuid@^9.0.0":
version "9.0.1"
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.1.tgz#98586dc36aee8dacc98cc396dbca8d0429647aa6"
@@ -5090,12 +5075,12 @@ eslint-plugin-import@~2.27.5:
semver "^6.3.0"
tsconfig-paths "^3.14.1"
-eslint-plugin-jsdoc@^44.2.4:
- version "44.2.4"
- resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-44.2.4.tgz#0bdc163771504ec7330414eda6a7dbae67156ddb"
- integrity sha512-/EMMxCyRh1SywhCb66gAqoGX4Yv6Xzc4bsSkF1AiY2o2+bQmGMQ05QZ5+JjHbdFTPDZY9pfn+DsSNP0a5yQpIg==
+eslint-plugin-jsdoc@^44.2.5:
+ version "44.2.5"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-44.2.5.tgz#f3186f57f112a230b3b7af34bf236d207bc8d5d7"
+ integrity sha512-KtuhaYy2GmdY2IQE5t+1lup8O4P05c+V4gKcj45PCxFM0OxmRq2uQlfOS1AgYVgPYIBKGE86DxrbKP24HKpORA==
dependencies:
- "@es-joy/jsdoccomment" "~0.39.3"
+ "@es-joy/jsdoccomment" "~0.39.4"
are-docs-informative "^0.0.2"
comment-parser "1.3.1"
debug "^4.3.4"
@@ -5193,15 +5178,15 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994"
integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==
-eslint@^8.40.0:
- version "8.40.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.40.0.tgz#a564cd0099f38542c4e9a2f630fa45bf33bc42a4"
- integrity sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==
+eslint@^8.41.0:
+ version "8.41.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.41.0.tgz#3062ca73363b4714b16dbc1e60f035e6134b6f1c"
+ integrity sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
"@eslint-community/regexpp" "^4.4.0"
"@eslint/eslintrc" "^2.0.3"
- "@eslint/js" "8.40.0"
+ "@eslint/js" "8.41.0"
"@humanwhocodes/config-array" "^0.11.8"
"@humanwhocodes/module-importer" "^1.0.1"
"@nodelib/fs.walk" "^1.2.8"
@@ -5221,13 +5206,12 @@ eslint@^8.40.0:
find-up "^5.0.0"
glob-parent "^6.0.2"
globals "^13.19.0"
- grapheme-splitter "^1.0.4"
+ graphemer "^1.4.0"
ignore "^5.2.0"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
is-path-inside "^3.0.3"
- js-sdsl "^4.1.4"
js-yaml "^4.1.0"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.4.1"
@@ -6008,6 +5992,11 @@ grapheme-splitter@^1.0.4:
resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==
+graphemer@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
+ integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
+
gzip-size@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462"
@@ -7414,11 +7403,6 @@ jpeg-js@^0.4.2:
resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.4.tgz#a9f1c6f1f9f0fa80cdb3484ed9635054d28936aa"
integrity sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==
-js-sdsl@^4.1.4:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.3.0.tgz#aeefe32a451f7af88425b11fdb5f58c90ae1d711"
- integrity sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==
-
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
@@ -9584,7 +9568,7 @@ react-is@^16.13.1, react-is@^16.7.0:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
-react-is@^17.0.1, react-is@^17.0.2:
+react-is@^17.0.1:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
@@ -9637,17 +9621,17 @@ react-redux-loading-bar@^5.0.4:
prop-types "^15.7.2"
react-lifecycles-compat "^3.0.4"
-react-redux@^7.2.9:
- version "7.2.9"
- resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.9.tgz#09488fbb9416a4efe3735b7235055442b042481d"
- integrity sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==
+react-redux@^8.0.4:
+ version "8.0.5"
+ resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.0.5.tgz#e5fb8331993a019b8aaf2e167a93d10af469c7bd"
+ integrity sha512-Q2f6fCKxPFpkXt1qNRZdEDLlScsDWyrgSj0mliK59qU6W5gvBiKkdMEG2lJzhd1rCctf0hb6EtePPLZ2e0m1uw==
dependencies:
- "@babel/runtime" "^7.15.4"
- "@types/react-redux" "^7.1.20"
+ "@babel/runtime" "^7.12.1"
+ "@types/hoist-non-react-statics" "^3.3.1"
+ "@types/use-sync-external-store" "^0.0.3"
hoist-non-react-statics "^3.3.2"
- loose-envify "^1.4.0"
- prop-types "^15.7.2"
- react-is "^17.0.2"
+ react-is "^18.0.0"
+ use-sync-external-store "^1.0.0"
react-router-dom@^4.1.1:
version "4.3.1"
@@ -11701,6 +11685,11 @@ use-latest@^1.2.1:
dependencies:
use-isomorphic-layout-effect "^1.1.1"
+use-sync-external-store@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
+ integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
+
use@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"