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

@ -98,10 +98,17 @@ module.exports = {
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', 'tsx'] }],
'react/jsx-boolean-value': 'error',
'react/display-name': 'off',
'react/jsx-fragments': ['error', 'syntax'],
'react/jsx-equals-spacing': 'error',
'react/jsx-no-bind': 'error',
'react/jsx-no-useless-fragment': 'error',
'react/jsx-no-target-blank': 'off',
'react/jsx-tag-spacing': 'error',
'react/jsx-uses-react': 'off', // not needed with new JSX transform
'react/jsx-wrap-multilines': 'error',
'react/no-deprecated': 'off',
'react/no-unknown-property': 'off',
'react/react-in-jsx-scope': 'off', // not needed with new JSX transform
'react/self-closing-comp': 'error',
// recommended values found in https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/index.js
@ -339,6 +346,9 @@ module.exports = {
'import/no-default-export': 'warn',
'react/prefer-stateless-function': 'warn',
'react/function-component-definition': ['error', { namedComponents: 'arrow-function' }],
'react/jsx-uses-react': 'off', // not needed with new JSX transform
'react/react-in-jsx-scope': 'off', // not needed with new JSX transform
'react/prop-types': 'off',
},
},
{

View file

@ -184,10 +184,11 @@ Rails/FilePath:
Rails/HttpStatus:
EnforcedStyle: numeric
# Reason: Allowed only in the `tootctl` CLI application code
# Reason: Allowed in `tootctl` CLI code and in boot ENV checker
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsexit
Rails/Exit:
Exclude:
- 'config/boot.rb'
- 'lib/mastodon/*_cli.rb'
- 'lib/mastodon/cli_helper.rb'
- 'lib/cli.rb'

View file

@ -236,31 +236,6 @@ Naming/VariableNumber:
- 'spec/models/user_spec.rb'
- 'spec/services/activitypub/fetch_featured_collection_service_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/MapCompact:
Exclude:
- 'app/lib/admin/metrics/dimension.rb'
- 'app/lib/admin/metrics/measure.rb'
- 'app/lib/feed_manager.rb'
- 'app/models/account.rb'
- 'app/models/account_statuses_cleanup_policy.rb'
- 'app/models/account_suggestions/setting_source.rb'
- 'app/models/account_suggestions/source.rb'
- 'app/models/follow_recommendation_filter.rb'
- 'app/models/notification.rb'
- 'app/models/user_role.rb'
- 'app/models/webhook.rb'
- 'app/services/process_mentions_service.rb'
- 'app/validators/existing_username_validator.rb'
- 'db/migrate/20200407202420_migrate_unavailable_inboxes.rb'
- 'spec/presenters/status_relationships_presenter_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SafeMultiline.
Performance/StartWith:
Exclude:
- 'app/lib/extractor.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/UnfreezeString:
Exclude:
@ -596,10 +571,6 @@ RSpec/PredicateMatcher:
- 'spec/models/user_spec.rb'
- 'spec/services/post_status_service_spec.rb'
RSpec/RepeatedExample:
Exclude:
- 'spec/policies/status_policy_spec.rb'
RSpec/StubbedMock:
Exclude:
- 'spec/controllers/api/base_controller_spec.rb'
@ -741,12 +712,6 @@ Rails/DuplicateAssociation:
- 'app/serializers/activitypub/collection_serializer.rb'
- 'app/serializers/activitypub/note_serializer.rb'
# Configuration parameters: Include.
# Include: app/**/*.rb, config/**/*.rb, lib/**/*.rb
Rails/Exit:
Exclude:
- 'config/boot.rb'
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasAndBelongsToMany:

View file

@ -17,7 +17,7 @@ gem 'makara', '~> 0.5'
gem 'pghero'
gem 'dotenv-rails', '~> 2.8'
gem 'aws-sdk-s3', '~> 1.120', require: false
gem 'aws-sdk-s3', '~> 1.122', require: false
gem 'fog-core', '<= 2.4.0'
gem 'fog-openstack', '~> 0.3', require: false
gem 'kt-paperclip', '~> 7.1', github: 'kreeti/kt-paperclip', ref: '11abf222dc31bff71160a1d138b445214f434b2b'
@ -75,7 +75,7 @@ gem 'rails-settings-cached', '~> 0.6', git: 'https://github.com/mastodon/rails-s
gem 'redcarpet', '~> 3.6'
gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
gem 'rqrcode', '~> 2.1'
gem 'rqrcode', '~> 2.2'
gem 'ruby-progressbar', '~> 1.13'
gem 'sanitize', '~> 6.0'
gem 'scenic', '~> 1.7'

View file

@ -109,16 +109,16 @@ GEM
attr_required (1.0.1)
awrence (1.2.1)
aws-eventstream (1.2.0)
aws-partitions (1.752.0)
aws-sdk-core (3.171.0)
aws-partitions (1.761.0)
aws-sdk-core (3.172.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.63.0)
aws-sdk-kms (1.64.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.121.0)
aws-sdk-s3 (1.122.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
@ -189,7 +189,7 @@ GEM
coderay (1.1.3)
color_diff (0.1)
concurrent-ruby (1.2.2)
connection_pool (2.4.0)
connection_pool (2.4.1)
cose (1.3.0)
cbor (~> 0.5.9)
openssl-signature_algorithm (~> 1.0)
@ -398,9 +398,9 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.20.0)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
@ -576,7 +576,7 @@ GEM
rexml (3.2.5)
rotp (6.2.2)
rpam2 (4.0.2)
rqrcode (2.1.2)
rqrcode (2.2.0)
chunky_png (~> 1.0)
rqrcode_core (~> 1.0)
rqrcode_core (1.2.0)
@ -588,20 +588,20 @@ GEM
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (6.0.1)
rspec-rails (6.0.2)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-core (~> 3.11)
rspec-expectations (~> 3.11)
rspec-mocks (~> 3.11)
rspec-support (~> 3.11)
rspec-core (~> 3.12)
rspec-expectations (~> 3.12)
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-sidekiq (3.1.0)
rspec-core (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0)
rspec-support (3.12.0)
rspec_chunked (0.6)
rubocop (1.50.2)
rubocop (1.51.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
@ -611,11 +611,11 @@ GEM
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.0)
rubocop-ast (1.28.1)
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-performance (1.17.1)
rubocop-performance (1.18.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.19.1)
@ -761,7 +761,7 @@ GEM
xorcist (1.1.3)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.7)
zeitwerk (2.6.8)
PLATFORMS
ruby
@ -770,7 +770,7 @@ DEPENDENCIES
active_model_serializers (~> 0.10)
addressable (~> 2.8)
annotate (~> 3.2)
aws-sdk-s3 (~> 1.120)
aws-sdk-s3 (~> 1.122)
better_errors (~> 2.9)
binding_of_caller (~> 1.0)
blurhash (~> 0.1)
@ -860,7 +860,7 @@ DEPENDENCIES
redcarpet (~> 3.6)
redis (~> 4.5)
redis-namespace (~> 1.10)
rqrcode (~> 2.1)
rqrcode (~> 2.2)
rspec-rails (~> 6.0)
rspec-sidekiq (~> 3.1)
rspec_chunked (~> 0.6)
@ -894,3 +894,9 @@ DEPENDENCIES
webpacker (~> 5.4)
webpush!
xorcist (~> 1.1)
RUBY VERSION
ruby 3.2.2p53
BUNDLED WITH
2.4.10

View file

@ -31,8 +31,4 @@ class Api::V1::FeaturedTagsController < Api::BaseController
def set_featured_tags
@featured_tags = current_account.featured_tags.order(statuses_count: :desc)
end
def featured_tag_params
params.require(:name)
end
end

View file

@ -45,6 +45,6 @@ class MediaController < ApplicationController
end
def allow_iframing
response.headers['X-Frame-Options'] = 'ALLOWALL'
response.headers.delete('X-Frame-Options')
end
end

View file

@ -45,7 +45,7 @@ class StatusesController < ApplicationController
return not_found if @status.hidden? || @status.reblog?
expires_in 180, public: true
response.headers['X-Frame-Options'] = 'ALLOWALL'
response.headers.delete('X-Frame-Options')
render layout: 'embedded'
end

View file

@ -1,4 +1,3 @@
import React from 'react';
import renderer from 'react-test-renderer';
import AutosuggestEmoji from '../autosuggest_emoji';

View file

@ -1,4 +1,3 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { fromJS } from 'immutable';
import { Avatar } from '../avatar';

View file

@ -1,4 +1,3 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { fromJS } from 'immutable';
import { AvatarOverlay } from '../avatar_overlay';

View file

@ -1,5 +1,4 @@
import { render, fireEvent, screen } from '@testing-library/react';
import React from 'react';
import renderer from 'react-test-renderer';
import Button from '../button';

View file

@ -1,4 +1,3 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { fromJS } from 'immutable';
import { DisplayName } from '../display_name';

View file

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

View file

@ -1,10 +1,10 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedNumber } from 'react-intl';
import { Sparklines, SparklinesCurve } from 'react-sparklines';
import classNames from 'classnames';
import Skeleton from 'mastodon/components/skeleton';
import { Skeleton } from 'mastodon/components/skeleton';
const percIncrease = (a, b) => {
let percent;
@ -24,7 +24,7 @@ const percIncrease = (a, b) => {
return percent;
};
export default class Counter extends React.PureComponent {
export default class Counter extends PureComponent {
static propTypes = {
measure: PropTypes.string.isRequired,
@ -62,25 +62,25 @@ export default class Counter extends React.PureComponent {
if (loading) {
content = (
<React.Fragment>
<>
<span className='sparkline__value__total'><Skeleton width={43} /></span>
<span className='sparkline__value__change'><Skeleton width={43} /></span>
</React.Fragment>
</>
);
} else {
const measure = data[0];
const percentChange = measure.previous_total && percIncrease(measure.previous_total * 1, measure.total * 1);
content = (
<React.Fragment>
<>
<span className='sparkline__value__total'>{measure.human_value || <FormattedNumber value={measure.total} />}</span>
{measure.previous_total && (<span className={classNames('sparkline__value__change', { positive: percentChange > 0, negative: percentChange < 0 })}>{percentChange > 0 && '+'}<FormattedNumber value={percentChange} style='percent' /></span>)}
</React.Fragment>
</>
);
}
const inner = (
<React.Fragment>
<>
<div className='sparkline__value'>
{content}
</div>
@ -96,7 +96,7 @@ export default class Counter extends React.PureComponent {
</Sparklines>
)}
</div>
</React.Fragment>
</>
);
if (href) {

View file

@ -1,11 +1,11 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedNumber } from 'react-intl';
import { roundTo10 } from 'mastodon/utils/numbers';
import Skeleton from 'mastodon/components/skeleton';
import { Skeleton } from 'mastodon/components/skeleton';
export default class Dimension extends React.PureComponent {
export default class Dimension extends PureComponent {
static propTypes = {
dimension: PropTypes.string.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { injectIntl, defineMessages } from 'react-intl';
@ -10,7 +10,7 @@ const messages = defineMessages({
violation: { id: 'report.categories.violation', defaultMessage: 'Content violates one or more server rules' },
});
class Category extends React.PureComponent {
class Category extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,
@ -52,7 +52,7 @@ class Category extends React.PureComponent {
}
class Rule extends React.PureComponent {
class Rule extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,
@ -84,7 +84,7 @@ class Rule extends React.PureComponent {
}
class ReportReasonSelector extends React.PureComponent {
class ReportReasonSelector extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedMessage, FormattedNumber, FormattedDate } from 'react-intl';
@ -14,7 +14,7 @@ const dateForCohort = cohort => {
}
};
export default class Retention extends React.PureComponent {
export default class Retention extends PureComponent {
static propTypes = {
start_at: PropTypes.string,

View file

@ -1,11 +1,11 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedMessage } from 'react-intl';
import classNames from 'classnames';
import Hashtag from 'mastodon/components/hashtag';
export default class Trends extends React.PureComponent {
export default class Trends extends PureComponent {
static propTypes = {
limit: PropTypes.number.isRequired,

View file

@ -1,4 +1,4 @@
import React, { useCallback, useState } from 'react';
import { useCallback, useState } from 'react';
import { TransitionMotion, spring } from 'react-motion';

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
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 unicodeMapping from '../features/emoji/emoji_unicode_mapping_light';
import { assetHost } from 'mastodon/utils/config';
export default class AutosuggestEmoji extends React.PureComponent {
export default class AutosuggestEmoji extends PureComponent {
static propTypes = {
emoji: PropTypes.object.isRequired,

View file

@ -1,9 +1,9 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ShortNumber from 'mastodon/components/short_number';
import { FormattedMessage } from 'react-intl';
export default class AutosuggestHashtag extends React.PureComponent {
export default class AutosuggestHashtag extends PureComponent {
static propTypes = {
tag: PropTypes.shape({

View file

@ -1,4 +1,3 @@
import React from 'react';
import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container';
import AutosuggestEmoji from './autosuggest_emoji';
import AutosuggestHashtag from './autosuggest_hashtag';

View file

@ -1,4 +1,3 @@
import React from 'react';
import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container';
import AutosuggestEmoji from './autosuggest_emoji';
import AutosuggestHashtag from './autosuggest_hashtag';

View file

@ -1,5 +1,3 @@
import * as React from 'react';
import classNames from 'classnames';
import { useHovering } from '../../hooks/useHovering';

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 { autoPlayGif } from '../initial_state';
import { Avatar } from './avatar';
export default class AvatarComposite extends React.PureComponent {
export default class AvatarComposite extends PureComponent {
static propTypes = {
accounts: ImmutablePropTypes.list.isRequired,

View file

@ -1,5 +1,3 @@
import React from 'react';
import { useHovering } from '../../hooks/useHovering';
import type { Account } from '../../types/resources';
import { autoPlayGif } from '../initial_state';

View file

@ -1,4 +1,4 @@
import React, { useRef, useEffect } from 'react';
import { memo, useRef, useEffect } from 'react';
import { decode } from 'blurhash';
@ -43,6 +43,6 @@ const Blurhash: React.FC<Props> = ({
);
};
const MemoizedBlurhash = React.memo(Blurhash);
const MemoizedBlurhash = memo(Blurhash);
export { MemoizedBlurhash as Blurhash };

View file

@ -1,8 +1,8 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class Button extends React.PureComponent {
export default class Button extends PureComponent {
static propTypes = {
text: PropTypes.node,

View file

@ -1,5 +1,3 @@
import React from 'react';
export const Check: React.FC = () => (
<svg
xmlns='http://www.w3.org/2000/svg'

View file

@ -1,11 +1,11 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { supportsPassiveEvents } from 'detect-passive-events';
import { scrollTop } from '../scroll';
const listenerOptions = supportsPassiveEvents ? { passive: true } : false;
export default class Column extends React.PureComponent {
export default class Column extends PureComponent {
static propTypes = {
children: PropTypes.node,

View file

@ -1,10 +1,10 @@
import React from 'react';
import { PureComponent } from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import { Icon } from 'mastodon/components/icon';
import { createPortal } from 'react-dom';
export default class ColumnBackButton extends React.PureComponent {
export default class ColumnBackButton extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
import ColumnBackButton from './column_back_button';
import { Icon } from 'mastodon/components/icon';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { createPortal } from 'react-dom';
import classNames from 'classnames';
@ -12,7 +12,7 @@ const messages = defineMessages({
moveRight: { id: 'column_header.moveRight_settings', defaultMessage: 'Move column to the right' },
});
class ColumnHeader extends React.PureComponent {
class ColumnHeader extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,5 +1,4 @@
// @ts-check
import React from 'react';
import { FormattedMessage } from 'react-intl';
/**

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { IconButton } from './icon_button';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
@ -8,7 +8,7 @@ const messages = defineMessages({
dismiss: { id: 'dismissable_banner.dismiss', defaultMessage: 'Dismiss' },
});
class DismissableBanner extends React.PureComponent {
class DismissableBanner extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,

View file

@ -5,7 +5,7 @@ import type { List } from 'immutable';
import type { Account } from '../../types/resources';
import { autoPlayGif } from '../initial_state';
import Skeleton from './skeleton';
import { Skeleton } from './skeleton';
interface Props {
account?: Account;

View file

@ -1,4 +1,4 @@
import React, { useCallback } from 'react';
import { useCallback } from 'react';
import type { InjectedIntl } from 'react-intl';
import { defineMessages, injectIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent, cloneElement, Children } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { IconButton } from './icon_button';
@ -10,7 +10,7 @@ import { CircularProgress } from 'mastodon/components/loading_indicator';
const listenerOptions = supportsPassiveEvents ? { passive: true, capture: true } : true;
let id = 0;
class DropdownMenu extends React.PureComponent {
class DropdownMenu extends PureComponent {
static contextTypes = {
router: PropTypes.object,
@ -155,7 +155,7 @@ class DropdownMenu extends React.PureComponent {
}
export default class Dropdown extends React.PureComponent {
export default class Dropdown extends PureComponent {
static contextTypes = {
router: PropTypes.object,
@ -286,7 +286,7 @@ export default class Dropdown extends React.PureComponent {
const open = this.state.id === openDropdownId;
const button = children ? React.cloneElement(React.Children.only(children), {
const button = children ? cloneElement(Children.only(children), {
onClick: this.handleClick,
onMouseDown: this.handleMouseDown,
onKeyDown: this.handleButtonKeyDown,
@ -306,7 +306,7 @@ export default class Dropdown extends React.PureComponent {
);
return (
<React.Fragment>
<>
<span ref={this.setTargetRef}>
{button}
</span>
@ -329,7 +329,7 @@ export default class Dropdown extends React.PureComponent {
</div>
)}
</Overlay>
</React.Fragment>
</>
);
}

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage, injectIntl } from 'react-intl';
import { Icon } from 'mastodon/components/icon';
@ -16,7 +16,7 @@ const mapDispatchToProps = (dispatch, { statusId }) => ({
});
class EditedTimestamp extends React.PureComponent {
class EditedTimestamp extends PureComponent {
static propTypes = {
statusId: PropTypes.string.isRequired,

View file

@ -1,11 +1,8 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { injectIntl } from 'react-intl';
import emojify from '../features/emoji/emoji';
import classNames from 'classnames';
export default class EmojiView extends React.PureComponent {
export default class EmojiView extends PureComponent {
static propTypes = {
name: PropTypes.string,

View file

@ -3,7 +3,7 @@ import React from 'react';
import classNames from 'classnames';
import { DisplayName } from 'mastodon/components/display_name';
import Skeleton from 'mastodon/components/skeleton';
import { Skeleton } from 'mastodon/components/skeleton';
interface Props {
size?: number;

View file

@ -1,11 +1,11 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { version, source_url } from 'mastodon/initial_state';
import StackTrace from 'stacktrace-js';
import { Helmet } from 'react-helmet';
export default class ErrorBoundary extends React.PureComponent {
export default class ErrorBoundary extends PureComponent {
static propTypes = {
children: PropTypes.node,

View file

@ -1,4 +1,4 @@
import React, { useCallback, useState } from 'react';
import { useCallback, useState } from 'react';
interface Props {
src: string;

View file

@ -1,15 +1,15 @@
// @ts-check
import React from 'react';
import { Component } from 'react';
import { Sparklines, SparklinesCurve } from 'react-sparklines';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { Link } from 'react-router-dom';
import ShortNumber from 'mastodon/components/short_number';
import Skeleton from 'mastodon/components/skeleton';
import { Skeleton } from 'mastodon/components/skeleton';
import classNames from 'classnames';
class SilentErrorBoundary extends React.Component {
class SilentErrorBoundary extends Component {
static propTypes = {
children: PropTypes.node,
@ -69,7 +69,7 @@ const Hashtag = ({ name, to, people, uses, history, className, description, with
<div className={classNames('trends__item', className)}>
<div className='trends__item__name'>
<Link to={to}>
{name ? <React.Fragment>#<span>{name}</span></React.Fragment> : <Skeleton width={50} />}
{name ? <>#<span>{name}</span></> : <Skeleton width={50} />}
</Link>
{description ? (

View file

@ -1,5 +1,3 @@
import React from 'react';
import classNames from 'classnames';
interface Props extends React.HTMLAttributes<HTMLImageElement> {

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import classNames from 'classnames';
@ -32,7 +32,7 @@ interface States {
activate: boolean;
deactivate: boolean;
}
export class IconButton extends React.PureComponent<Props, States> {
export class IconButton extends PureComponent<Props, States> {
static defaultProps = {
size: 18,
active: false,
@ -127,14 +127,14 @@ export class IconButton extends React.PureComponent<Props, States> {
}
let contents = (
<React.Fragment>
<>
<Icon id={icon} fixedWidth aria-hidden='true' />{' '}
{typeof counter !== 'undefined' && (
<span className='icon-button__counter'>
<AnimatedNumber value={counter} obfuscate={obfuscateCount} />
</span>
)}
</React.Fragment>
</>
);
if (href != null) {

View file

@ -1,5 +1,3 @@
import React from 'react';
import { Icon } from './icon';
const formatNumber = (num: number): number | string => (num > 40 ? '40+' : num);

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import { makeGetAccount } from 'mastodon/selectors';
@ -14,7 +14,7 @@ const makeMapStateToProps = () => {
return mapStateToProps;
};
class InlineAccount extends React.PureComponent {
class InlineAccount extends PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { cloneElement, Component } from 'react';
import PropTypes from 'prop-types';
import scheduleIdleTask from '../features/ui/util/schedule_idle_task';
import getRectFromEntry from '../features/ui/util/get_rect_from_entry';
@ -6,7 +6,7 @@ import getRectFromEntry from '../features/ui/util/get_rect_from_entry';
// Diff these props in the "unrendered" state
const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'cachedHeight'];
export default class IntersectionObserverArticle extends React.Component {
export default class IntersectionObserverArticle extends Component {
static propTypes = {
intersectionObserverWrapper: PropTypes.object.isRequired,
@ -115,14 +115,14 @@ export default class IntersectionObserverArticle extends React.Component {
data-id={id}
tabIndex={0}
>
{children && React.cloneElement(children, { hidden: true })}
{children && cloneElement(children, { hidden: true })}
</article>
);
}
return (
<article ref={this.handleRef} aria-posinset={index + 1} aria-setsize={listLength} data-id={id} tabIndex={0}>
{children && React.cloneElement(children, { hidden: false })}
{children && cloneElement(children, { hidden: false })}
</article>
);
}

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 { Icon } from 'mastodon/components/icon';
@ -7,7 +7,7 @@ const messages = defineMessages({
load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
});
class LoadGap extends React.PureComponent {
class LoadGap extends PureComponent {
static propTypes = {
disabled: PropTypes.bool,

View file

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

View file

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

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
export const CircularProgress = ({ size, strokeWidth }) => {

View file

@ -1,5 +1,3 @@
import React from 'react';
import logo from 'mastodon/../images/logo.svg';
export const WordmarkLogo: React.FC = () => (

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,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { is } from 'immutable';
@ -13,7 +13,7 @@ const messages = defineMessages({
toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: '{number, plural, one {Hide image} other {Hide images}}' },
});
class Item extends React.PureComponent {
class Item extends PureComponent {
static propTypes = {
attachment: ImmutablePropTypes.map.isRequired,
@ -212,7 +212,7 @@ class Item extends React.PureComponent {
}
class MediaGallery extends React.PureComponent {
class MediaGallery extends PureComponent {
static propTypes = {
sensitive: PropTypes.bool,

View file

@ -1,10 +1,10 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import 'wicg-inert';
import { createBrowserHistory } from 'history';
import { multiply } from 'color-blend';
export default class ModalRoot extends React.PureComponent {
export default class ModalRoot extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,21 +1,19 @@
import React from 'react';
import { PureComponent } from 'react';
import { Switch, Route, withRouter } from 'react-router-dom';
import { showTrends } from 'mastodon/initial_state';
import Trends from 'mastodon/features/getting_started/containers/trends_container';
import AccountNavigation from 'mastodon/features/account/navigation';
const DefaultNavigation = () => (
<>
{showTrends && (
<>
<div className='flex-spacer' />
<Trends />
</>
)}
</>
showTrends ? (
<>
<div className='flex-spacer' />
<Trends />
</>
) : null
);
class NavigationPortal extends React.PureComponent {
class NavigationPortal extends PureComponent {
render () {
return (

View file

@ -1,5 +1,3 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
export const NotSignedInIndicator: React.FC = () => (

View file

@ -1,11 +1,11 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Icon } from 'mastodon/components/icon';
import { removePictureInPicture } from 'mastodon/actions/picture_in_picture';
import { connect } from 'react-redux';
import { FormattedMessage } from 'react-intl';
class PictureInPicturePlaceholder extends React.PureComponent {
class PictureInPicturePlaceholder 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,5 +1,3 @@
import React from 'react';
import classNames from 'classnames';
interface Props {

View file

@ -1,4 +1,3 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
import illustration from 'mastodon/../images/elephant_ui_working.svg';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { Component } from 'react';
import type { InjectedIntl } from 'react-intl';
import { injectIntl, defineMessages } from 'react-intl';
@ -199,7 +199,7 @@ interface Props {
interface States {
now: number;
}
class RelativeTimestamp extends React.Component<Props, States> {
class RelativeTimestamp extends Component<Props, States> {
state = {
now: this.props.intl.now(),
};

View file

@ -1,4 +1,4 @@
import React, { PureComponent } from 'react';
import { Children, cloneElement, PureComponent } from 'react';
import ScrollContainer from 'mastodon/containers/scroll_container';
import PropTypes from 'prop-types';
import IntersectionObserverArticleContainer from '../containers/intersection_observer_article_container';
@ -184,8 +184,8 @@ class ScrollableList extends PureComponent {
};
getSnapshotBeforeUpdate (prevProps) {
const someItemInserted = React.Children.count(prevProps.children) > 0 &&
React.Children.count(prevProps.children) < React.Children.count(this.props.children) &&
const someItemInserted = Children.count(prevProps.children) > 0 &&
Children.count(prevProps.children) < Children.count(this.props.children) &&
this.getFirstChildKey(prevProps) !== this.getFirstChildKey(this.props);
const pendingChanged = (prevProps.numPending > 0) !== (this.props.numPending > 0);
@ -293,7 +293,7 @@ class ScrollableList extends PureComponent {
render () {
const { children, scrollKey, trackScroll, showLoading, isLoading, hasMore, numPending, prepend, alwaysPrepend, append, emptyMessage, onLoadMore } = this.props;
const { fullscreen } = this.state;
const childrenCount = React.Children.count(children);
const childrenCount = Children.count(children);
const loadMore = (hasMore && onLoadMore) ? <LoadMore visible={!isLoading} onClick={this.handleLoadMore} /> : null;
const loadPending = (numPending > 0) ? <LoadPending count={numPending} onClick={this.handleLoadPending} /> : null;
@ -319,7 +319,7 @@ class ScrollableList extends PureComponent {
{loadPending}
{React.Children.map(this.props.children, (child, index) => (
{Children.map(this.props.children, (child, index) => (
<IntersectionObserverArticleContainer
key={child.key}
id={child.key}
@ -328,7 +328,7 @@ class ScrollableList extends PureComponent {
intersectionObserverWrapper={this.intersectionObserverWrapper}
saveHeightKey={trackScroll ? `${this.context.router.route.location.key}:${scrollKey}` : null}
>
{React.cloneElement(child, {
{cloneElement(child, {
getScrollPosition: this.getScrollPosition,
updateScrollBottom: this.updateScrollBottom,
cachedMediaWidth: this.state.cachedMediaWidth,

View file

@ -1,10 +1,10 @@
import PropTypes from 'prop-types';
import React from 'react';
import { PureComponent } from 'react';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import { fetchServer } from 'mastodon/actions/server';
import ShortNumber from 'mastodon/components/short_number';
import Skeleton from 'mastodon/components/skeleton';
import { Skeleton } from 'mastodon/components/skeleton';
import Account from 'mastodon/containers/account_container';
import { domain } from 'mastodon/initial_state';
import { ServerHeroImage } from 'mastodon/components/server_hero_image';
@ -18,7 +18,7 @@ const mapStateToProps = state => ({
server: state.getIn(['server', 'server']),
});
class ServerBanner extends React.PureComponent {
class ServerBanner extends PureComponent {
static propTypes = {
server: PropTypes.object,

View file

@ -1,4 +1,4 @@
import React, { useCallback, useState } from 'react';
import { useCallback, useState } from 'react';
import classNames from 'classnames';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { memo } from 'react';
import PropTypes from 'prop-types';
import { toShortNumber, pluralReady, DECIMAL_UNITS } from '../utils/numbers';
import { FormattedMessage, FormattedNumber } from 'react-intl';
@ -110,4 +110,4 @@ ShortNumberCounter.propTypes = {
value: PropTypes.arrayOf(PropTypes.number),
};
export default React.memo(ShortNumber);
export default memo(ShortNumber);

View file

@ -1,11 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
const Skeleton = ({ width, height }) => <span className='skeleton' style={{ width, height }}>&zwnj;</span>;
Skeleton.propTypes = {
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
};
export default Skeleton;

View file

@ -0,0 +1,10 @@
interface Props {
width?: number | string;
height?: number | string;
}
export const Skeleton: React.FC<Props> = ({ width, height }) => (
<span className='skeleton' style={{ width, height }}>
&zwnj;
</span>
);

View file

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

View file

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

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 { FormattedMessage, injectIntl } from 'react-intl';
@ -11,7 +11,7 @@ import { autoPlayGif, languages as preloadedLanguages } from 'mastodon/initial_s
const MAX_HEIGHT = 706; // 22px * 32 (+ 2px padding at the top)
class TranslateButton extends React.PureComponent {
class TranslateButton extends PureComponent {
static propTypes = {
translation: ImmutablePropTypes.map,
@ -52,7 +52,7 @@ const mapStateToProps = state => ({
languages: state.getIn(['server', 'translationLanguages', 'items']),
});
class StatusContent extends React.PureComponent {
class StatusContent extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,11 +1,11 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { injectIntl } from 'react-intl';
import classNames from 'classnames';
import EmojiView from './emoji_view';
class EmojiReactionButton extends React.PureComponent {
class EmojiReactionButton extends PureComponent {
static propTypes = {
name: PropTypes.string,
@ -49,7 +49,7 @@ class EmojiReactionButton extends React.PureComponent {
}
class StatusEmojiReactionsBar extends React.PureComponent {
class StatusEmojiReactionsBar extends PureComponent {
static propTypes = {
emojiReactions: ImmutablePropTypes.list.isRequired,

View file

@ -1,5 +1,4 @@
import { debounce } from 'lodash';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import StatusContainer from '../containers/status_container';

View file

@ -1,18 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
const TimelineHint = ({ resource, url }) => (
<div className='timeline-hint'>
<strong><FormattedMessage id='timeline_hint.remote_resource_not_displayed' defaultMessage='{resource} from other servers are not displayed.' values={{ resource }} /></strong>
<br />
<a href={url} target='_blank' rel='noopener'><FormattedMessage id='account.browse_more_on_origin_server' defaultMessage='Browse more on the original profile' /></a>
</div>
);
TimelineHint.propTypes = {
resource: PropTypes.node.isRequired,
url: PropTypes.string.isRequired,
};
export default TimelineHint;

View file

@ -0,0 +1,25 @@
import { FormattedMessage } from 'react-intl';
interface Props {
resource: JSX.Element;
url: string;
}
export const TimelineHint: React.FC<Props> = ({ resource, url }) => (
<div className='timeline-hint'>
<strong>
<FormattedMessage
id='timeline_hint.remote_resource_not_displayed'
defaultMessage='{resource} from other servers are not displayed.'
values={{ resource }}
/>
</strong>
<br />
<a href={url} target='_blank' rel='noopener noreferrer'>
<FormattedMessage
id='account.browse_more_on_origin_server'
defaultMessage='Browse more on the original profile'
/>
</a>
</div>
);

View file

@ -1,5 +1,3 @@
import React from 'react';
import { Icon } from './icon';
interface Props {

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { makeGetAccount } from '../selectors';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
@ -6,7 +6,7 @@ import { getLocale } from '../locales';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
export default class AdminComponent extends React.PureComponent {
export default class AdminComponent extends PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { Provider } from 'react-redux';
import PropTypes from 'prop-types';
import { store } from '../store';
@ -18,7 +18,7 @@ if (initialState) {
store.dispatch(fetchCustomEmojis());
export default class TimelineContainer extends React.PureComponent {
export default class TimelineContainer extends PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { blockDomain, unblockDomain } from '../actions/domain_blocks';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';

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 { IntlProvider, addLocaleData } from 'react-intl';
import { Provider as ReduxProvider } from 'react-redux';
@ -34,7 +34,7 @@ const createIdentityContext = state => ({
permissions: state.role ? state.role.permissions : 0,
});
export default class Mastodon extends React.PureComponent {
export default class Mastodon extends PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,

View file

@ -1,4 +1,4 @@
import React, { PureComponent, Fragment } from 'react';
import { PureComponent } from 'react';
import { createPortal } from 'react-dom';
import PropTypes from 'prop-types';
import { IntlProvider, addLocaleData } from 'react-intl';
@ -73,9 +73,16 @@ export default class MediaContainer extends PureComponent {
render () {
const { locale, components } = this.props;
let handleOpenVideo;
// Don't offer to expand the video in a lightbox if we're in a frame
if (window.self === window.top) {
handleOpenVideo = this.handleOpenVideo;
}
return (
<IntlProvider locale={locale} messages={messages}>
<Fragment>
<>
{[].map.call(components, (component, i) => {
const componentName = component.getAttribute('data-component');
const Component = MEDIA_COMPONENTS[componentName];
@ -89,7 +96,7 @@ export default class MediaContainer extends PureComponent {
...(componentName === 'Video' ? {
componentIndex: i,
onOpenVideo: this.handleOpenVideo,
onOpenVideo: handleOpenVideo,
} : {
onOpenMedia: this.handleOpenMedia,
}),
@ -115,7 +122,7 @@ export default class MediaContainer extends PureComponent {
/>
)}
</ModalRoot>
</Fragment>
</>
</IntlProvider>
);
}

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import Status from '../components/status';
import { makeGetStatus, makeGetPictureInPicture } from '../selectors';

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';

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