Merge commit '34225d7199
' into kb_migration
This commit is contained in:
commit
76340285d6
168 changed files with 965 additions and 611 deletions
24
.eslintrc.js
24
.eslintrc.js
|
@ -32,10 +32,14 @@ module.exports = {
|
|||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: {
|
||||
experimentalObjectRestSpread: true,
|
||||
jsx: true,
|
||||
},
|
||||
ecmaVersion: 2021,
|
||||
requireConfigFile: false,
|
||||
babelOptions: {
|
||||
configFile: false,
|
||||
presets: ['@babel/react', '@babel/env'],
|
||||
},
|
||||
},
|
||||
|
||||
settings: {
|
||||
|
@ -214,4 +218,22 @@ module.exports = {
|
|||
'promise/no-nesting': 'off',
|
||||
'promise/no-promise-in-callback': 'off',
|
||||
},
|
||||
|
||||
overrides: [
|
||||
{
|
||||
files: [
|
||||
'*.config.js',
|
||||
'.*rc.js',
|
||||
'ide-helper.js',
|
||||
],
|
||||
|
||||
env: {
|
||||
commonjs: true,
|
||||
},
|
||||
|
||||
parserOptions: {
|
||||
sourceType: 'script',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
2
.github/workflows/test-ruby.yml
vendored
2
.github/workflows/test-ruby.yml
vendored
|
@ -40,7 +40,7 @@ jobs:
|
|||
ruby-version: .ruby-version
|
||||
bundler-cache: true
|
||||
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: yarn --frozen-lockfile --production
|
||||
- name: Precompile assets
|
||||
# Previously had set this, but it's not supported
|
||||
# export NODE_OPTIONS=--openssl-legacy-provider
|
||||
|
|
4
.husky/pre-commit
Executable file
4
.husky/pre-commit
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
41
.rubocop.yml
41
.rubocop.yml
|
@ -59,10 +59,49 @@ Metrics/BlockNesting:
|
|||
Exclude:
|
||||
- 'lib/mastodon/*_cli.rb'
|
||||
|
||||
# Reason: Some Excluded files would be candidates for refactoring but not currently addressed
|
||||
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsclasslength
|
||||
Metrics/ClassLength:
|
||||
CountAsOne: [array, heredoc]
|
||||
CountAsOne: ['array', 'hash', 'heredoc', 'method_call']
|
||||
Exclude:
|
||||
- 'lib/mastodon/*_cli.rb'
|
||||
- 'app/controllers/admin/accounts_controller.rb'
|
||||
- 'app/controllers/api/base_controller.rb'
|
||||
- 'app/controllers/api/v1/admin/accounts_controller.rb'
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/controllers/auth/registrations_controller.rb'
|
||||
- 'app/controllers/auth/sessions_controller.rb'
|
||||
- 'app/lib/activitypub/activity.rb'
|
||||
- 'app/lib/activitypub/activity/create.rb'
|
||||
- 'app/lib/activitypub/tag_manager.rb'
|
||||
- 'app/lib/feed_manager.rb'
|
||||
- 'app/lib/link_details_extractor.rb'
|
||||
- 'app/lib/request.rb'
|
||||
- 'app/lib/text_formatter.rb'
|
||||
- 'app/lib/user_settings_decorator.rb'
|
||||
- 'app/mailers/user_mailer.rb'
|
||||
- 'app/models/account.rb'
|
||||
- 'app/models/admin/account_action.rb'
|
||||
- 'app/models/form/account_batch.rb'
|
||||
- 'app/models/media_attachment.rb'
|
||||
- 'app/models/status.rb'
|
||||
- 'app/models/tag.rb'
|
||||
- 'app/models/user.rb'
|
||||
- 'app/serializers/activitypub/actor_serializer.rb'
|
||||
- 'app/serializers/activitypub/note_serializer.rb'
|
||||
- 'app/serializers/rest/status_serializer.rb'
|
||||
- 'app/services/account_search_service.rb'
|
||||
- 'app/services/activitypub/process_account_service.rb'
|
||||
- 'app/services/activitypub/process_status_update_service.rb'
|
||||
- 'app/services/backup_service.rb'
|
||||
- 'app/services/delete_account_service.rb'
|
||||
- 'app/services/fan_out_on_write_service.rb'
|
||||
- 'app/services/fetch_link_card_service.rb'
|
||||
- 'app/services/import_service.rb'
|
||||
- 'app/services/notify_service.rb'
|
||||
- 'app/services/post_status_service.rb'
|
||||
- 'app/services/update_status_service.rb'
|
||||
- 'lib/paperclip/color_extractor.rb'
|
||||
|
||||
Metrics/CyclomaticComplexity:
|
||||
Exclude:
|
||||
|
|
|
@ -243,10 +243,6 @@ Metrics/BlockNesting:
|
|||
Exclude:
|
||||
- 'lib/tasks/mastodon.rake'
|
||||
|
||||
# Configuration parameters: CountComments, CountAsOne.
|
||||
Metrics/ClassLength:
|
||||
Max: 375
|
||||
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 25
|
||||
|
|
|
@ -44,3 +44,6 @@ Gruntfile.js
|
|||
# for specific ignore
|
||||
!.svgo.yml
|
||||
!sass-lint/**/*.yml
|
||||
|
||||
# breaks lint-staged or generally anything using https://github.com/eemeli/yaml/issues/384
|
||||
!**/yaml/dist/**/doc
|
||||
|
|
|
@ -37,7 +37,7 @@ RUN apt-get update && \
|
|||
bundle config set --local without 'development test' && \
|
||||
bundle config set silence_root_warning true && \
|
||||
bundle install -j"$(nproc)" && \
|
||||
yarn install --pure-lockfile --network-timeout 600000 && \
|
||||
yarn install --pure-lockfile --production --network-timeout 600000 && \
|
||||
yarn cache clean
|
||||
|
||||
FROM node:${NODE_VERSION}
|
||||
|
|
|
@ -5,7 +5,7 @@ class Api::V1::StreamingController < Api::BaseController
|
|||
if Rails.configuration.x.streaming_api_base_url == request.host
|
||||
not_found
|
||||
else
|
||||
redirect_to streaming_api_url, status: 301
|
||||
redirect_to streaming_api_url, status: 301, allow_other_host: true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ module AccountControllerConcern
|
|||
|
||||
included do
|
||||
before_action :set_instance_presenter
|
||||
before_action :set_link_headers, if: -> { request.format.nil? || request.format == :html }
|
||||
|
||||
after_action :set_link_headers, if: -> { request.format.nil? || request.format == :html }
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -187,7 +187,7 @@ module CacheConcern
|
|||
return [] if raw.empty?
|
||||
|
||||
cached_keys_with_value = begin
|
||||
Rails.cache.read_multi(*raw, namespace: 'v2').transform_keys(&:id).transform_values { |r| ActiveRecordCoder.load(r) }
|
||||
Rails.cache.read_multi(*raw).transform_keys(&:id).transform_values { |r| ActiveRecordCoder.load(r) }
|
||||
rescue ActiveRecordCoder::Error
|
||||
{} # The serialization format may have changed, let's pretend it's a cache miss.
|
||||
end
|
||||
|
@ -200,7 +200,7 @@ module CacheConcern
|
|||
uncached = klass.where(id: uncached_ids).with_includes.index_by(&:id)
|
||||
|
||||
uncached.each_value do |item|
|
||||
Rails.cache.write(item, ActiveRecordCoder.dump(item), namespace: 'v2')
|
||||
Rails.cache.write(item, ActiveRecordCoder.dump(item))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class MediaProxyController < ApplicationController
|
|||
redownload! if @media_attachment.needs_redownload? && !reject_media?
|
||||
end
|
||||
|
||||
redirect_to full_asset_url(@media_attachment.file.url(version))
|
||||
redirect_to full_asset_url(@media_attachment.file.url(version)), allow_other_host: true
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -9,11 +9,12 @@ class StatusesController < ApplicationController
|
|||
before_action :require_account_signature!, only: [:show, :activity], if: -> { request.format == :json && authorized_fetch_mode? }
|
||||
before_action :set_status
|
||||
before_action :set_instance_presenter
|
||||
before_action :set_link_headers
|
||||
before_action :redirect_to_original, only: :show
|
||||
before_action :set_cache_headers
|
||||
before_action :set_body_classes, only: :embed
|
||||
|
||||
after_action :set_link_headers
|
||||
|
||||
skip_around_action :set_locale, if: -> { request.format == :json }
|
||||
skip_before_action :require_functional!, only: [:show, :embed], unless: :whitelist_mode?
|
||||
|
||||
|
@ -70,6 +71,6 @@ class StatusesController < ApplicationController
|
|||
end
|
||||
|
||||
def redirect_to_original
|
||||
redirect_to ActivityPub::TagManager.instance.url_for(@status.reblog) if @status.reblog?
|
||||
redirect_to(ActivityPub::TagManager.instance.url_for(@status.reblog), allow_other_host: true) if @status.reblog?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,6 @@ import { defineMessages } from 'react-intl';
|
|||
import api from 'mastodon/api';
|
||||
import { search as emojiSearch } from 'mastodon/features/emoji/emoji_mart_search_light';
|
||||
import { tagHistory } from 'mastodon/settings';
|
||||
import resizeImage from 'mastodon/utils/resize_image';
|
||||
import { showAlert, showAlertForError } from './alerts';
|
||||
import { useEmoji } from './emojis';
|
||||
import { importFetchedAccounts, importFetchedStatus } from './importer';
|
||||
|
@ -275,16 +274,13 @@ export function uploadCompose(files) {
|
|||
|
||||
dispatch(uploadComposeRequest());
|
||||
|
||||
for (const [i, f] of Array.from(files).entries()) {
|
||||
for (const [i, file] of Array.from(files).entries()) {
|
||||
if (media.size + i > 3) break;
|
||||
|
||||
resizeImage(f).then(file => {
|
||||
const data = new FormData();
|
||||
data.append('file', file);
|
||||
// Account for disparity in size of original image and resized data
|
||||
total += file.size - f.size;
|
||||
|
||||
return api(getState).post('/api/v2/media', data, {
|
||||
api(getState).post('/api/v2/media', data, {
|
||||
onUploadProgress: function({ loaded }){
|
||||
progress[i] = loaded;
|
||||
dispatch(uploadComposeProgress(progress.reduce((a, v) => a + v, 0), total));
|
||||
|
@ -294,7 +290,7 @@ export function uploadCompose(files) {
|
|||
// poll the server until it is, before showing the media attachment as uploaded
|
||||
|
||||
if (status === 200) {
|
||||
dispatch(uploadComposeSuccess(data, f));
|
||||
dispatch(uploadComposeSuccess(data, file));
|
||||
} else if (status === 202) {
|
||||
dispatch(uploadComposeProcessing());
|
||||
|
||||
|
@ -303,7 +299,7 @@ export function uploadCompose(files) {
|
|||
const poll = () => {
|
||||
api(getState).get(`/api/v1/media/${data.id}`).then(response => {
|
||||
if (response.status === 200) {
|
||||
dispatch(uploadComposeSuccess(response.data, f));
|
||||
dispatch(uploadComposeSuccess(response.data, file));
|
||||
} else if (response.status === 206) {
|
||||
const retryAfter = (Math.log2(tryCount) || 1) * 1000;
|
||||
tryCount += 1;
|
||||
|
@ -314,7 +310,6 @@ export function uploadCompose(files) {
|
|||
|
||||
poll();
|
||||
}
|
||||
});
|
||||
}).catch(error => dispatch(uploadComposeFail(error)));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -4,7 +4,6 @@ import 'es6-symbol/implement';
|
|||
import includes from 'array-includes';
|
||||
import assign from 'object-assign';
|
||||
import values from 'object.values';
|
||||
import isNaN from 'is-nan';
|
||||
import { decode as decodeBase64 } from './utils/base64';
|
||||
import promiseFinally from 'promise.prototype.finally';
|
||||
|
||||
|
@ -20,10 +19,6 @@ if (!Object.values) {
|
|||
values.shim();
|
||||
}
|
||||
|
||||
if (!Number.isNaN) {
|
||||
Number.isNaN = isNaN;
|
||||
}
|
||||
|
||||
promiseFinally.shim();
|
||||
|
||||
if (!HTMLCanvasElement.prototype.toBlob) {
|
||||
|
|
|
@ -10,6 +10,9 @@ import { me } from '../initial_state';
|
|||
import RelativeTimestamp from './relative_timestamp';
|
||||
import Skeleton from 'mastodon/components/skeleton';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { counterRenderer } from 'mastodon/components/common_counter';
|
||||
import ShortNumber from 'mastodon/components/short_number';
|
||||
import Icon from 'mastodon/components/icon';
|
||||
|
||||
const messages = defineMessages({
|
||||
follow: { id: 'account.follow', defaultMessage: 'Follow' },
|
||||
|
@ -23,7 +26,26 @@ const messages = defineMessages({
|
|||
block: { id: 'account.block', defaultMessage: 'Block @{name}' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class VerifiedBadge extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
link: PropTypes.string.isRequired,
|
||||
verifiedAt: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
render () {
|
||||
const { link } = this.props;
|
||||
|
||||
return (
|
||||
<span className='verified-badge'>
|
||||
<Icon id='check' className='verified-badge__mark' />
|
||||
<span dangerouslySetInnerHTML={{ __html: link }} />
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Account extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -79,7 +101,11 @@ class Account extends ImmutablePureComponent {
|
|||
<div className='account__wrapper'>
|
||||
<div className='account__display-name'>
|
||||
<div className='account__avatar-wrapper'><Skeleton width={36} height={36} /></div>
|
||||
|
||||
<div>
|
||||
<DisplayName />
|
||||
<Skeleton width='7ch' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -133,18 +159,32 @@ class Account extends ImmutablePureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
let mute_expires_at;
|
||||
let muteTimeRemaining;
|
||||
|
||||
if (account.get('mute_expires_at')) {
|
||||
mute_expires_at = <div><RelativeTimestamp timestamp={account.get('mute_expires_at')} futureDate /></div>;
|
||||
muteTimeRemaining = <>· <RelativeTimestamp timestamp={account.get('mute_expires_at')} futureDate /></>;
|
||||
}
|
||||
|
||||
let verification;
|
||||
|
||||
const firstVerifiedField = account.get('fields').find(item => !!item.get('verified_at'));
|
||||
|
||||
if (firstVerifiedField) {
|
||||
verification = <>· <VerifiedBadge link={firstVerifiedField.get('value')} verifiedAt={firstVerifiedField.get('verified_at')} /></>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='account'>
|
||||
<div className='account__wrapper'>
|
||||
<Link key={account.get('id')} className='account__display-name' title={account.get('acct')} to={`/@${account.get('acct')}`}>
|
||||
<div className='account__avatar-wrapper'><Avatar account={account} size={size} /></div>
|
||||
{mute_expires_at}
|
||||
<div className='account__avatar-wrapper'>
|
||||
<Avatar account={account} size={size} />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<DisplayName account={account} />
|
||||
<ShortNumber value={account.get('followers_count')} renderer={counterRenderer('followers')} /> {verification} {muteTimeRemaining}
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
<div>
|
||||
|
@ -160,3 +200,5 @@ class Account extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(Account);
|
||||
|
|
|
@ -84,7 +84,6 @@ class Rule extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @injectIntl
|
||||
class ReportReasonSelector extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -157,3 +156,5 @@ class ReportReasonSelector extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(ReportReasonSelector);
|
||||
|
|
|
@ -12,7 +12,6 @@ const messages = defineMessages({
|
|||
moveRight: { id: 'column_header.moveRight_settings', defaultMessage: 'Move column to the right' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class ColumnHeader extends React.PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -209,3 +208,5 @@ class ColumnHeader extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(ColumnHeader);
|
||||
|
|
|
@ -8,7 +8,6 @@ const messages = defineMessages({
|
|||
dismiss: { id: 'dismissable_banner.dismiss', defaultMessage: 'Dismiss' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class DismissableBanner extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -49,3 +48,5 @@ class DismissableBanner extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(DismissableBanner);
|
||||
|
|
|
@ -8,7 +8,6 @@ const messages = defineMessages({
|
|||
unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unblock domain {domain}' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class Account extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -40,3 +39,5 @@ class Account extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(Account);
|
||||
|
|
|
@ -16,8 +16,6 @@ const mapDispatchToProps = (dispatch, { statusId }) => ({
|
|||
|
||||
});
|
||||
|
||||
export default @connect(null, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class EditedTimestamp extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -68,3 +66,5 @@ class EditedTimestamp extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(null, mapDispatchToProps)(injectIntl(EditedTimestamp));
|
||||
|
|
|
@ -14,7 +14,6 @@ const makeMapStateToProps = () => {
|
|||
return mapStateToProps;
|
||||
};
|
||||
|
||||
export default @connect(makeMapStateToProps)
|
||||
class InlineAccount extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -32,3 +31,5 @@ class InlineAccount extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(makeMapStateToProps)(InlineAccount);
|
||||
|
|
|
@ -7,7 +7,6 @@ const messages = defineMessages({
|
|||
load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class LoadGap extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -32,3 +31,5 @@ class LoadGap extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(LoadGap);
|
||||
|
|
|
@ -223,7 +223,6 @@ class Item extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @injectIntl
|
||||
class MediaGallery extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -369,3 +368,5 @@ class MediaGallery extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(MediaGallery);
|
||||
|
|
|
@ -15,7 +15,6 @@ const DefaultNavigation = () => (
|
|||
</>
|
||||
);
|
||||
|
||||
export default @withRouter
|
||||
class NavigationPortal extends React.PureComponent {
|
||||
|
||||
render () {
|
||||
|
@ -33,3 +32,4 @@ class NavigationPortal extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
export default withRouter(NavigationPortal);
|
||||
|
|
|
@ -6,7 +6,6 @@ import { connect } from 'react-redux';
|
|||
import { debounce } from 'lodash';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
export default @connect()
|
||||
class PictureInPicturePlaceholder extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -67,3 +66,5 @@ class PictureInPicturePlaceholder extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect()(PictureInPicturePlaceholder);
|
||||
|
|
|
@ -31,7 +31,6 @@ const makeEmojiMap = record => record.get('emojis').reduce((obj, emoji) => {
|
|||
return obj;
|
||||
}, {});
|
||||
|
||||
export default @injectIntl
|
||||
class Poll extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -234,3 +233,5 @@ class Poll extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(Poll);
|
||||
|
|
|
@ -121,7 +121,6 @@ const timeRemainingString = (intl, date, now, timeGiven = true) => {
|
|||
return relativeTime;
|
||||
};
|
||||
|
||||
export default @injectIntl
|
||||
class RelativeTimestamp extends React.Component {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -197,3 +196,5 @@ class RelativeTimestamp extends React.Component {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(RelativeTimestamp);
|
||||
|
|
|
@ -20,7 +20,6 @@ const mapStateToProps = (state, { scrollKey }) => {
|
|||
};
|
||||
};
|
||||
|
||||
export default @connect(mapStateToProps, null, null, { forwardRef: true })
|
||||
class ScrollableList extends PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -365,3 +364,5 @@ class ScrollableList extends PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, null, null, { forwardRef: true })(ScrollableList);
|
||||
|
|
|
@ -18,8 +18,6 @@ const mapStateToProps = state => ({
|
|||
server: state.getIn(['server', 'server']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class ServerBanner extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -91,3 +89,5 @@ class ServerBanner extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(ServerBanner));
|
||||
|
|
|
@ -61,7 +61,6 @@ const messages = defineMessages({
|
|||
edited: { id: 'status.edited', defaultMessage: 'Edited {date}' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class Status extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -565,3 +564,5 @@ class Status extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(Status);
|
||||
|
|
|
@ -55,8 +55,6 @@ const mapStateToProps = (state, { status }) => ({
|
|||
relationship: state.getIn(['relationships', status.getIn(['account', 'id'])]),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class StatusActionBar extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -405,3 +403,5 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(StatusActionBar));
|
||||
|
|
|
@ -52,8 +52,6 @@ const mapStateToProps = state => ({
|
|||
languages: state.getIn(['server', 'translationLanguages', 'items']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class StatusContent extends React.PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -311,3 +309,5 @@ class StatusContent extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(StatusContent));
|
||||
|
|
|
@ -80,8 +80,6 @@ class Section extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class About extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -217,3 +215,5 @@ class About extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(About));
|
||||
|
|
|
@ -43,7 +43,6 @@ class InlineAlert extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @injectIntl
|
||||
class AccountNote extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -168,3 +167,5 @@ class AccountNote extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(AccountNote);
|
||||
|
|
|
@ -10,7 +10,6 @@ const messages = defineMessages({
|
|||
empty: { id: 'account.featured_tags.last_status_never', defaultMessage: 'No posts' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class FeaturedTags extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -50,3 +49,5 @@ class FeaturedTags extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(FeaturedTags);
|
||||
|
|
|
@ -76,7 +76,6 @@ const dateFormatOptions = {
|
|||
minute: '2-digit',
|
||||
};
|
||||
|
||||
export default @injectIntl
|
||||
class Header extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -419,3 +418,5 @@ class Header extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(Header);
|
||||
|
|
|
@ -19,7 +19,6 @@ const mapStateToProps = (state, { match: { params: { acct } } }) => {
|
|||
};
|
||||
};
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class AccountNavigation extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -50,3 +49,5 @@ class AccountNavigation extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(AccountNavigation);
|
||||
|
|
|
@ -74,7 +74,7 @@ export default class MediaItem extends ImmutablePureComponent {
|
|||
if (['audio', 'video'].includes(attachment.get('type'))) {
|
||||
content = (
|
||||
<img
|
||||
src={attachment.get('preview_url') || attachment.getIn(['account', 'avatar_static'])}
|
||||
src={attachment.get('preview_url') || status.getIn(['account', 'avatar_static'])}
|
||||
alt={attachment.get('description')}
|
||||
lang={status.get('language')}
|
||||
onLoad={this.handleImageLoad}
|
||||
|
|
|
@ -60,7 +60,6 @@ class LoadMoreMedia extends ImmutablePureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class AccountGallery extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -226,3 +225,5 @@ class AccountGallery extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(AccountGallery);
|
||||
|
|
|
@ -14,7 +14,6 @@ const mapDispatchToProps = (dispatch, { accountId }) => ({
|
|||
|
||||
});
|
||||
|
||||
export default @connect(() => {}, mapDispatchToProps)
|
||||
class LimitedAccountHint extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -34,3 +33,5 @@ class LimitedAccountHint extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(() => {}, mapDispatchToProps)(LimitedAccountHint);
|
||||
|
|
|
@ -64,7 +64,6 @@ RemoteHint.propTypes = {
|
|||
url: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class AccountTimeline extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -206,3 +205,5 @@ class AccountTimeline extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(AccountTimeline);
|
||||
|
|
|
@ -22,7 +22,6 @@ const messages = defineMessages({
|
|||
const TICK_SIZE = 10;
|
||||
const PADDING = 180;
|
||||
|
||||
export default @injectIntl
|
||||
class Audio extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -569,3 +568,5 @@ class Audio extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(Audio);
|
||||
|
|
|
@ -22,8 +22,6 @@ const mapStateToProps = state => ({
|
|||
isLoading: state.getIn(['user_lists', 'blocks', 'isLoading'], true),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Blocks extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -77,3 +75,5 @@ class Blocks extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Blocks));
|
||||
|
|
|
@ -22,8 +22,6 @@ const mapStateToProps = state => ({
|
|||
hasMore: !!state.getIn(['status_lists', 'bookmarks', 'next']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Bookmarks extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -106,3 +104,5 @@ class Bookmarks extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Bookmarks));
|
||||
|
|
|
@ -9,7 +9,6 @@ const mapStateToProps = state => ({
|
|||
message: state.getIn(['server', 'server', 'registrations', 'message']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class ClosedRegistrationsModal extends ImmutablePureComponent {
|
||||
|
||||
componentDidMount () {
|
||||
|
@ -73,3 +72,5 @@ class ClosedRegistrationsModal extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(ClosedRegistrationsModal);
|
||||
|
|
|
@ -4,7 +4,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|||
import { injectIntl, FormattedMessage } from 'react-intl';
|
||||
import SettingToggle from '../../notifications/components/setting_toggle';
|
||||
|
||||
export default @injectIntl
|
||||
class ColumnSettings extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -27,3 +26,5 @@ class ColumnSettings extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(ColumnSettings);
|
||||
|
|
|
@ -30,8 +30,6 @@ const mapStateToProps = (state, { columnId }) => {
|
|||
};
|
||||
};
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class CommunityTimeline extends React.PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -158,3 +156,5 @@ class CommunityTimeline extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(CommunityTimeline));
|
||||
|
|
|
@ -21,7 +21,6 @@ const messages = defineMessages({
|
|||
bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class ActionBar extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -67,3 +66,5 @@ class ActionBar extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(ActionBar);
|
||||
|
|
|
@ -32,7 +32,6 @@ const messages = defineMessages({
|
|||
saveChanges: { id: 'compose_form.save_changes', defaultMessage: 'Save changes' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class ComposeForm extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -309,3 +308,5 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(ComposeForm);
|
||||
|
|
|
@ -144,8 +144,7 @@ class ModifierPicker extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
@injectIntl
|
||||
class EmojiPickerMenu extends React.PureComponent {
|
||||
class EmojiPickerMenuImpl extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
custom_emojis: ImmutablePropTypes.list,
|
||||
|
@ -305,7 +304,8 @@ class EmojiPickerMenu extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @injectIntl
|
||||
const EmojiPickerMenu = injectIntl(EmojiPickerMenuImpl);
|
||||
|
||||
class EmojiPickerDropdown extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -428,3 +428,5 @@ class EmojiPickerDropdown extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(EmojiPickerDropdown);
|
||||
|
|
|
@ -237,7 +237,6 @@ class LanguageDropdownMenu extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @injectIntl
|
||||
class LanguageDropdown extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -325,3 +324,5 @@ class LanguageDropdown extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(LanguageDropdown);
|
||||
|
|
|
@ -13,8 +13,6 @@ const iconStyle = {
|
|||
lineHeight: '27px',
|
||||
};
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
class PollButton extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -53,3 +51,5 @@ class PollButton extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(PollButton);
|
||||
|
|
|
@ -20,8 +20,7 @@ const messages = defineMessages({
|
|||
days: { id: 'intervals.full.days', defaultMessage: '{number, plural, one {# day} other {# days}}' },
|
||||
});
|
||||
|
||||
@injectIntl
|
||||
class Option extends React.PureComponent {
|
||||
class OptionIntl extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
|
@ -113,8 +112,8 @@ class Option extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
const Option = injectIntl(OptionIntl);
|
||||
|
||||
class PollForm extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -180,3 +179,5 @@ class PollForm extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(PollForm);
|
||||
|
|
|
@ -134,7 +134,6 @@ class PrivacyDropdownMenu extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @injectIntl
|
||||
class PrivacyDropdown extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -288,3 +287,5 @@ class PrivacyDropdown extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(PrivacyDropdown);
|
||||
|
|
|
@ -12,7 +12,6 @@ const messages = defineMessages({
|
|||
cancel: { id: 'reply_indicator.cancel', defaultMessage: 'Cancel' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class ReplyIndicator extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -69,3 +68,5 @@ class ReplyIndicator extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(ReplyIndicator);
|
||||
|
|
|
@ -32,7 +32,6 @@ class SearchPopout extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @injectIntl
|
||||
class Search extends React.PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -145,3 +144,5 @@ class Search extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(Search);
|
||||
|
|
|
@ -14,7 +14,6 @@ const messages = defineMessages({
|
|||
dismissSuggestion: { id: 'suggestions.dismiss', defaultMessage: 'Dismiss suggestion' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class SearchResults extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -138,3 +137,5 @@ class SearchResults extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(SearchResults);
|
||||
|
|
|
@ -23,8 +23,6 @@ const iconStyle = {
|
|||
lineHeight: '27px',
|
||||
};
|
||||
|
||||
export default @connect(makeMapStateToProps)
|
||||
@injectIntl
|
||||
class UploadButton extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -81,3 +79,5 @@ class UploadButton extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(makeMapStateToProps)(injectIntl(UploadButton));
|
||||
|
|
|
@ -38,8 +38,6 @@ const mapStateToProps = (state, ownProps) => ({
|
|||
showSearch: ownProps.multiColumn ? state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']) : false,
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Compose extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -148,3 +146,5 @@ class Compose extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Compose));
|
||||
|
|
|
@ -24,7 +24,6 @@ const messages = defineMessages({
|
|||
unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class Conversation extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -198,3 +197,5 @@ class Conversation extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(Conversation);
|
||||
|
|
|
@ -14,8 +14,6 @@ const messages = defineMessages({
|
|||
title: { id: 'column.direct', defaultMessage: 'Direct messages' },
|
||||
});
|
||||
|
||||
export default @connect()
|
||||
@injectIntl
|
||||
class DirectTimeline extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -105,3 +103,5 @@ class DirectTimeline extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect()(injectIntl(DirectTimeline));
|
||||
|
|
|
@ -91,9 +91,6 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
|||
|
||||
});
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
@connect(makeMapStateToProps, mapDispatchToProps)
|
||||
class AccountCard extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -233,3 +230,5 @@ class AccountCard extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(AccountCard));
|
||||
|
|
|
@ -29,8 +29,6 @@ const mapStateToProps = state => ({
|
|||
domain: state.getIn(['meta', 'domain']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Directory extends React.PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -176,3 +174,5 @@ class Directory extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Directory));
|
||||
|
|
|
@ -23,8 +23,6 @@ const mapStateToProps = state => ({
|
|||
hasMore: !!state.getIn(['domain_lists', 'blocks', 'next']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Blocks extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -81,3 +79,5 @@ class Blocks extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Blocks));
|
||||
|
|
|
@ -24,8 +24,6 @@ const mapStateToProps = state => ({
|
|||
isSearching: state.getIn(['search', 'submitted']) || !showTrends,
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Explore extends React.PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -105,3 +103,5 @@ class Explore extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Explore));
|
||||
|
|
|
@ -13,7 +13,6 @@ const mapStateToProps = state => ({
|
|||
isLoading: state.getIn(['trends', 'links', 'isLoading']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class Links extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -68,3 +67,5 @@ class Links extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(Links);
|
||||
|
|
|
@ -42,8 +42,6 @@ const renderStatuses = (results, onLoadMore) => appendLoadMore('statuses', resul
|
|||
<Status key={`status-${item}`} id={item} />
|
||||
)), onLoadMore);
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Results extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -124,3 +122,5 @@ class Results extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Results));
|
||||
|
|
|
@ -14,7 +14,6 @@ const mapStateToProps = state => ({
|
|||
hasMore: !!state.getIn(['status_lists', 'trending', 'next']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class Statuses extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -62,3 +61,5 @@ class Statuses extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(Statuses);
|
||||
|
|
|
@ -12,7 +12,6 @@ const mapStateToProps = state => ({
|
|||
isLoading: state.getIn(['suggestions', 'isLoading']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class Suggestions extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -49,3 +48,5 @@ class Suggestions extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(Suggestions);
|
||||
|
|
|
@ -13,7 +13,6 @@ const mapStateToProps = state => ({
|
|||
isLoadingHashtags: state.getIn(['trends', 'tags', 'isLoading']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class Tags extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -60,3 +59,5 @@ class Tags extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(Tags);
|
||||
|
|
|
@ -22,8 +22,6 @@ const mapStateToProps = state => ({
|
|||
hasMore: !!state.getIn(['status_lists', 'favourites', 'next']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Favourites extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -106,3 +104,5 @@ class Favourites extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Favourites));
|
||||
|
|
|
@ -21,8 +21,6 @@ const mapStateToProps = (state, props) => ({
|
|||
accountIds: state.getIn(['user_lists', 'favourited_by', props.params.statusId]),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Favourites extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -90,3 +88,5 @@ class Favourites extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Favourites));
|
||||
|
|
|
@ -10,7 +10,6 @@ const mapStateToProps = (state, { filterId }) => ({
|
|||
filter: state.getIn(['filters', filterId]),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class AddedToFilter extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -100,3 +99,5 @@ class AddedToFilter extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(AddedToFilter);
|
||||
|
|
|
@ -22,8 +22,6 @@ const mapStateToProps = (state, { contextType }) => ({
|
|||
]),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class SelectFilter extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -190,3 +188,5 @@ class SelectFilter extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(SelectFilter));
|
||||
|
|
|
@ -32,8 +32,6 @@ const getFirstSentence = str => {
|
|||
return arr[0];
|
||||
};
|
||||
|
||||
export default @connect(makeMapStateToProps)
|
||||
@injectIntl
|
||||
class Account extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -83,3 +81,5 @@ class Account extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(makeMapStateToProps)(injectIntl(Account));
|
||||
|
|
|
@ -19,7 +19,6 @@ const mapStateToProps = state => ({
|
|||
isLoading: state.getIn(['suggestions', 'isLoading']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class FollowRecommendations extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -114,3 +113,5 @@ class FollowRecommendations extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(FollowRecommendations);
|
||||
|
|
|
@ -13,7 +13,6 @@ const messages = defineMessages({
|
|||
reject: { id: 'follow_request.reject', defaultMessage: 'Reject' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class AccountAuthorize extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -47,3 +46,5 @@ class AccountAuthorize extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(AccountAuthorize);
|
||||
|
|
|
@ -25,8 +25,6 @@ const mapStateToProps = state => ({
|
|||
domain: state.getIn(['meta', 'domain']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class FollowRequests extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -89,3 +87,5 @@ class FollowRequests extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(FollowRequests));
|
||||
|
|
|
@ -22,8 +22,6 @@ const mapStateToProps = state => ({
|
|||
hasMore: !!state.getIn(['followed_tags', 'next']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class FollowedTags extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -87,3 +85,5 @@ class FollowedTags extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(FollowedTags));
|
||||
|
|
|
@ -54,7 +54,6 @@ RemoteHint.propTypes = {
|
|||
url: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class Followers extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -168,3 +167,5 @@ class Followers extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(Followers);
|
||||
|
|
|
@ -54,7 +54,6 @@ RemoteHint.propTypes = {
|
|||
url: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class Following extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -168,3 +167,5 @@ class Following extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(Following);
|
||||
|
|
|
@ -355,7 +355,6 @@ class Announcement extends ImmutablePureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @injectIntl
|
||||
class Announcements extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -447,3 +446,5 @@ class Announcements extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(Announcements);
|
||||
|
|
|
@ -58,8 +58,6 @@ const badgeDisplay = (number, limit) => {
|
|||
}
|
||||
};
|
||||
|
||||
export default @connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class GettingStarted extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -153,3 +151,5 @@ class GettingStarted extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(GettingStarted));
|
||||
|
|
|
@ -12,7 +12,6 @@ const messages = defineMessages({
|
|||
noOptions: { id: 'hashtag.column_settings.select.no_options_message', defaultMessage: 'No suggestions found' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class ColumnSettings extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -131,3 +130,5 @@ class ColumnSettings extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(ColumnSettings);
|
||||
|
|
|
@ -26,8 +26,6 @@ const mapStateToProps = (state, props) => ({
|
|||
tag: state.getIn(['tags', props.params.id]),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class HashtagTimeline extends React.PureComponent {
|
||||
|
||||
disconnects = [];
|
||||
|
@ -235,3 +233,5 @@ class HashtagTimeline extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(HashtagTimeline));
|
||||
|
|
|
@ -4,7 +4,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|||
import { injectIntl, FormattedMessage } from 'react-intl';
|
||||
import SettingToggle from '../../notifications/components/setting_toggle';
|
||||
|
||||
export default @injectIntl
|
||||
class ColumnSettings extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -32,3 +31,5 @@ class ColumnSettings extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(ColumnSettings);
|
||||
|
|
|
@ -30,8 +30,6 @@ const mapStateToProps = state => ({
|
|||
showAnnouncements: state.getIn(['announcements', 'show']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class HomeTimeline extends React.PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -174,3 +172,5 @@ class HomeTimeline extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(HomeTimeline));
|
||||
|
|
|
@ -74,7 +74,6 @@ class Copypaste extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default @connect(mapStateToProps, mapDispatchToProps)
|
||||
class InteractionModal extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -164,3 +163,5 @@ class InteractionModal extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(InteractionModal);
|
||||
|
|
|
@ -10,7 +10,6 @@ const messages = defineMessages({
|
|||
heading: { id: 'keyboard_shortcuts.heading', defaultMessage: 'Keyboard Shortcuts' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class KeyboardShortcuts extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -178,3 +177,5 @@ class KeyboardShortcuts extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default injectIntl(KeyboardShortcuts);
|
||||
|
|
|
@ -17,9 +17,6 @@ const makeMapStateToProps = () => {
|
|||
return mapStateToProps;
|
||||
};
|
||||
|
||||
|
||||
export default @connect(makeMapStateToProps)
|
||||
@injectIntl
|
||||
class Account extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -41,3 +38,5 @@ class Account extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(makeMapStateToProps)(injectIntl(Account));
|
||||
|
|
|
@ -23,8 +23,6 @@ const mapDispatchToProps = (dispatch, { listId }) => ({
|
|||
onAdd: () => dispatch(addToListAdder(listId)),
|
||||
});
|
||||
|
||||
export default @connect(MapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class List extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -67,3 +65,5 @@ class List extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(MapStateToProps, mapDispatchToProps)(injectIntl(List));
|
||||
|
|
|
@ -28,8 +28,6 @@ const mapDispatchToProps = dispatch => ({
|
|||
onReset: () => dispatch(resetListAdder()),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class ListAdder extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -71,3 +69,5 @@ class ListAdder extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(ListAdder));
|
||||
|
|
|
@ -31,8 +31,6 @@ const mapDispatchToProps = (dispatch, { accountId }) => ({
|
|||
onAdd: () => dispatch(addToListEditor(accountId)),
|
||||
});
|
||||
|
||||
export default @connect(makeMapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class Account extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -75,3 +73,5 @@ class Account extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(makeMapStateToProps, mapDispatchToProps)(injectIntl(Account));
|
||||
|
|
|
@ -19,8 +19,6 @@ const mapDispatchToProps = dispatch => ({
|
|||
onSubmit: () => dispatch(submitListEditor(false)),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class ListForm extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -68,3 +66,5 @@ class ListForm extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(ListForm));
|
||||
|
|
|
@ -20,8 +20,6 @@ const mapDispatchToProps = dispatch => ({
|
|||
onChange: value => dispatch(changeListSuggestions(value)),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class Search extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -74,3 +72,5 @@ class Search extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(Search));
|
||||
|
|
|
@ -22,8 +22,6 @@ const mapDispatchToProps = dispatch => ({
|
|||
onReset: () => dispatch(resetListEditor()),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class ListEditor extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -77,3 +75,5 @@ class ListEditor extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(ListEditor));
|
||||
|
|
|
@ -31,8 +31,6 @@ const mapStateToProps = (state, props) => ({
|
|||
hasUnread: state.getIn(['timelines', `list:${props.params.id}`, 'unread']) > 0,
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class ListTimeline extends React.PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
|
@ -219,3 +217,5 @@ class ListTimeline extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(ListTimeline));
|
||||
|
|
|
@ -20,8 +20,6 @@ const mapDispatchToProps = dispatch => ({
|
|||
onSubmit: () => dispatch(submitListEditor(true)),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class NewListForm extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -75,3 +73,5 @@ class NewListForm extends React.PureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(NewListForm));
|
||||
|
|
|
@ -32,8 +32,6 @@ const mapStateToProps = state => ({
|
|||
lists: getOrderedLists(state),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Lists extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -87,3 +85,5 @@ class Lists extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Lists));
|
||||
|
|
|
@ -23,8 +23,6 @@ const mapStateToProps = state => ({
|
|||
isLoading: state.getIn(['user_lists', 'mutes', 'isLoading'], true),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Mutes extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
@ -82,3 +80,5 @@ class Mutes extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Mutes));
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue