42 Commits

Author SHA1 Message Date
  欧醚 b9f3ab6530 check email domain for invitation 1 year ago
  欧醚 cd61d74274 update trend statuses threshold 1 year ago
  欧醚 0116932f00 default enable auto play gif 1 year ago
  欧醚 35f4ac0636 default to local timeline on mobile 1 year ago
  欧醚 4b1d586872 update trend statuses test 1 year ago
  欧醚 0a6360ee25 Make wide view wider 1 year ago
  欧醚 f7074db8e2 Remove legacy decorators syntax 1 year ago
  欧醚 af35a02def fix: uniq key for Fragment 1 year ago
  欧醚 c19eddb1d4 use news bot for explore news timeline 1 year ago
  欧醚 fd6c194b5d not check author discoverable for trend statuses 1 year ago
  欧醚 1d18868566 show avatars in comments 1 year ago
  欧醚 0cad5169a3 update tests for not show self-reply 1 year ago
  欧醚 f46bdf4528 run github action on this branch 1 year ago
  欧醚 70e87a1fc9 show display_name for mention 1 year ago
  欧醚 66281b6dc8 show some instance info under whitelist_mode 1 year ago
  欧醚 68bafcdc54 better timeline comments 1 year ago
  欧醚 08ae5e6c16 make all local statuses trendable and change threshold 1 year ago
  欧醚 514bef1105 Fix: fix css to make Doodle works on mobile 1 year ago
  欧醚 fb502a6b75 change some logo/text to closed-social version 1 year ago
  欧醚 3799df29db change default local_settings 1 year ago
  欧醚 2dbd322760 fix: add space when inserting emoji 1 year ago
  欧醚 35719f6040 feat: support anonymous 1 year ago
  欧醚 006658f600 feat: better action bar button style for mobile 1 year ago
  欧醚 2dd7323d31 show number of replies, reblogs and favourites 1 year ago
  欧醚 93da303857 show comments and quote for status list 1 year ago
  欧醚 d5908cca30 remove thread mode 1 year ago
  欧醚 6a85b91542 change colors of favourite and bookmark icon 1 year ago
  欧醚 76bc47e920 remove LanguageDropdown when publishing 1 year ago
  欧醚 5dcfb66412 change reply icon to comment 1 year ago
  欧醚 053352e042 change star icon to heart 1 year ago
  欧醚 c6aa9146cc hide full email address for admins 1 year ago
  欧醚 7ce72ced97 version suffix 1 year ago
  Claire cbdb25ab03
Merge pull request #2151 from ClearlyClaire/glitch-soc/main 1 year ago
  neatchee 8215df76c0 [Glitch] Remove legacy decorators syntax 1 year ago
  Nick Schonning 00c839b9a9 [Glitch] Remove isNaN polyfill 1 year ago
  Claire 14b0311029 Merge branch 'main' into glitch-soc/main 1 year ago
  Yamagishi Kazutoshi 6e8711ff91
Add missing parenthesis (#24238) 1 year ago
  Yamagishi Kazutoshi d1b057a0ac
Remove legacy decorators syntax (#18357) 1 year ago
  Nick Schonning 503022d6f9
Exclude files for Rubocop Metrics/ClassLength (#24213) 1 year ago
  Nick Schonning e7e189fa44
Use Yarn production install for asset compile (#24232) 1 year ago
  Nick Schonning b46125224c
Remove isNaN polyfill (#24224) 1 year ago
  Christian Schmidt 16da4a09e8
Fix broken links in account gallery (#24218) 1 year ago
368 changed files with 1194 additions and 685 deletions
Split View
  1. +23
    -1
      .eslintrc.js
  2. +2
    -2
      .github/workflows/build-image.yml
  3. +2
    -2
      .github/workflows/check-i18n.yml
  4. +2
    -2
      .github/workflows/codeql.yml
  5. +1
    -1
      .github/workflows/test-ruby.yml
  6. +40
    -1
      .rubocop.yml
  7. +0
    -4
      .rubocop_todo.yml
  8. +1
    -1
      Dockerfile
  9. +1
    -1
      app/controllers/api/v1/instances/domain_blocks_controller.rb
  10. +1
    -1
      app/controllers/api/v1/instances/extended_descriptions_controller.rb
  11. +1
    -1
      app/controllers/api/v1/instances/privacy_policies_controller.rb
  12. +1
    -1
      app/controllers/api/v1/instances/rules_controller.rb
  13. +1
    -1
      app/controllers/api/v1/instances_controller.rb
  14. +19
    -2
      app/controllers/api/v1/statuses_controller.rb
  15. +5
    -0
      app/helpers/formatting_helper.rb
  16. +1
    -1
      app/javascript/flavours/glitch/actions/local_settings.js
  17. +12
    -0
      app/javascript/flavours/glitch/actions/timelines.js
  18. +0
    -5
      app/javascript/flavours/glitch/base_polyfills.js
  19. +2
    -1
      app/javascript/flavours/glitch/components/account.jsx
  20. +2
    -1
      app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx
  21. +2
    -1
      app/javascript/flavours/glitch/components/column_header.jsx
  22. +2
    -1
      app/javascript/flavours/glitch/components/dismissable_banner.jsx
  23. +2
    -1
      app/javascript/flavours/glitch/components/domain.jsx
  24. +2
    -2
      app/javascript/flavours/glitch/components/edited_timestamp/index.jsx
  25. +2
    -1
      app/javascript/flavours/glitch/components/inline_account.jsx
  26. +2
    -1
      app/javascript/flavours/glitch/components/load_gap.jsx
  27. +2
    -1
      app/javascript/flavours/glitch/components/media_gallery.jsx
  28. +2
    -1
      app/javascript/flavours/glitch/components/navigation_portal.jsx
  29. +2
    -1
      app/javascript/flavours/glitch/components/notification_purge_buttons.jsx
  30. +2
    -1
      app/javascript/flavours/glitch/components/picture_in_picture_placeholder.jsx
  31. +2
    -1
      app/javascript/flavours/glitch/components/poll.jsx
  32. +2
    -1
      app/javascript/flavours/glitch/components/relative_timestamp.jsx
  33. +2
    -1
      app/javascript/flavours/glitch/components/scrollable_list.jsx
  34. +2
    -2
      app/javascript/flavours/glitch/components/server_banner.jsx
  35. +2
    -1
      app/javascript/flavours/glitch/components/status.jsx
  36. +47
    -29
      app/javascript/flavours/glitch/components/status_action_bar.jsx
  37. +2
    -2
      app/javascript/flavours/glitch/components/status_content.jsx
  38. +2
    -1
      app/javascript/flavours/glitch/components/status_icons.jsx
  39. +4
    -3
      app/javascript/flavours/glitch/components/status_list.jsx
  40. +1
    -1
      app/javascript/flavours/glitch/components/status_prepend.jsx
  41. +2
    -1
      app/javascript/flavours/glitch/components/status_visibility_icon.jsx
  42. +86
    -0
      app/javascript/flavours/glitch/components/status_with_comments.jsx
  43. +4
    -4
      app/javascript/flavours/glitch/features/about/index.jsx
  44. +2
    -1
      app/javascript/flavours/glitch/features/account/components/account_note.jsx
  45. +2
    -1
      app/javascript/flavours/glitch/features/account/components/action_bar.jsx
  46. +2
    -1
      app/javascript/flavours/glitch/features/account/components/featured_tags.jsx
  47. +2
    -1
      app/javascript/flavours/glitch/features/account/components/header.jsx
  48. +2
    -1
      app/javascript/flavours/glitch/features/account/components/profile_column_header.jsx
  49. +2
    -1
      app/javascript/flavours/glitch/features/account/navigation.jsx
  50. +2
    -1
      app/javascript/flavours/glitch/features/account_gallery/index.jsx
  51. +2
    -1
      app/javascript/flavours/glitch/features/account_timeline/components/limited_account_hint.jsx
  52. +2
    -1
      app/javascript/flavours/glitch/features/account_timeline/index.jsx
  53. +2
    -1
      app/javascript/flavours/glitch/features/audio/index.jsx
  54. +2
    -2
      app/javascript/flavours/glitch/features/blocks/index.jsx
  55. +2
    -2
      app/javascript/flavours/glitch/features/bookmarked_statuses/index.jsx
  56. +2
    -1
      app/javascript/flavours/glitch/features/closed_registrations_modal/index.jsx
  57. +2
    -1
      app/javascript/flavours/glitch/features/community_timeline/components/column_settings.jsx
  58. +2
    -2
      app/javascript/flavours/glitch/features/community_timeline/index.jsx
  59. +2
    -1
      app/javascript/flavours/glitch/features/compose/components/action_bar.jsx
  60. +2
    -1
      app/javascript/flavours/glitch/features/compose/components/compose_form.jsx
  61. +5
    -3
      app/javascript/flavours/glitch/features/compose/components/emoji_picker_dropdown.jsx
  62. +2
    -1
      app/javascript/flavours/glitch/features/compose/components/header.jsx
  63. +2
    -1
      app/javascript/flavours/glitch/features/compose/components/language_dropdown.jsx
  64. +9
    -9
      app/javascript/flavours/glitch/features/compose/components/options.jsx
  65. +5
    -4
      app/javascript/flavours/glitch/features/compose/components/poll_form.jsx
  66. +2
    -1
      app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.jsx
  67. +2
    -1
      app/javascript/flavours/glitch/features/compose/components/publisher.jsx
  68. +2
    -1
      app/javascript/flavours/glitch/features/compose/components/reply_indicator.jsx
  69. +2
    -1
      app/javascript/flavours/glitch/features/compose/components/search.jsx
  70. +2
    -1
      app/javascript/flavours/glitch/features/compose/components/search_results.jsx
  71. +2
    -1
      app/javascript/flavours/glitch/features/compose/components/textarea_icons.jsx
  72. +2
    -2
      app/javascript/flavours/glitch/features/compose/index.jsx
  73. +2
    -1
      app/javascript/flavours/glitch/features/direct_timeline/components/column_settings.jsx
  74. +3
    -2
      app/javascript/flavours/glitch/features/direct_timeline/components/conversation.jsx
  75. +2
    -2
      app/javascript/flavours/glitch/features/direct_timeline/index.jsx
  76. +2
    -3
      app/javascript/flavours/glitch/features/directory/components/account_card.jsx
  77. +2
    -2
      app/javascript/flavours/glitch/features/directory/index.jsx
  78. +2
    -2
      app/javascript/flavours/glitch/features/domain_blocks/index.jsx
  79. +17
    -7
      app/javascript/flavours/glitch/features/explore/index.jsx
  80. +2
    -1
      app/javascript/flavours/glitch/features/explore/links.jsx
  81. +56
    -0
      app/javascript/flavours/glitch/features/explore/news_bot_statuses.jsx
  82. +2
    -2
      app/javascript/flavours/glitch/features/explore/results.jsx
  83. +2
    -1
      app/javascript/flavours/glitch/features/explore/statuses.jsx
  84. +2
    -1
      app/javascript/flavours/glitch/features/explore/suggestions.jsx
  85. +2
    -1
      app/javascript/flavours/glitch/features/explore/tags.jsx
  86. +3
    -3
      app/javascript/flavours/glitch/features/favourited_statuses/index.jsx
  87. +3
    -3
      app/javascript/flavours/glitch/features/favourites/index.jsx
  88. +2
    -1
      app/javascript/flavours/glitch/features/filters/added_to_filter.jsx
  89. +2
    -2
      app/javascript/flavours/glitch/features/filters/select_filter.jsx
  90. +2
    -2
      app/javascript/flavours/glitch/features/follow_recommendations/components/account.jsx
  91. +2
    -1
      app/javascript/flavours/glitch/features/follow_recommendations/index.jsx
  92. +2
    -1
      app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.jsx
  93. +2
    -2
      app/javascript/flavours/glitch/features/follow_requests/index.jsx
  94. +2
    -2
      app/javascript/flavours/glitch/features/followed_tags/index.jsx
  95. +2
    -1
      app/javascript/flavours/glitch/features/followers/index.jsx
  96. +2
    -1
      app/javascript/flavours/glitch/features/following/index.jsx
  97. +2
    -1
      app/javascript/flavours/glitch/features/getting_started/components/announcements.jsx
  98. +2
    -2
      app/javascript/flavours/glitch/features/getting_started/index.jsx
  99. +4
    -4
      app/javascript/flavours/glitch/features/getting_started_misc/index.jsx
  100. +2
    -1
      app/javascript/flavours/glitch/features/hashtag_timeline/components/column_settings.jsx

+ 23
- 1
.eslintrc.js View File

@ -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
- 2
.github/workflows/build-image.yml View File

@ -3,7 +3,7 @@ on:
workflow_dispatch:
push:
branches:
- 'main'
- 'closed-social-glitch-2'
pull_request:
paths:
- .github/workflows/build-image.yml
@ -40,7 +40,7 @@ jobs:
images: ghcr.io/${{ github.repository_owner }}/mastodon
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=edge,branch=main
type=edge,branch=closed-social-glitch-2
type=sha,prefix=,format=long
- uses: docker/build-push-action@v4

+ 2
- 2
.github/workflows/check-i18n.yml View File

@ -2,9 +2,9 @@ name: Check i18n
on:
push:
branches: [main]
branches: [closed-social-glitch-2]
pull_request:
branches: [main]
branches: [closed-social-glitch-2]
env:
RAILS_ENV: test

+ 2
- 2
.github/workflows/codeql.yml View File

@ -2,10 +2,10 @@ name: 'CodeQL'
on:
push:
branches: ['main']
branches: ['closed-social-glitch-2']
pull_request:
# The branches below must be a subset of the branches above
branches: ['main']
branches: ['closed-social-glitch-2']
schedule:
- cron: '22 6 * * 1'

+ 1
- 1
.github/workflows/test-ruby.yml View File

@ -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

+ 40
- 1
.rubocop.yml View File

@ -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:

+ 0
- 4
.rubocop_todo.yml View File

@ -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

+ 1
- 1
Dockerfile View File

@ -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}

+ 1
- 1
app/controllers/api/v1/instances/domain_blocks_controller.rb View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
class Api::V1::Instances::DomainBlocksController < Api::BaseController
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
skip_before_action :require_authenticated_user!
before_action :require_enabled_api!
before_action :set_domain_blocks

+ 1
- 1
app/controllers/api/v1/instances/extended_descriptions_controller.rb View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
class Api::V1::Instances::ExtendedDescriptionsController < Api::BaseController
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
skip_before_action :require_authenticated_user!
before_action :set_extended_description

+ 1
- 1
app/controllers/api/v1/instances/privacy_policies_controller.rb View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
class Api::V1::Instances::PrivacyPoliciesController < Api::BaseController
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
skip_before_action :require_authenticated_user!
before_action :set_privacy_policy

+ 1
- 1
app/controllers/api/v1/instances/rules_controller.rb View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
class Api::V1::Instances::RulesController < Api::BaseController
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
skip_before_action :require_authenticated_user!
before_action :set_rules

+ 1
- 1
app/controllers/api/v1/instances_controller.rb View File

@ -2,7 +2,7 @@
class Api::V1::InstancesController < Api::BaseController
skip_before_action :set_cache_headers
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
skip_before_action :require_authenticated_user!
def show
expires_in 3.minutes, public: true

+ 19
- 2
app/controllers/api/v1/statuses_controller.rb View File

@ -50,10 +50,27 @@ class Api::V1::StatusesController < Api::BaseController
render json: @context, serializer: REST::ContextSerializer, relationships: StatusRelationshipsPresenter.new(statuses, current_user&.account_id)
end
def generate_anon_name(input, namelist, note)
name = namelist[Digest::SHA2.hexdigest(input).to_i(16) % namelist.size]
name.in?(note) ? nil : name
end
def create
ori_text = status_params[:status]
anon = Rails.configuration.x.anon
anon_name = anon.acc &&
ori_text.strip.end_with?(anon.tag, "#{anon.tag} 👁️") &&
generate_anon_name(
current_user.account.username + anon.salt + 5.hours.ago.strftime('%D'),
anon.namelist,
Account.find(anon.acc).note
)
sender = anon_name ? Account.find(anon.acc) : current_user.account
st_text = anon_name ? "[#{anon_name}]:\n#{ori_text}" : ori_text
@status = PostStatusService.new.call(
current_user.account,
text: status_params[:status],
sender,
text: st_text,
thread: @thread,
media_ids: status_params[:media_ids],
sensitive: status_params[:sensitive],

+ 5
- 0
app/helpers/formatting_helper.rb View File

@ -56,4 +56,9 @@ module FormattingHelper
def account_field_value_format(field, with_rel_me: true)
html_aware_format(field.value, field.account.local?, with_rel_me: with_rel_me, with_domains: true, multiline: false)
end
def hide_email(email)
p1, p2 = email.split('@')
"#{p1[0]}***#{p1[-1]}@#{p2}"
end
end

+ 1
- 1
app/javascript/flavours/glitch/actions/local_settings.js View File

@ -72,6 +72,6 @@ export function deleteLocalSetting(key) {
export function saveLocalSettings() {
return (_, getState) => {
const localSettings = getState().get('local_settings').toJS();
localStorage.setItem('mastodon-settings', JSON.stringify(localSettings));
localStorage.setItem('mastodon-settings:v2', JSON.stringify(localSettings));
};
}

+ 12
- 0
app/javascript/flavours/glitch/actions/timelines.js View File

@ -1,5 +1,6 @@
import { importFetchedStatus, importFetchedStatuses } from './importer';
import { submitMarkers } from './markers';
import { fetchContext } from './statuses';
import api, { getLinks } from 'flavours/glitch/api';
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import compareId from 'flavours/glitch/compare_id';
@ -125,6 +126,17 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) {
dispatch(importFetchedStatuses(response.data));
dispatch(expandTimelineSuccess(timelineId, response.data, next ? next.uri : null, response.status === 206, isLoadingRecent, isLoadingMore, isLoadingRecent && preferPendingItems));
response.data.forEach((status) => {
// FIXME: better cache
if (!('REPLIES_COUNT' in window)) {
window.REPLIES_COUNT = {};
}
if (status.replies_count > 0 && status.replies_count !== window.REPLIES_COUNT[status.id]) {
dispatch(fetchContext(status.id));
window.REPLIES_COUNT[status.id] = status.replies_count;
}
});
if (timelineId === 'home') {
dispatch(submitMarkers());
}

+ 0
- 5
app/javascript/flavours/glitch/base_polyfills.js View File

@ -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) {

+ 2
- 1
app/javascript/flavours/glitch/components/account.jsx View File

@ -23,7 +23,6 @@ const messages = defineMessages({
block: { id: 'account.block', defaultMessage: 'Block @{name}' },
});
export default @injectIntl
class Account extends ImmutablePureComponent {
static propTypes = {
@ -184,3 +183,5 @@ class Account extends ImmutablePureComponent {
}
}
export default injectIntl(Account);

+ 2
- 1
app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/components/column_header.jsx View File

@ -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 = {
@ -218,3 +217,5 @@ class ColumnHeader extends React.PureComponent {
}
}
export default injectIntl(ColumnHeader);

+ 2
- 1
app/javascript/flavours/glitch/components/dismissable_banner.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/components/domain.jsx View File

@ -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);

+ 2
- 2
app/javascript/flavours/glitch/components/edited_timestamp/index.jsx View File

@ -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));

+ 2
- 1
app/javascript/flavours/glitch/components/inline_account.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/components/load_gap.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/components/media_gallery.jsx View File

@ -244,7 +244,6 @@ class Item extends React.PureComponent {
}
export default @injectIntl
class MediaGallery extends React.PureComponent {
static propTypes = {
@ -406,3 +405,5 @@ class MediaGallery extends React.PureComponent {
}
}
export default injectIntl(MediaGallery);

+ 2
- 1
app/javascript/flavours/glitch/components/navigation_portal.jsx View File

@ -15,7 +15,6 @@ const DefaultNavigation = () => (
</>
);
export default @withRouter
class NavigationPortal extends React.PureComponent {
render () {
@ -33,3 +32,5 @@ class NavigationPortal extends React.PureComponent {
}
}
export default withRouter(NavigationPortal);

+ 2
- 1
app/javascript/flavours/glitch/components/notification_purge_buttons.jsx View File

@ -19,7 +19,6 @@ const messages = defineMessages({
btnApply : { id: 'notification_purge.btn_apply', defaultMessage: 'Clear\nselected' },
});
export default @injectIntl
class NotificationPurgeButtons extends ImmutablePureComponent {
static propTypes = {
@ -57,3 +56,5 @@ class NotificationPurgeButtons extends ImmutablePureComponent {
}
}
export default injectIntl(NotificationPurgeButtons);

+ 2
- 1
app/javascript/flavours/glitch/components/picture_in_picture_placeholder.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/components/poll.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/components/relative_timestamp.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/components/scrollable_list.jsx View File

@ -20,7 +20,6 @@ const mapStateToProps = (state, { scrollKey }) => {
};
};
export default @connect(mapStateToProps, null, null, { forwardRef: true })
class ScrollableList extends PureComponent {
static contextTypes = {
@ -352,3 +351,5 @@ class ScrollableList extends PureComponent {
}
}
export default connect(mapStateToProps, null, null, { forwardRef: true })(ScrollableList);

+ 2
- 2
app/javascript/flavours/glitch/components/server_banner.jsx View File

@ -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));

+ 2
- 1
app/javascript/flavours/glitch/components/status.jsx View File

@ -56,7 +56,6 @@ export const defaultMediaVisibility = (status, settings) => {
return (displayMedia !== 'hide_all' && !status.get('sensitive') || displayMedia === 'show_all');
};
export default @injectIntl
class Status extends ImmutablePureComponent {
static contextTypes = {
@ -830,3 +829,5 @@ class Status extends ImmutablePureComponent {
}
}
export default injectIntl(Status);

+ 47
- 29
app/javascript/flavours/glitch/components/status_action_bar.jsx View File

@ -46,7 +46,6 @@ const messages = defineMessages({
openOriginalPage: { id: 'account.open_original_page', defaultMessage: 'Open original page' },
});
export default @injectIntl
class StatusActionBar extends ImmutablePureComponent {
static contextTypes = {
@ -272,10 +271,10 @@ class StatusActionBar extends ImmutablePureComponent {
}
if (status.get('in_reply_to_id', null) === null) {
replyIcon = 'reply';
replyIcon = 'comment';
replyTitle = intl.formatMessage(messages.reply);
} else {
replyIcon = 'reply-all';
replyIcon = 'comments';
replyTitle = intl.formatMessage(messages.replyAll);
}
@ -302,35 +301,52 @@ class StatusActionBar extends ImmutablePureComponent {
return (
<div className='status__action-bar'>
<IconButton
className='status__action-bar-button'
title={replyTitle}
icon={replyIcon}
onClick={this.handleReplyClick}
counter={showReplyCount ? status.get('replies_count') : undefined}
obfuscateCount
/>
<IconButton className={classNames('status__action-bar-button', { reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} title={reblogTitle} icon={reblogIcon} onClick={this.handleReblogClick} counter={withCounters ? status.get('reblogs_count') : undefined} />
<IconButton className='status__action-bar-button star-icon' animate active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} counter={withCounters ? status.get('favourites_count') : undefined} />
{shareButton}
<IconButton className='status__action-bar-button bookmark-icon' disabled={anonymousAccess} active={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' onClick={this.handleBookmarkClick} />
{filterButton}
<div className='status__action-bar-dropdown'>
<DropdownMenuContainer
scrollKey={scrollKey}
disabled={anonymousAccess}
status={status}
items={menu}
icon='ellipsis-h'
size={18}
direction='right'
ariaLabel={intl.formatMessage(messages.more)}
<div className='status__action-bar__buttons'>
<IconButton
className='status__action-bar-button'
title={replyTitle}
icon={replyIcon}
onClick={this.handleReplyClick}
counter={status.get('replies_count')}
obfuscateCount={showReplyCount}
/>
<IconButton
className={classNames('status__action-bar-button', { reblogPrivate })}
disabled={!publicStatus && !reblogPrivate}
active={status.get('reblogged')}
title={reblogTitle}
icon={reblogIcon}
onClick={this.handleReblogClick}
counter={status.get('reblogs_count')}
obfuscateCount={showReplyCount}
/>
<IconButton
className='status__action-bar-button star-icon'
animate active={status.get('favourited')}
title={intl.formatMessage(messages.favourite)}
icon='heart' onClick={this.handleFavouriteClick}
counter={status.get('favourites_count')}
obfuscateCount={showReplyCount}
/>
{shareButton}
<IconButton className='status__action-bar-button bookmark-icon' disabled={anonymousAccess} active={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' onClick={this.handleBookmarkClick} />
{filterButton}
<div className='status__action-bar-dropdown'>
<DropdownMenuContainer
scrollKey={scrollKey}
disabled={anonymousAccess}
status={status}
items={menu}
icon='ellipsis-h'
size={18}
direction='right'
ariaLabel={intl.formatMessage(messages.more)}
/>
</div>
</div>
<div className='status__action-bar-spacer' />
<a href={status.get('url')} className='status__relative-time' target='_blank' rel='noopener'>
<RelativeTimestamp timestamp={status.get('created_at')} />{status.get('edited_at') && <abbr title={intl.formatMessage(messages.edited, { date: intl.formatDate(status.get('edited_at'), { hour12: false, year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }) })}> *</abbr>}
</a>
@ -339,3 +355,5 @@ class StatusActionBar extends ImmutablePureComponent {
}
}
export default injectIntl(StatusActionBar);

+ 2
- 2
app/javascript/flavours/glitch/components/status_content.jsx View File

@ -104,8 +104,6 @@ const mapStateToProps = state => ({
languages: state.getIn(['server', 'translationLanguages', 'items']),
});
export default @connect(mapStateToProps)
@injectIntl
class StatusContent extends React.PureComponent {
static contextTypes = {
@ -468,3 +466,5 @@ class StatusContent extends React.PureComponent {
}
}
export default connect(mapStateToProps)(injectIntl(StatusContent));

+ 2
- 1
app/javascript/flavours/glitch/components/status_icons.jsx View File

@ -40,7 +40,6 @@ LanguageIcon.propTypes = {
language: PropTypes.string.isRequired,
};
export default @injectIntl
class StatusIcons extends React.PureComponent {
static propTypes = {
@ -143,3 +142,5 @@ class StatusIcons extends React.PureComponent {
}
}
export default injectIntl(StatusIcons);

+ 4
- 3
app/javascript/flavours/glitch/components/status_list.jsx View File

@ -2,11 +2,12 @@ import { debounce } from 'lodash';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import StatusContainer from 'flavours/glitch/containers/status_container';
import ImmutablePureComponent from 'react-immutable-pure-component';
import LoadGap from './load_gap';
import ScrollableList from './scrollable_list';
import RegenerationIndicator from 'flavours/glitch/components/regeneration_indicator';
import StatusWithComments from './status_with_comments';
export default class StatusList extends ImmutablePureComponent {
@ -94,7 +95,7 @@ export default class StatusList extends ImmutablePureComponent {
onClick={onLoadMore}
/>
) : (
<StatusContainer
<StatusWithComments
key={statusId}
id={statusId}
onMoveUp={this.handleMoveUp}
@ -108,7 +109,7 @@ export default class StatusList extends ImmutablePureComponent {
if (scrollableContent && featuredStatusIds) {
scrollableContent = featuredStatusIds.map(statusId => (
<StatusContainer
<StatusWithComments
key={`f-${statusId}`}
id={statusId}
featured

+ 1
- 1
app/javascript/flavours/glitch/components/status_prepend.jsx View File

@ -108,7 +108,7 @@ export default class StatusPrepend extends React.PureComponent {
switch(type) {
case 'favourite':
iconId = 'star';
iconId = 'heart';
break;
case 'featured':
iconId = 'thumb-tack';

+ 2
- 1
app/javascript/flavours/glitch/components/status_visibility_icon.jsx View File

@ -12,7 +12,6 @@ const messages = defineMessages({
direct: { id: 'privacy.direct.short', defaultMessage: 'Mentioned people only' },
});
export default @injectIntl
class VisibilityIcon extends ImmutablePureComponent {
static propTypes = {
@ -49,3 +48,5 @@ class VisibilityIcon extends ImmutablePureComponent {
}
}
export default injectIntl(VisibilityIcon);

+ 86
- 0
app/javascript/flavours/glitch/components/status_with_comments.jsx View File

@ -0,0 +1,86 @@
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import StatusContainer from 'flavours/glitch/containers/status_container';
import LoadMore from 'flavours/glitch/components/load_more';
const mapStateToProps = (state, { id }) => {
let status = state.getIn(['statuses', id]);
let reblogId = status.get('reblog'); // reblog here is a id
return {
childrenWithGrandchildren: state.getIn(['contexts', 'replies', reblogId || id], []).map((cid) => ({
cid,
grandchildrenIds: state.getIn(['contexts', 'replies', cid], []),
})),
quotedId: reblogId && state.getIn(['statuses', reblogId, 'in_reply_to_id']),
};
};
const N = 3;
class StatusWithComments extends ImmutablePureComponent {
state = {
showAll: false,
};
show = () => this.setState({ showAll: true });
render() {
const { id, childrenWithGrandchildren, quotedId, ...other } = this.props;
const { showAll } = this.state;
const loadMore = (
<LoadMore
visible
onClick={this.show}
/>
);
return (
<div className='status-with-comments'>
{quotedId ? (
<div className='status__quoted-status'>
<StatusContainer
id={quotedId}
/>
</div>
) : null}
<StatusContainer
id={id}
{...other}
/>
{childrenWithGrandchildren.size > 0 && (
<div className='status__comments'>
{childrenWithGrandchildren
.filter((_, idx) => showAll || idx < N)
.map(({ cid, grandchildrenIds }) => (
<React.Fragment key={cid}>
<StatusContainer
key={`comment-${cid}`}
id={cid}
/>
{grandchildrenIds.size > 0 && (
<div className='subcomments'>
{grandchildrenIds
.filter((_, idx) => showAll || idx < N)
.map((gid) => (
<StatusContainer
key={`subcomment-${gid}`}
id={gid}
/>
))}
{!showAll && grandchildrenIds.size > N && loadMore}
</div>
)}
</React.Fragment>
))}
{!showAll && childrenWithGrandchildren.size > N && loadMore}
</div>
) }
</div>
);
}
}
export default connect(mapStateToProps)(StatusWithComments);

+ 4
- 4
app/javascript/flavours/glitch/features/about/index.jsx View File

@ -80,8 +80,6 @@ class Section extends React.PureComponent {
}
export default @connect(mapStateToProps)
@injectIntl
class About extends React.PureComponent {
static propTypes = {
@ -118,7 +116,7 @@ class About extends React.PureComponent {
<div className='about__header'>
<Image blurhash={server.getIn(['thumbnail', 'blurhash'])} src={server.getIn(['thumbnail', 'url'])} srcSet={server.getIn(['thumbnail', 'versions'])?.map((value, key) => `${value} ${key.replace('@', '')}`).join(', ')} className='about__header__hero' />
<h1>{isLoading ? <Skeleton width='10ch' /> : server.get('domain')}</h1>
<p><FormattedMessage id='about.powered_by' defaultMessage='Decentralized social media powered by {mastodon}' values={{ mastodon: <a href='https://joinmastodon.org' className='about__mail' target='_blank'>Mastodon</a> }} /></p>
<p><a href='https://closed.social' className='about__mail' target='_blank'>闭社</a>成员站点</p>
</div>
<div className='about__meta'>
@ -204,7 +202,7 @@ class About extends React.PureComponent {
<LinkFooter />
<div className='about__footer'>
<p><FormattedMessage id='about.fork_disclaimer' defaultMessage='Glitch-soc is free open source software forked from Mastodon.' /></p>
<p><FormattedMessage id='about.fork_disclaimer' defaultMessage='Closed-social is free open source software forked from Mastodon.' /></p>
<p><FormattedMessage id='about.disclaimer' defaultMessage='Mastodon is free, open-source software, and a trademark of Mastodon gGmbH.' /></p>
</div>
</div>
@ -218,3 +216,5 @@ class About extends React.PureComponent {
}
}
export default connect(mapStateToProps)(injectIntl(About));

+ 2
- 1
app/javascript/flavours/glitch/features/account/components/account_note.jsx View File

@ -10,7 +10,6 @@ const messages = defineMessages({
placeholder: { id: 'account_note.glitch_placeholder', defaultMessage: 'No comment provided' },
});
export default @injectIntl
class Header extends ImmutablePureComponent {
static propTypes = {
@ -102,3 +101,5 @@ class Header extends ImmutablePureComponent {
}
}
export default injectIntl(Header);

+ 2
- 1
app/javascript/flavours/glitch/features/account/components/action_bar.jsx View File

@ -8,7 +8,6 @@ import { me, isStaff } from 'flavours/glitch/initial_state';
import { profileLink, accountAdminLink } from 'flavours/glitch/utils/backend_links';
import Icon from 'flavours/glitch/components/icon';
export default @injectIntl
class ActionBar extends React.PureComponent {
static propTypes = {
@ -83,3 +82,5 @@ class ActionBar extends React.PureComponent {
}
}
export default injectIntl(ActionBar);

+ 2
- 1
app/javascript/flavours/glitch/features/account/components/featured_tags.jsx View File

@ -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 = {
@ -51,3 +50,5 @@ class FeaturedTags extends ImmutablePureComponent {
}
}
export default injectIntl(FeaturedTags);

+ 2
- 1
app/javascript/flavours/glitch/features/account/components/header.jsx View File

@ -76,7 +76,6 @@ const dateFormatOptions = {
minute: '2-digit',
};
export default @injectIntl
class Header extends ImmutablePureComponent {
static contextTypes = {
@ -403,3 +402,5 @@ class Header extends ImmutablePureComponent {
}
}
export default injectIntl(Header);

+ 2
- 1
app/javascript/flavours/glitch/features/account/components/profile_column_header.jsx View File

@ -7,7 +7,6 @@ const messages = defineMessages({
profile: { id: 'column_header.profile', defaultMessage: 'Profile' },
});
export default @injectIntl
class ProfileColumnHeader extends React.PureComponent {
static propTypes = {
@ -31,3 +30,5 @@ class ProfileColumnHeader extends React.PureComponent {
}
}
export default injectIntl(ProfileColumnHeader);

+ 2
- 1
app/javascript/flavours/glitch/features/account/navigation.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/features/account_gallery/index.jsx View File

@ -58,7 +58,6 @@ class LoadMoreMedia extends ImmutablePureComponent {
}
export default @connect(mapStateToProps)
class AccountGallery extends ImmutablePureComponent {
static propTypes = {
@ -223,3 +222,5 @@ class AccountGallery extends ImmutablePureComponent {
}
}
export default connect(mapStateToProps)(AccountGallery);

+ 2
- 1
app/javascript/flavours/glitch/features/account_timeline/components/limited_account_hint.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/features/account_timeline/index.jsx View File

@ -62,7 +62,6 @@ RemoteHint.propTypes = {
url: PropTypes.string.isRequired,
};
export default @connect(mapStateToProps)
class AccountTimeline extends ImmutablePureComponent {
static propTypes = {
@ -207,3 +206,5 @@ class AccountTimeline extends ImmutablePureComponent {
}
}
export default connect(mapStateToProps)(AccountTimeline);

+ 2
- 1
app/javascript/flavours/glitch/features/audio/index.jsx View File

@ -22,7 +22,6 @@ const messages = defineMessages({
const TICK_SIZE = 10;
const PADDING = 180;
export default @injectIntl
class Audio extends React.PureComponent {
static propTypes = {
@ -575,3 +574,5 @@ class Audio extends React.PureComponent {
}
}
export default injectIntl(Audio);

+ 2
- 2
app/javascript/flavours/glitch/features/blocks/index.jsx View File

@ -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));

+ 2
- 2
app/javascript/flavours/glitch/features/bookmarked_statuses/index.jsx View File

@ -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));

+ 2
- 1
app/javascript/flavours/glitch/features/closed_registrations_modal/index.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/features/community_timeline/components/column_settings.jsx View File

@ -10,7 +10,6 @@ const messages = defineMessages({
settings: { id: 'home.settings', defaultMessage: 'Column settings' },
});
export default @injectIntl
class ColumnSettings extends React.PureComponent {
static propTypes = {
@ -39,3 +38,5 @@ class ColumnSettings extends React.PureComponent {
}
}
export default injectIntl(ColumnSettings);

+ 2
- 2
app/javascript/flavours/glitch/features/community_timeline/index.jsx View File

@ -32,8 +32,6 @@ const mapStateToProps = (state, { columnId }) => {
};
};
export default @connect(mapStateToProps)
@injectIntl
class CommunityTimeline extends React.PureComponent {
static defaultProps = {
@ -162,3 +160,5 @@ class CommunityTimeline extends React.PureComponent {
}
}
export default connect(mapStateToProps)(injectIntl(CommunityTimeline));

+ 2
- 1
app/javascript/flavours/glitch/features/compose/components/action_bar.jsx View File

@ -21,7 +21,6 @@ const messages = defineMessages({
bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' },
});
export default @injectIntl
class ActionBar extends React.PureComponent {
static propTypes = {
@ -66,3 +65,5 @@ class ActionBar extends React.PureComponent {
}
}
export default injectIntl(ActionBar);

+ 2
- 1
app/javascript/flavours/glitch/features/compose/components/compose_form.jsx View File

@ -32,7 +32,6 @@ const messages = defineMessages({
spoiler_placeholder: { id: 'compose_form.spoiler_placeholder', defaultMessage: 'Write your warning here' },
});
export default @injectIntl
class ComposeForm extends ImmutablePureComponent {
static contextTypes = {
@ -389,3 +388,5 @@ class ComposeForm extends ImmutablePureComponent {
}
}
export default injectIntl(ComposeForm);

+ 5
- 3
app/javascript/flavours/glitch/features/compose/components/emoji_picker_dropdown.jsx View File

@ -145,8 +145,7 @@ class ModifierPicker extends React.PureComponent {
}
@injectIntl
class EmojiPickerMenu extends React.PureComponent {
class EmojiPickerMenuImpl extends React.PureComponent {
static propTypes = {
custom_emojis: ImmutablePropTypes.list,
@ -307,7 +306,8 @@ class EmojiPickerMenu extends React.PureComponent {
}
export default @injectIntl
const EmojiPickerMenu = injectIntl(EmojiPickerMenuImpl);
class EmojiPickerDropdown extends React.PureComponent {
static propTypes = {
@ -411,3 +411,5 @@ class EmojiPickerDropdown extends React.PureComponent {
}
}
export default injectIntl(EmojiPickerDropdown);

+ 2
- 1
app/javascript/flavours/glitch/features/compose/components/header.jsx View File

@ -45,7 +45,6 @@ const messages = defineMessages({
},
});
export default @injectIntl
class Header extends ImmutablePureComponent {
static propTypes = {
@ -134,3 +133,5 @@ class Header extends ImmutablePureComponent {
}
}
export default injectIntl(Header);

+ 2
- 1
app/javascript/flavours/glitch/features/compose/components/language_dropdown.jsx View File

@ -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);

+ 9
- 9
app/javascript/flavours/glitch/features/compose/components/options.jsx View File

@ -83,8 +83,11 @@ const messages = defineMessages({
},
});
@connect((state, { name }) => ({ checked: state.getIn(['compose', 'advanced_options', name]) }))
class ToggleOption extends ImmutablePureComponent {
const mapStateToProps = (state, { name }) => ({
checked: state.getIn(['compose', 'advanced_options', name]),
});
class ToggleOptionImpl extends ImmutablePureComponent {
static propTypes = {
name: PropTypes.string.isRequired,
@ -113,7 +116,8 @@ class ToggleOption extends ImmutablePureComponent {
}
export default @injectIntl
const ToggleOption = connect(mapStateToProps)(ToggleOptionImpl);
class ComposerOptions extends ImmutablePureComponent {
static propTypes = {
@ -289,7 +293,6 @@ class ComposerOptions extends ImmutablePureComponent {
title={formatMessage(messages.spoiler)}
/>
)}
<LanguageDropdown />
<DropdownContainer
disabled={disabled || isEditing}
icon='ellipsis-h'
@ -299,11 +302,6 @@ class ComposerOptions extends ImmutablePureComponent {
name: 'do_not_federate',
text: formatMessage(messages.local_only_short),
},
{
meta: formatMessage(messages.threaded_mode_long),
name: 'threaded_mode',
text: formatMessage(messages.threaded_mode_short),
},
] : null}
onChange={onChangeAdvancedOption}
renderItemContents={this.renderToggleItemContents}
@ -315,3 +313,5 @@ class ComposerOptions extends ImmutablePureComponent {
}
}
export default injectIntl(ComposerOptions);

+ 5
- 4
app/javascript/flavours/glitch/features/compose/components/poll_form.jsx View File

@ -21,8 +21,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,
@ -92,8 +91,8 @@ class Option extends React.PureComponent {
}
export default
@injectIntl
const Option = injectIntl(OptionIntl);
class PollForm extends ImmutablePureComponent {
static propTypes = {
@ -168,3 +167,5 @@ class PollForm extends ImmutablePureComponent {
}
}
export default injectIntl(PollForm);

+ 2
- 1
app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.jsx View File

@ -16,7 +16,6 @@ const messages = defineMessages({
change_privacy: { id: 'privacy.change', defaultMessage: 'Adjust status privacy' },
});
export default @injectIntl
class PrivacyDropdown extends React.PureComponent {
static propTypes = {
@ -86,3 +85,5 @@ class PrivacyDropdown extends React.PureComponent {
}
}
export default injectIntl(PrivacyDropdown);

+ 2
- 1
app/javascript/flavours/glitch/features/compose/components/publisher.jsx View File

@ -26,7 +26,6 @@ const messages = defineMessages({
saveChanges: { id: 'compose_form.save_changes', defaultMessage: 'Save changes' },
});
export default @injectIntl
class Publisher extends ImmutablePureComponent {
static propTypes = {
@ -97,3 +96,5 @@ class Publisher extends ImmutablePureComponent {
}
}
export default injectIntl(Publisher);

+ 2
- 1
app/javascript/flavours/glitch/features/compose/components/reply_indicator.jsx View File

@ -19,7 +19,6 @@ const messages = defineMessages({
});
export default @injectIntl
class ReplyIndicator extends ImmutablePureComponent {
static propTypes = {
@ -80,3 +79,5 @@ class ReplyIndicator extends ImmutablePureComponent {
}
}
export default injectIntl(ReplyIndicator);

+ 2
- 1
app/javascript/flavours/glitch/features/compose/components/search.jsx View File

@ -45,7 +45,6 @@ class SearchPopout extends React.PureComponent {
}
// The component.
export default @injectIntl
class Search extends React.PureComponent {
static contextTypes = {
@ -166,3 +165,5 @@ class Search extends React.PureComponent {
}
}
export default injectIntl(Search);

+ 2
- 1
app/javascript/flavours/glitch/features/compose/components/search_results.jsx View File

@ -14,7 +14,6 @@ const messages = defineMessages({
dismissSuggestion: { id: 'suggestions.dismiss', defaultMessage: 'Dismiss suggestion' },
});
export default @injectIntl
class SearchResults extends ImmutablePureComponent {
static propTypes = {
@ -139,3 +138,5 @@ class SearchResults extends ImmutablePureComponent {
}
}
export default injectIntl(SearchResults);

+ 2
- 1
app/javascript/flavours/glitch/features/compose/components/textarea_icons.jsx View File

@ -27,7 +27,6 @@ const iconMap = [
['threaded_mode', 'comments', messages.threadedMode],
];
export default @injectIntl
class TextareaIcons extends ImmutablePureComponent {
static propTypes = {
@ -58,3 +57,5 @@ class TextareaIcons extends ImmutablePureComponent {
}
}
export default injectIntl(TextareaIcons);

+ 2
- 2
app/javascript/flavours/glitch/features/compose/index.jsx View File

@ -39,8 +39,6 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
},
});
export default @connect(mapStateToProps, mapDispatchToProps)
@injectIntl
class Compose extends React.PureComponent {
static propTypes = {
@ -114,3 +112,5 @@ class Compose extends React.PureComponent {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(Compose));

+ 2
- 1
app/javascript/flavours/glitch/features/direct_timeline/components/column_settings.jsx View File

@ -10,7 +10,6 @@ const messages = defineMessages({
settings: { id: 'home.settings', defaultMessage: 'Column settings' },
});
export default @injectIntl
class ColumnSettings extends React.PureComponent {
static propTypes = {
@ -40,3 +39,5 @@ class ColumnSettings extends React.PureComponent {
}
}
export default injectIntl(ColumnSettings);

+ 3
- 2
app/javascript/flavours/glitch/features/direct_timeline/components/conversation.jsx View File

@ -24,7 +24,6 @@ const messages = defineMessages({
unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' },
});
export default @injectIntl
class Conversation extends ImmutablePureComponent {
static contextTypes = {
@ -209,7 +208,7 @@ class Conversation extends ImmutablePureComponent {
/>
<div className='status__action-bar'>
<IconButton className='status__action-bar-button' title={intl.formatMessage(messages.reply)} icon='reply' onClick={this.handleReply} />
<IconButton className='status__action-bar-button' title={intl.formatMessage(messages.reply)} icon='comment' onClick={this.handleReply} />
<div className='status__action-bar-dropdown'>
<DropdownMenuContainer
@ -230,3 +229,5 @@ class Conversation extends ImmutablePureComponent {
}
}
export default injectIntl(Conversation);

+ 2
- 2
app/javascript/flavours/glitch/features/direct_timeline/index.jsx View File

@ -22,8 +22,6 @@ const mapStateToProps = state => ({
conversationsMode: state.getIn(['settings', 'direct', 'conversations']),
});
export default @connect(mapStateToProps)
@injectIntl
class DirectTimeline extends React.PureComponent {
static propTypes = {
@ -154,3 +152,5 @@ class DirectTimeline extends React.PureComponent {
}
}
export default connect(mapStateToProps)(injectIntl(DirectTimeline));

+ 2
- 3
app/javascript/flavours/glitch/features/directory/components/account_card.jsx View File

@ -93,9 +93,6 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
});
export default
@injectIntl
@connect(makeMapStateToProps, mapDispatchToProps)
class AccountCard extends ImmutablePureComponent {
static propTypes = {
@ -246,3 +243,5 @@ class AccountCard extends ImmutablePureComponent {
}
}
export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(AccountCard));

+ 2
- 2
app/javascript/flavours/glitch/features/directory/index.jsx View File

@ -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));

+ 2
- 2
app/javascript/flavours/glitch/features/domain_blocks/index.jsx View File

@ -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));

+ 17
- 7
app/javascript/flavours/glitch/features/explore/index.jsx View File

@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
import Column from 'flavours/glitch/components/column';
import ColumnHeader from 'flavours/glitch/components/column_header';
import { NavLink, Switch, Route } from 'react-router-dom';
import Links from './links';
import NewsBotStatuses from './news_bot_statuses';
import Tags from './tags';
import Statuses from './statuses';
import Suggestions from './suggestions';
@ -13,6 +13,7 @@ import Search from 'flavours/glitch/features/compose/containers/search_container
import SearchResults from './results';
import { showTrends } from 'flavours/glitch/initial_state';
import { Helmet } from 'react-helmet';
import { newsBotId } from '../../initial_state'
const messages = defineMessages({
title: { id: 'explore.title', defaultMessage: 'Explore' },
@ -24,8 +25,6 @@ const mapStateToProps = state => ({
isSearching: state.getIn(['search', 'submitted']) || !showTrends,
});
export default @connect(mapStateToProps)
@injectIntl
class Explore extends React.PureComponent {
static contextTypes = {
@ -76,9 +75,11 @@ class Explore extends React.PureComponent {
<NavLink exact to='/explore/tags'>
<FormattedMessage tagName='div' id='explore.trending_tags' defaultMessage='Hashtags' />
</NavLink>
<NavLink exact to='/explore/links'>
<FormattedMessage tagName='div' id='explore.trending_links' defaultMessage='News' />
</NavLink>
{newsBotId ? (
<NavLink exact to='/explore/links'>
<FormattedMessage tagName='div' id='explore.trending_links' defaultMessage='News' />
</NavLink>
) : null}
{signedIn && (
<NavLink exact to='/explore/suggestions'>
<FormattedMessage tagName='div' id='explore.suggested_follows' defaultMessage='For you' />
@ -88,7 +89,14 @@ class Explore extends React.PureComponent {
<Switch>
<Route path='/explore/tags' component={Tags} />
<Route path='/explore/links' component={Links} />
{newsBotId ? (
<Route path='/explore/links'>
<NewsBotStatuses
accountId={newsBotId}
multiColumn={multiColumn}
/>
</Route>
) : null}
<Route path='/explore/suggestions' component={Suggestions} />
<Route exact path={['/explore', '/explore/posts', '/search']} component={Statuses} componentParams={{ multiColumn }} />
</Switch>
@ -105,3 +113,5 @@ class Explore extends React.PureComponent {
}
}
export default connect(mapStateToProps)(injectIntl(Explore));

+ 2
- 1
app/javascript/flavours/glitch/features/explore/links.jsx View File

@ -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);

+ 56
- 0
app/javascript/flavours/glitch/features/explore/news_bot_statuses.jsx View File

@ -0,0 +1,56 @@
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { expandAccountTimeline } from 'flavours/glitch/actions/timelines';
import StatusList from '../../components/status_list';
import { List as ImmutableList } from 'immutable';
const mapStateToProps = (state, { accountId }) => {
return {
statusIds: state.getIn(['timelines', `account:${accountId}`, 'items'], ImmutableList()),
isLoading: state.getIn(['timelines', `account:${accountId}`, 'isLoading']),
hasMore: state.getIn(['timelines', `account:${accountId}`, 'hasMore']),
};
};
class NewsBotStatuses extends React.PureComponent {
static propTypes = {
accountId: PropTypes.string.isRequired,
dispatch: PropTypes.func.isRequired,
statusIds: ImmutablePropTypes.list,
isLoading: PropTypes.bool,
hasMore: PropTypes.bool,
multiColumn: PropTypes.bool,
};
componentDidMount () {
this.props.dispatch(expandAccountTimeline(this.props.accountId));
}
handleLoadMore = maxId => {
this.props.dispatch(expandAccountTimeline(this.props.accountId, { maxId }));
};
render () {
const { statusIds, isLoading, hasMore, multiColumn } = this.props;
return (
<StatusList
scrollKey='news_bot_timeline'
statusIds={statusIds}
isLoading={isLoading}
hasMore={hasMore}
onLoadMore={this.handleLoadMore}
timelineId='news_bot'
bindToDocument={!multiColumn}
/>
);
}
}
export default connect(mapStateToProps)(NewsBotStatuses);

+ 2
- 2
app/javascript/flavours/glitch/features/explore/results.jsx View File

@ -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));

+ 2
- 1
app/javascript/flavours/glitch/features/explore/statuses.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/features/explore/suggestions.jsx View File

@ -12,7 +12,6 @@ const mapStateToProps = state => ({
isLoading: state.getIn(['suggestions', 'isLoading']),
});
export default @connect(mapStateToProps)
class Suggestions extends React.PureComponent {
static propTypes = {
@ -54,3 +53,5 @@ class Suggestions extends React.PureComponent {
}
}
export default connect(mapStateToProps)(Suggestions);

+ 2
- 1
app/javascript/flavours/glitch/features/explore/tags.jsx View File

@ -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);

+ 3
- 3
app/javascript/flavours/glitch/features/favourited_statuses/index.jsx View File

@ -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 = {
@ -76,7 +74,7 @@ class Favourites extends ImmutablePureComponent {
return (
<Column bindToDocument={!multiColumn} ref={this.setRef} name='favourites' label={intl.formatMessage(messages.heading)}>
<ColumnHeader
icon='star'
icon='heart'
title={intl.formatMessage(messages.heading)}
onPin={this.handlePin}
onMove={this.handleMove}
@ -106,3 +104,5 @@ class Favourites extends ImmutablePureComponent {
}
}
export default connect(mapStateToProps)(injectIntl(Favourites));

+ 3
- 3
app/javascript/flavours/glitch/features/favourites/index.jsx View File

@ -22,8 +22,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 = {
@ -74,7 +72,7 @@ class Favourites extends ImmutablePureComponent {
return (
<Column ref={this.setRef}>
<ColumnHeader
icon='star'
icon='heart'
title={intl.formatMessage(messages.heading)}
onClick={this.handleHeaderClick}
showBackButton
@ -101,3 +99,5 @@ class Favourites extends ImmutablePureComponent {
}
}
export default connect(mapStateToProps)(injectIntl(Favourites));

+ 2
- 1
app/javascript/flavours/glitch/features/filters/added_to_filter.jsx View File

@ -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);

+ 2
- 2
app/javascript/flavours/glitch/features/filters/select_filter.jsx View File

@ -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));

+ 2
- 2
app/javascript/flavours/glitch/features/follow_recommendations/components/account.jsx View File

@ -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));

+ 2
- 1
app/javascript/flavours/glitch/features/follow_recommendations/index.jsx View File

@ -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);

+ 2
- 1
app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.jsx View File

@ -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);

+ 2
- 2
app/javascript/flavours/glitch/features/follow_requests/index.jsx View File

@ -25,8 +25,6 @@ const mapStateToProps = state => ({
domain: state.getIn(['meta', 'domain']),
});
export default @connect(mapStateToProps)
@injectIntl
class FollowRequests extends ImmutablePureComponent {
static propTypes = {
@ -90,3 +88,5 @@ class FollowRequests extends ImmutablePureComponent {
}
}
export default connect(mapStateToProps)(injectIntl(FollowRequests));

+ 2
- 2
app/javascript/flavours/glitch/features/followed_tags/index.jsx View File

@ -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));

+ 2
- 1
app/javascript/flavours/glitch/features/followers/index.jsx View File

@ -53,7 +53,6 @@ RemoteHint.propTypes = {
url: PropTypes.string.isRequired,
};
export default @connect(mapStateToProps)
class Followers extends ImmutablePureComponent {
static propTypes = {
@ -172,3 +171,5 @@ class Followers extends ImmutablePureComponent {
}
}
export default connect(mapStateToProps)(Followers);

+ 2
- 1
app/javascript/flavours/glitch/features/following/index.jsx View File

@ -53,7 +53,6 @@ RemoteHint.propTypes = {
url: PropTypes.string.isRequired,
};
export default @connect(mapStateToProps)
class Following extends ImmutablePureComponent {
static propTypes = {
@ -172,3 +171,5 @@ class Following extends ImmutablePureComponent {
}
}
export default connect(mapStateToProps)(Following);

+ 2
- 1
app/javascript/flavours/glitch/features/getting_started/components/announcements.jsx View File

@ -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);

+ 2
- 2
app/javascript/flavours/glitch/features/getting_started/index.jsx View File

@ -79,8 +79,6 @@ const badgeDisplay = (number, limit) => {
const NAVIGATION_PANEL_BREAKPOINT = 600 + (285 * 2) + (10 * 2);
export default @connect(makeMapStateToProps, mapDispatchToProps)
@injectIntl
class GettingStarted extends ImmutablePureComponent {
static contextTypes = {
@ -202,3 +200,5 @@ class GettingStarted extends ImmutablePureComponent {
}
}
export default connect(makeMapStateToProps, mapDispatchToProps)(injectIntl(GettingStarted));

+ 4
- 4
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx View File

@ -22,9 +22,7 @@ const messages = defineMessages({
featured_users: { id: 'navigation_bar.featured_users', defaultMessage: 'Featured users' },
});
export default @connect()
@injectIntl
class gettingStartedMisc extends ImmutablePureComponent {
class GettingStartedMisc extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object.isRequired,
@ -54,7 +52,7 @@ class gettingStartedMisc extends ImmutablePureComponent {
<div className='scrollable'>
<ColumnSubheading text={intl.formatMessage(messages.subheading)} />
{signedIn && (<ColumnLink key='favourites' icon='star' text={intl.formatMessage(messages.favourites)} to='/favourites' />)}
{signedIn && (<ColumnLink key='favourites' icon='heart' text={intl.formatMessage(messages.favourites)} to='/favourites' />)}
{signedIn && (<ColumnLink key='pinned' icon='thumb-tack' text={intl.formatMessage(messages.pins)} to='/pinned' />)}
{signedIn && (<ColumnLink key='featured_users' icon='users' text={intl.formatMessage(messages.featured_users)} onClick={this.openFeaturedAccountsModal} />)}
{signedIn && (<ColumnLink key='mutes' icon='volume-off' text={intl.formatMessage(messages.mutes)} to='/mutes' />)}
@ -68,3 +66,5 @@ class gettingStartedMisc extends ImmutablePureComponent {
}
}
export default connect()(injectIntl(GettingStartedMisc));

+ 2
- 1
app/javascript/flavours/glitch/features/hashtag_timeline/components/column_settings.jsx View File

@ -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);

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

Loading…
Cancel
Save