Merge commit 'dfa5889fc0' into kb_migration

This commit is contained in:
KMY 2023-05-23 22:17:10 +09:00
commit 4a19077534
285 changed files with 938 additions and 822 deletions

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
@ -8,7 +8,7 @@ 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 { Skeleton } from 'mastodon/components/skeleton';
import { Icon } from 'mastodon/components/icon';
import classNames from 'classnames';
import { ServerHeroImage } from 'mastodon/components/server_hero_image';
@ -48,7 +48,7 @@ const mapStateToProps = state => ({
domainBlocks: state.getIn(['server', 'domainBlocks']),
});
class Section extends React.PureComponent {
class Section extends PureComponent {
static propTypes = {
title: PropTypes.string,
@ -87,7 +87,7 @@ class Section extends React.PureComponent {
}
class About extends React.PureComponent {
class About extends PureComponent {
static propTypes = {
server: ImmutablePropTypes.map,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
@ -10,7 +10,7 @@ const messages = defineMessages({
placeholder: { id: 'account_note.placeholder', defaultMessage: 'Click to add a note' },
});
class InlineAlert extends React.PureComponent {
class InlineAlert extends PureComponent {
static propTypes = {
show: PropTypes.bool,

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
@ -402,10 +401,10 @@ class Header extends ImmutablePureComponent {
{!suspended && (
<div className='account__header__tabs__buttons'>
{!hidden && (
<React.Fragment>
<>
{actionBtn}
{bellBtn}
</React.Fragment>
</>
)}
<DropdownMenuContainer disabled={menu.length === 0} items={menu} icon='ellipsis-v' size={24} direction='right' />

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import FeaturedTags from 'mastodon/features/account/containers/featured_tags_container';
@ -19,7 +19,7 @@ const mapStateToProps = (state, { match: { params: { acct } } }) => {
};
};
class AccountNavigation extends React.PureComponent {
class AccountNavigation extends PureComponent {
static propTypes = {
match: PropTypes.shape({

View file

@ -3,7 +3,6 @@ import classNames from 'classnames';
import { Icon } from 'mastodon/components/icon';
import { autoPlayGif, displayMedia, useBlurhash } from 'mastodon/initial_state';
import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import InnerHeader from '../../account/components/header';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { revealAccount } from 'mastodon/actions/accounts';
@ -14,7 +14,7 @@ const mapDispatchToProps = (dispatch, { accountId }) => ({
});
class LimitedAccountHint extends React.PureComponent {
class LimitedAccountHint extends PureComponent {
static propTypes = {
accountId: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
const MemorialNote = () => (

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { makeGetAccount, getAccountHidden } from '../../../selectors';
import Header from '../components/header';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
@ -12,7 +11,7 @@ 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 TimelineHint from 'mastodon/components/timeline_hint';
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';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { makeGetAccount } from '../../../selectors';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
import { formatTime, getPointerPosition, fileNameFromURL } from 'mastodon/features/video';
@ -22,7 +22,7 @@ const messages = defineMessages({
const TICK_SIZE = 10;
const PADDING = 180;
class Audio extends React.PureComponent {
class Audio extends PureComponent {
static propTypes = {
src: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,6 +1,5 @@
import { debounce } from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import { Helmet } from 'react-helmet';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePropTypes from 'react-immutable-proptypes';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,10 +1,10 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../notifications/components/setting_toggle';
class ColumnSettings extends React.PureComponent {
class ColumnSettings extends PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
@ -30,7 +30,7 @@ const mapStateToProps = (state, { columnId }) => {
};
};
class CommunityTimeline extends React.PureComponent {
class CommunityTimeline extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
@ -22,7 +22,7 @@ const messages = defineMessages({
bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' },
});
class ActionBar extends React.PureComponent {
class ActionBar extends PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { Avatar } from '../../../components/avatar';
import { DisplayName } from '../../../components/display_name';
import ImmutablePropTypes from 'react-immutable-proptypes';

View file

@ -1,8 +1,8 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { length } from 'stringz';
export default class CharacterCounter extends React.PureComponent {
export default class CharacterCounter extends PureComponent {
static propTypes = {
text: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import CharacterCounter from './character_counter';
import Button from '../../../components/button';
import ImmutablePropTypes from 'react-immutable-proptypes';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components';
@ -47,7 +47,7 @@ const notFoundFn = () => (
</div>
);
class ModifierPickerMenu extends React.PureComponent {
class ModifierPickerMenu extends PureComponent {
static propTypes = {
active: PropTypes.bool,
@ -108,7 +108,7 @@ class ModifierPickerMenu extends React.PureComponent {
}
class ModifierPicker extends React.PureComponent {
class ModifierPicker extends PureComponent {
static propTypes = {
active: PropTypes.bool,
@ -144,7 +144,7 @@ class ModifierPicker extends React.PureComponent {
}
class EmojiPickerMenuImpl extends React.PureComponent {
class EmojiPickerMenuImpl extends PureComponent {
static propTypes = {
custom_emojis: ImmutablePropTypes.list,
@ -306,7 +306,7 @@ class EmojiPickerMenuImpl extends React.PureComponent {
const EmojiPickerMenu = injectIntl(EmojiPickerMenuImpl);
class EmojiPickerDropdown extends React.PureComponent {
class EmojiPickerDropdown extends PureComponent {
static propTypes = {
custom_emojis: ImmutablePropTypes.list,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import { IconButton } from '../../../components/icon_button';
@ -12,7 +12,7 @@ const messages = defineMessages({
const listenerOptions = supportsPassiveEvents ? { passive: true } : false;
class ExpirationDropdownMenu extends React.PureComponent {
class ExpirationDropdownMenu extends PureComponent {
static propTypes = {
style: PropTypes.object,
@ -118,7 +118,7 @@ class ExpirationDropdownMenu extends React.PureComponent {
}
class ExpirationDropdown extends React.PureComponent {
class ExpirationDropdown extends PureComponent {
static propTypes = {
isUserTouching: PropTypes.func,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import TextIconButton from './text_icon_button';
@ -17,7 +17,7 @@ const messages = defineMessages({
const listenerOptions = supportsPassiveEvents ? { passive: true, capture: true } : true;
class LanguageDropdownMenu extends React.PureComponent {
class LanguageDropdownMenu extends PureComponent {
static propTypes = {
value: PropTypes.string.isRequired,
@ -238,7 +238,7 @@ class LanguageDropdownMenu extends React.PureComponent {
}
class LanguageDropdown extends React.PureComponent {
class LanguageDropdown extends PureComponent {
static propTypes = {
value: PropTypes.string,

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ActionBar from './action_bar';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { IconButton } from '../../../components/icon_button';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
@ -13,7 +13,7 @@ const iconStyle = {
lineHeight: '27px',
};
class PollButton extends React.PureComponent {
class PollButton extends PureComponent {
static propTypes = {
disabled: PropTypes.bool,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
@ -20,7 +20,7 @@ const messages = defineMessages({
days: { id: 'intervals.full.days', defaultMessage: '{number, plural, one {# day} other {# days}}' },
});
class OptionIntl extends React.PureComponent {
class OptionIntl extends PureComponent {
static propTypes = {
title: PropTypes.string.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import { IconButton } from '../../../components/icon_button';
@ -23,7 +23,7 @@ const messages = defineMessages({
const listenerOptions = supportsPassiveEvents ? { passive: true, capture: true } : true;
class PrivacyDropdownMenu extends React.PureComponent {
class PrivacyDropdownMenu extends PureComponent {
static propTypes = {
style: PropTypes.object,
@ -135,7 +135,7 @@ class PrivacyDropdownMenu extends React.PureComponent {
}
class PrivacyDropdown extends React.PureComponent {
class PrivacyDropdown extends PureComponent {
static propTypes = {
isUserTouching: PropTypes.func,

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { Avatar } from '../../../components/avatar';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
@ -12,7 +12,7 @@ const messages = defineMessages({
placeholderSignedIn: { id: 'search.search_or_paste', defaultMessage: 'Search or paste URL' },
});
class Search extends React.PureComponent {
class Search extends PureComponent {
static contextTypes = {
router: PropTypes.object.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import { IconButton } from '../../../components/icon_button';
@ -21,7 +21,7 @@ const messages = defineMessages({
const listenerOptions = supportsPassiveEvents ? { passive: true } : false;
class SearchabilityDropdownMenu extends React.PureComponent {
class SearchabilityDropdownMenu extends PureComponent {
static propTypes = {
style: PropTypes.object,
@ -132,7 +132,7 @@ class SearchabilityDropdownMenu extends React.PureComponent {
}
class SearchabilityDropdown extends React.PureComponent {
class SearchabilityDropdown extends PureComponent {
static propTypes = {
isUserTouching: PropTypes.func,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
const iconStyle = {
@ -7,7 +7,7 @@ const iconStyle = {
width: `${18 * 1.28571429}px`,
};
export default class TextIconButton extends React.PureComponent {
export default class TextIconButton extends PureComponent {
static propTypes = {
label: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Motion from '../../ui/util/optional_motion';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { IconButton } from '../../../components/icon_button';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import UploadProgressContainer from '../containers/upload_progress_container';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,11 +1,11 @@
import React from 'react';
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 { FormattedMessage } from 'react-intl';
export default class UploadProgress extends React.PureComponent {
export default class UploadProgress extends PureComponent {
static propTypes = {
active: PropTypes.bool,

View file

@ -1,9 +1,9 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
export default class Warning extends React.PureComponent {
export default class Warning extends PureComponent {
static propTypes = {
message: PropTypes.node.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import classNames from 'classnames';
@ -30,7 +30,7 @@ const mapDispatchToProps = dispatch => ({
});
class SensitiveButton extends React.PureComponent {
class SensitiveButton extends PureComponent {
static propTypes = {
active: PropTypes.bool,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import Warning from '../components/warning';
import PropTypes from 'prop-types';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ComposeFormContainer from './containers/compose_form_container';
import NavigationContainer from './containers/navigation_container';
import PropTypes from 'prop-types';
@ -38,7 +38,7 @@ const mapStateToProps = (state, ownProps) => ({
showSearch: ownProps.multiColumn ? state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']) : false,
});
class Compose extends React.PureComponent {
class Compose extends PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,5 +1,5 @@
import PropTypes from 'prop-types';
import React from 'react';
import { PureComponent } from 'react';
import { Helmet } from 'react-helmet';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
@ -14,7 +14,7 @@ const messages = defineMessages({
title: { id: 'column.direct', defaultMessage: 'Private mentions' },
});
class DirectTimeline extends React.PureComponent {
class DirectTimeline extends PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl } from 'react-intl';
import PropTypes from 'prop-types';
@ -29,7 +29,7 @@ const mapStateToProps = state => ({
domain: state.getIn(['meta', 'domain']),
});
class Directory extends React.PureComponent {
class Directory extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,6 +1,5 @@
import { debounce } from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import { Helmet } from 'react-helmet';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,5 +1,4 @@
import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';

View file

@ -1,12 +1,12 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
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 { Skeleton } from 'mastodon/components/skeleton';
import classNames from 'classnames';
export default class Story extends React.PureComponent {
export default class Story extends PureComponent {
static propTypes = {
url: PropTypes.string,
@ -38,10 +38,10 @@ export default class Story extends React.PureComponent {
<div className='story__thumbnail'>
{thumbnail ? (
<React.Fragment>
<>
<div className={classNames('story__thumbnail__preview', { 'story__thumbnail__preview--hidden': thumbnailLoaded })}><Blurhash hash={blurhash} /></div>
<img src={thumbnail} onLoad={this.handleImageLoad} alt='' role='presentation' />
</React.Fragment>
</>
) : <Skeleton />}
</div>
</a>

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
@ -24,7 +24,7 @@ const mapStateToProps = state => ({
isSearching: state.getIn(['search', 'submitted']) || !showTrends,
});
class Explore extends React.PureComponent {
class Explore extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Story from './components/story';
@ -13,7 +13,7 @@ const mapStateToProps = state => ({
isLoading: state.getIn(['trends', 'links', 'isLoading']),
});
class Links extends React.PureComponent {
class Links extends PureComponent {
static propTypes = {
links: ImmutablePropTypes.list,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
@ -42,7 +42,7 @@ const renderStatuses = (results, onLoadMore) => appendLoadMore('statuses', resul
<Status key={`status-${item}`} id={item} />
)), onLoadMore);
class Results extends React.PureComponent {
class Results extends PureComponent {
static propTypes = {
results: ImmutablePropTypes.map,
@ -102,7 +102,7 @@ class Results extends React.PureComponent {
}
return (
<React.Fragment>
<>
<div className='account__section-headline'>
<button onClick={this.handleSelectAll} className={type === 'all' && 'active'}><FormattedMessage id='search_results.all' defaultMessage='All' /></button>
<button onClick={this.handleSelectAccounts} className={type === 'accounts' && 'active'}><FormattedMessage id='search_results.accounts' defaultMessage='Profiles' /></button>
@ -117,7 +117,7 @@ class Results extends React.PureComponent {
<Helmet>
<title>{intl.formatMessage(messages.title, { q })}</title>
</Helmet>
</React.Fragment>
</>
);
}

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import StatusList from 'mastodon/components/status_list';
@ -14,7 +14,7 @@ const mapStateToProps = state => ({
hasMore: !!state.getIn(['status_lists', 'trending', 'next']),
});
class Statuses extends React.PureComponent {
class Statuses extends PureComponent {
static propTypes = {
statusIds: ImmutablePropTypes.list,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import AccountCard from 'mastodon/features/directory/components/account_card';
@ -12,7 +12,7 @@ const mapStateToProps = state => ({
isLoading: state.getIn(['suggestions', 'isLoading']),
});
class Suggestions extends React.PureComponent {
class Suggestions extends PureComponent {
static propTypes = {
isLoading: PropTypes.bool,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag';
@ -13,7 +13,7 @@ const mapStateToProps = state => ({
isLoadingHashtags: state.getIn(['trends', 'tags', 'isLoading']),
});
class Tags extends React.PureComponent {
class Tags extends PureComponent {
static propTypes = {
hashtags: ImmutablePropTypes.list,

View file

@ -1,6 +1,5 @@
import { debounce } from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import { Helmet } from 'react-helmet';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,5 +1,4 @@
import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
@ -10,7 +10,7 @@ const mapStateToProps = (state, { filterId }) => ({
filter: state.getIn(['filters', filterId]),
});
class AddedToFilter extends React.PureComponent {
class AddedToFilter extends PureComponent {
static propTypes = {
onClose: PropTypes.func.isRequired,
@ -30,7 +30,7 @@ class AddedToFilter extends React.PureComponent {
let expiredMessage = null;
if (filter.get('expires_at') && filter.get('expires_at') < new Date()) {
expiredMessage = (
<React.Fragment>
<>
<h4 className='report-dialog-modal__subtitle'><FormattedMessage id='filter_modal.added.expired_title' defaultMessage='Expired filter!' /></h4>
<p className='report-dialog-modal__lead'>
<FormattedMessage
@ -38,14 +38,14 @@ class AddedToFilter extends React.PureComponent {
defaultMessage='This filter category has expired, you will need to change the expiration date for it to apply.'
/>
</p>
</React.Fragment>
</>
);
}
let contextMismatchMessage = null;
if (contextType && !filter.get('context').includes(toServerSideType(contextType))) {
contextMismatchMessage = (
<React.Fragment>
<>
<h4 className='report-dialog-modal__subtitle'><FormattedMessage id='filter_modal.added.context_mismatch_title' defaultMessage='Context mismatch!' /></h4>
<p className='report-dialog-modal__lead'>
<FormattedMessage
@ -53,7 +53,7 @@ class AddedToFilter extends React.PureComponent {
defaultMessage='This filter category does not apply to the context in which you have accessed this post. If you want the post to be filtered in this context too, you will have to edit the filter.'
/>
</p>
</React.Fragment>
</>
);
}
@ -67,7 +67,7 @@ class AddedToFilter extends React.PureComponent {
);
return (
<React.Fragment>
<>
<h3 className='report-dialog-modal__title'><FormattedMessage id='filter_modal.added.title' defaultMessage='Filter added!' /></h3>
<p className='report-dialog-modal__lead'>
<FormattedMessage
@ -94,7 +94,7 @@ class AddedToFilter extends React.PureComponent {
<div className='report-dialog-modal__actions'>
<Button onClick={this.handleCloseClick}><FormattedMessage id='report.close' defaultMessage='Done' /></Button>
</div>
</React.Fragment>
</>
);
}

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
@ -22,7 +22,7 @@ const mapStateToProps = (state, { contextType }) => ({
]),
});
class SelectFilter extends React.PureComponent {
class SelectFilter extends PureComponent {
static propTypes = {
onSelectFilter: PropTypes.func.isRequired,
@ -169,7 +169,7 @@ class SelectFilter extends React.PureComponent {
const results = this.search();
return (
<React.Fragment>
<>
<h3 className='report-dialog-modal__title'><FormattedMessage id='filter_modal.select_filter.title' defaultMessage='Filter this post' /></h3>
<p className='report-dialog-modal__lead'><FormattedMessage id='filter_modal.select_filter.subtitle' defaultMessage='Use an existing category or create a new one' /></p>
@ -183,7 +183,7 @@ class SelectFilter extends React.PureComponent {
{isSearching && this.renderCreateNew(searchValue) }
</div>
</React.Fragment>
</>
);
}

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { Link } from 'react-router-dom';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,6 +1,5 @@
import { debounce } from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
@ -17,7 +16,7 @@ import Column from '../ui/components/column';
import HeaderContainer from '../account_timeline/containers/header_container';
import ColumnBackButton from '../../components/column_back_button';
import ScrollableList from '../../components/scrollable_list';
import TimelineHint from 'mastodon/components/timeline_hint';
import { TimelineHint } from 'mastodon/components/timeline_hint';
import LimitedAccountHint from '../account_timeline/components/limited_account_hint';
import { getAccountHidden } from 'mastodon/selectors';
import { normalizeForLookup } from 'mastodon/reducers/accounts_map';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
@ -17,7 +16,7 @@ import Column from '../ui/components/column';
import HeaderContainer from '../account_timeline/containers/header_container';
import ColumnBackButton from '../../components/column_back_button';
import ScrollableList from '../../components/scrollable_list';
import TimelineHint from 'mastodon/components/timeline_hint';
import { TimelineHint } from 'mastodon/components/timeline_hint';
import LimitedAccountHint from '../account_timeline/components/limited_account_hint';
import { getAccountHidden } from 'mastodon/selectors';
import { normalizeForLookup } from 'mastodon/reducers/accounts_map';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ReactSwipeableViews from 'react-swipeable-views';
import ImmutablePropTypes from 'react-immutable-proptypes';
@ -148,7 +148,7 @@ class Content extends ImmutablePureComponent {
}
class Emoji extends React.PureComponent {
class Emoji extends PureComponent {
static propTypes = {
emoji: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';

View file

@ -1,4 +1,3 @@
import React from 'react';
import Column from 'mastodon/components/column';
import ColumnHeader from 'mastodon/components/column_header';
import ColumnLink from '../ui/components/column_link';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
@ -12,7 +12,7 @@ const messages = defineMessages({
noOptions: { id: 'hashtag.column_settings.select.no_options_message', defaultMessage: 'No suggestions found' },
});
class ColumnSettings extends React.PureComponent {
class ColumnSettings extends PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
@ -26,7 +26,7 @@ const mapStateToProps = (state, props) => ({
tag: state.getIn(['tags', props.params.id]),
});
class HashtagTimeline extends React.PureComponent {
class HashtagTimeline extends PureComponent {
disconnects = [];

View file

@ -1,10 +1,10 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../notifications/components/setting_toggle';
class ColumnSettings extends React.PureComponent {
class ColumnSettings extends PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { connect } from 'react-redux';
import { expandHomeTimeline } from '../../actions/timelines';
import PropTypes from 'prop-types';
@ -30,7 +30,7 @@ const mapStateToProps = state => ({
showAnnouncements: state.getIn(['announcements', 'show']),
});
class HomeTimeline extends React.PureComponent {
class HomeTimeline extends PureComponent {
static contextTypes = {
identity: PropTypes.object,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { registrationsOpen } from 'mastodon/initial_state';
@ -18,7 +18,7 @@ const mapDispatchToProps = (dispatch) => ({
},
});
class Copypaste extends React.PureComponent {
class Copypaste extends PureComponent {
static propTypes = {
value: PropTypes.string,
@ -74,7 +74,7 @@ class Copypaste extends React.PureComponent {
}
class InteractionModal extends React.PureComponent {
class InteractionModal extends PureComponent {
static propTypes = {
displayNameHtml: PropTypes.string,

View file

@ -1,4 +1,3 @@
import React from 'react';
import Column from 'mastodon/components/column';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { makeGetAccount } from '../../../selectors';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { makeGetAccount } from '../../../selectors';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { changeListEditorTitle, submitListEditor } from '../../../actions/lists';
@ -19,7 +19,7 @@ const mapDispatchToProps = dispatch => ({
onSubmit: () => dispatch(submitListEditor(false)),
});
class ListForm extends React.PureComponent {
class ListForm extends PureComponent {
static propTypes = {
value: PropTypes.string.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { defineMessages, injectIntl } from 'react-intl';
@ -20,7 +20,7 @@ const mapDispatchToProps = dispatch => ({
onChange: value => dispatch(changeListSuggestions(value)),
});
class Search extends React.PureComponent {
class Search extends PureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';

View file

@ -1,5 +1,5 @@
import PropTypes from 'prop-types';
import React from 'react';
import { PureComponent } from 'react';
import { Helmet } from 'react-helmet';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
@ -30,7 +30,7 @@ const mapStateToProps = (state, props) => ({
hasUnread: state.getIn(['timelines', `list:${props.params.id}`, 'unread']) > 0,
});
class ListTimeline extends React.PureComponent {
class ListTimeline extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { changeListEditorTitle, submitListEditor } from 'mastodon/actions/lists';
@ -20,7 +20,7 @@ const mapDispatchToProps = dispatch => ({
onSubmit: () => dispatch(submitListEditor(true)),
});
class NewListForm extends React.PureComponent {
class NewListForm extends PureComponent {
static propTypes = {
value: PropTypes.string.isRequired,

View file

@ -1,5 +1,4 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Helmet } from 'react-helmet';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,9 +1,9 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { Icon } from 'mastodon/components/icon';
export default class ClearColumnButton extends React.PureComponent {
export default class ClearColumnButton extends PureComponent {
static propTypes = {
onClick: PropTypes.func.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
@ -7,7 +7,7 @@ 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 React.PureComponent {
export default class ColumnSettings extends PureComponent {
static contextTypes = {
identity: PropTypes.object,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { Icon } from 'mastodon/components/icon';
@ -13,7 +13,7 @@ const tooltips = defineMessages({
statuses: { id: 'notifications.filter.statuses', defaultMessage: 'Updates from people you follow' },
});
class FilterBar extends React.PureComponent {
class FilterBar extends PureComponent {
static propTypes = {
selectFilter: PropTypes.func.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { Avatar } from 'mastodon/components/avatar';
@ -31,10 +30,10 @@ class FollowRequest extends ImmutablePureComponent {
if (hidden) {
return (
<React.Fragment>
<>
{account.get('display_name')}
{account.get('username')}
</React.Fragment>
</>
);
}

View file

@ -1,8 +1,8 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
export default class GrantPermissionButton extends React.PureComponent {
export default class GrantPermissionButton extends PureComponent {
static propTypes = {
onClick: PropTypes.func.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage, defineMessages } from 'react-intl';
import { HotKeys } from 'react-hotkeys';
@ -208,7 +207,7 @@ class Notification extends ImmutablePureComponent {
updateScrollBottom={this.props.updateScrollBottom}
cachedMediaWidth={this.props.cachedMediaWidth}
cacheMediaWidth={this.props.cacheMediaWidth}
withoutEmojiReactions={true}
withoutEmojiReactions
/>
</div>
</HotKeys>
@ -242,7 +241,7 @@ class Notification extends ImmutablePureComponent {
updateScrollBottom={this.props.updateScrollBottom}
cachedMediaWidth={this.props.cachedMediaWidth}
cacheMediaWidth={this.props.cacheMediaWidth}
withoutEmojiReactions={true}
withoutEmojiReactions
/>
</div>
</HotKeys>
@ -275,7 +274,7 @@ class Notification extends ImmutablePureComponent {
updateScrollBottom={this.props.updateScrollBottom}
cachedMediaWidth={this.props.cachedMediaWidth}
cacheMediaWidth={this.props.cacheMediaWidth}
withoutEmojiReactions={true}
withoutEmojiReactions
/>
</div>
</HotKeys>
@ -313,7 +312,7 @@ class Notification extends ImmutablePureComponent {
updateScrollBottom={this.props.updateScrollBottom}
cachedMediaWidth={this.props.cachedMediaWidth}
cacheMediaWidth={this.props.cacheMediaWidth}
withoutEmojiReactions={true}
withoutEmojiReactions
/>
</div>
</HotKeys>
@ -351,7 +350,7 @@ class Notification extends ImmutablePureComponent {
updateScrollBottom={this.props.updateScrollBottom}
cachedMediaWidth={this.props.cachedMediaWidth}
cacheMediaWidth={this.props.cacheMediaWidth}
withoutEmojiReactions={true}
withoutEmojiReactions
/>
</div>
</HotKeys>
@ -395,7 +394,7 @@ class Notification extends ImmutablePureComponent {
updateScrollBottom={this.props.updateScrollBottom}
cachedMediaWidth={this.props.cachedMediaWidth}
cacheMediaWidth={this.props.cacheMediaWidth}
withoutEmojiReactions={true}
withoutEmojiReactions
/>
</div>
</HotKeys>

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { Icon } from 'mastodon/components/icon';
import Button from 'mastodon/components/button';
import { IconButton } from 'mastodon/components/icon_button';
@ -12,7 +12,7 @@ const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
});
class NotificationsPermissionBanner extends React.PureComponent {
class NotificationsPermissionBanner extends PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -1,4 +1,3 @@
import React, { Fragment } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
@ -31,9 +30,9 @@ class Report extends ImmutablePureComponent {
if (hidden) {
return (
<Fragment>
<>
{report.get('id')}
</Fragment>
</>
);
}

View file

@ -1,9 +1,9 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Toggle from 'react-toggle';
export default class SettingToggle extends React.PureComponent {
export default class SettingToggle extends PureComponent {
static propTypes = {
prefix: PropTypes.string,

Some files were not shown because too many files have changed in this diff Show more