diff options
author | kibigo! <marrus-sh@users.noreply.github.com> | 2017-07-13 02:40:16 -0700 |
---|---|---|
committer | kibigo! <marrus-sh@users.noreply.github.com> | 2017-07-13 02:40:16 -0700 |
commit | 5770d461b21cf5b6a8adcaa44d19832e11289960 (patch) | |
tree | 3a72b457fc0303dad71a68d7c0a01e7f736124fd | |
parent | 2e0645c26c0738b37b6847142d47f6391c2cd40c (diff) |
Moved glitch containers and commented unused files
24 files changed, 45 insertions, 18 deletions
diff --git a/app/javascript/glitch/containers/compose/advanced_options.js b/app/javascript/glitch/components/compose/advanced_options/container.js index 92b989052..10804454a 100644 --- a/app/javascript/glitch/containers/compose/advanced_options.js +++ b/app/javascript/glitch/components/compose/advanced_options/container.js @@ -2,10 +2,10 @@ import { connect } from 'react-redux'; // Mastodon imports // -import { toggleComposeAdvancedOption } from '../../../mastodon/actions/compose'; +import { toggleComposeAdvancedOption } from '../../../../mastodon/actions/compose'; // Our imports // -import ComposeAdvancedOptions from '../../components/compose/advanced_options'; +import ComposeAdvancedOptions from '.'; const mapStateToProps = state => ({ values: state.getIn(['compose', 'advanced_options']), diff --git a/app/javascript/glitch/components/compose/advanced_options.js b/app/javascript/glitch/components/compose/advanced_options/index.js index 17fc1d801..dabf66095 100644 --- a/app/javascript/glitch/components/compose/advanced_options.js +++ b/app/javascript/glitch/components/compose/advanced_options/index.js @@ -6,7 +6,7 @@ import Toggle from 'react-toggle'; import { injectIntl, defineMessages } from 'react-intl'; // Mastodon imports // -import IconButton from '../../../mastodon/components/icon_button'; +import IconButton from '../../../../mastodon/components/icon_button'; const messages = defineMessages({ local_only_short: { id: 'advanced-options.local-only.short', defaultMessage: 'Local-only' }, diff --git a/app/javascript/glitch/containers/notification/index.js b/app/javascript/glitch/components/notification/container.js index 783c838ae..c58ef4bd2 100644 --- a/app/javascript/glitch/containers/notification/index.js +++ b/app/javascript/glitch/components/notification/container.js @@ -5,7 +5,7 @@ import { connect } from 'react-redux'; import { makeGetNotification } from '../../../mastodon/selectors'; // Our imports // -import Notification from '../../components/notification'; +import Notification from '.'; const makeMapStateToProps = () => { const getNotification = makeGetNotification(); diff --git a/app/javascript/glitch/components/notification/index.js b/app/javascript/glitch/components/notification/index.js index 3f424d85d..34e03cdca 100644 --- a/app/javascript/glitch/components/notification/index.js +++ b/app/javascript/glitch/components/notification/index.js @@ -11,7 +11,7 @@ import Permalink from '../../../mastodon/components/permalink'; import emojify from '../../../mastodon/emoji'; // Our imports // -import StatusContainer from '../../containers/status'; +import StatusContainer from '../status'; export default class Notification extends ImmutablePureComponent { diff --git a/app/javascript/glitch/containers/settings/index.js b/app/javascript/glitch/components/settings/container.js index 6034935eb..6034935eb 100644 --- a/app/javascript/glitch/containers/settings/index.js +++ b/app/javascript/glitch/components/settings/container.js diff --git a/app/javascript/glitch/containers/status/index.js b/app/javascript/glitch/components/status/container.js index baf898e97..a8aa6efe9 100644 --- a/app/javascript/glitch/containers/status/index.js +++ b/app/javascript/glitch/components/status/container.js @@ -52,7 +52,7 @@ import { initReport } from '../../../mastodon/actions/reports'; import { openModal } from '../../../mastodon/actions/modal'; // Our imports // -import Status from '../../components/status'; +import Status from '.'; /* * * * */ diff --git a/app/javascript/glitch/components/status/index.js b/app/javascript/glitch/components/status/index.js index 12ea0e9aa..1d135754a 100644 --- a/app/javascript/glitch/components/status/index.js +++ b/app/javascript/glitch/components/status/index.js @@ -46,7 +46,7 @@ import StatusHeader from './header'; import StatusContent from './content'; import StatusActionBar from './action_bar'; import StatusGallery from './gallery'; -import StatusVideoPlayer from './video_player'; +import StatusPlayer from './player'; /* * * * */ @@ -619,7 +619,7 @@ backgrounds for collapsed statuses are enabled. attachments.getIn([0, 'type']) === 'video' ) { media = ( // Media type is 'video' - <StatusVideoPlayer + <StatusPlayer media={attachments.get(0)} sensitive={status.get('sensitive')} letterbox={settings.getIn(['media', 'letterbox'])} diff --git a/app/javascript/glitch/components/status/video_player.js b/app/javascript/glitch/components/status/player.js index 6583107c8..37e4b8995 100644 --- a/app/javascript/glitch/components/status/video_player.js +++ b/app/javascript/glitch/components/status/player.js @@ -15,7 +15,7 @@ const messages = defineMessages({ }); @injectIntl -export default class StatusVideoPlayer extends React.PureComponent { +export default class StatusPlayer extends React.PureComponent { static propTypes = { media: ImmutablePropTypes.map.isRequired, diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js index 89a358e38..680a4e58a 100644 --- a/app/javascript/mastodon/components/media_gallery.js +++ b/app/javascript/mastodon/components/media_gallery.js @@ -1,3 +1,6 @@ +// THIS FILE EXISTS FOR UPSTREAM COMPATIBILITY & SHOULDN'T BE USED !! +// SEE INSTEAD : glitch/components/status/gallery + import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 6b9fdd2af..6605457f7 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -1,3 +1,6 @@ +// THIS FILE EXISTS FOR UPSTREAM COMPATIBILITY & SHOULDN'T BE USED !! +// SEE INSTEAD : glitch/components/status + import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js index 7bb394e71..2fad0fa5a 100644 --- a/app/javascript/mastodon/components/status_action_bar.js +++ b/app/javascript/mastodon/components/status_action_bar.js @@ -1,3 +1,6 @@ +// THIS FILE EXISTS FOR UPSTREAM COMPATIBILITY & SHOULDN'T BE USED !! +// SEE INSTEAD : glitch/components/status/action_bar + import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; diff --git a/app/javascript/mastodon/components/status_content.js b/app/javascript/mastodon/components/status_content.js index 1b803a22e..ad925edef 100644 --- a/app/javascript/mastodon/components/status_content.js +++ b/app/javascript/mastodon/components/status_content.js @@ -1,3 +1,6 @@ +// THIS FILE EXISTS FOR UPSTREAM COMPATIBILITY & SHOULDN'T BE USED !! +// SEE INSTEAD : glitch/components/status/content + import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import escapeTextContentForBrowser from 'escape-html'; diff --git a/app/javascript/mastodon/components/status_list.js b/app/javascript/mastodon/components/status_list.js index b5c6c2053..94b348f25 100644 --- a/app/javascript/mastodon/components/status_list.js +++ b/app/javascript/mastodon/components/status_list.js @@ -2,7 +2,7 @@ import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { ScrollContainer } from 'react-router-scroll'; import PropTypes from 'prop-types'; -import StatusContainer from '../../glitch/containers/status'; +import StatusContainer from '../../glitch/components/status/container'; import LoadMore from './load_more'; import ImmutablePureComponent from 'react-immutable-pure-component'; import IntersectionObserverWrapper from '../features/ui/util/intersection_observer_wrapper'; diff --git a/app/javascript/mastodon/components/video_player.js b/app/javascript/mastodon/components/video_player.js index 999cf42d9..5f2447c6d 100644 --- a/app/javascript/mastodon/components/video_player.js +++ b/app/javascript/mastodon/components/video_player.js @@ -1,3 +1,6 @@ +// THIS FILE EXISTS FOR UPSTREAM COMPATIBILITY & SHOULDN'T BE USED !! +// SEE INSTEAD : glitch/components/status/player + import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; diff --git a/app/javascript/mastodon/containers/status_container.js b/app/javascript/mastodon/containers/status_container.js index 438ecfe43..9b7f984e0 100644 --- a/app/javascript/mastodon/containers/status_container.js +++ b/app/javascript/mastodon/containers/status_container.js @@ -1,3 +1,6 @@ +// THIS FILE EXISTS FOR UPSTREAM COMPATIBILITY & SHOULDN'T BE USED !! +// SEE INSTEAD : glitch/components/status/container + import React from 'react'; import { connect } from 'react-redux'; import Status from '../components/status'; diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index 3239b1085..1133e8a4e 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -1,3 +1,6 @@ +// THIS FILE EXISTS FOR UPSTREAM COMPATIBILITY & SHOULDN'T BE USED !! +// SEE INSTEAD : glitch/components/account/header + import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js index 4b14f8c81..de5b09834 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.js +++ b/app/javascript/mastodon/features/compose/components/compose_form.js @@ -11,7 +11,7 @@ import { defineMessages, injectIntl } from 'react-intl'; import Collapsable from '../../../components/collapsable'; import SpoilerButtonContainer from '../containers/spoiler_button_container'; import PrivacyDropdownContainer from '../containers/privacy_dropdown_container'; -import ComposeAdvancedOptionsContainer from '../../../../glitch/containers/compose/advanced_options'; +import ComposeAdvancedOptionsContainer from '../../../../glitch/components/compose/advanced_options/container'; import SensitiveButtonContainer from '../containers/sensitive_button_container'; import EmojiPickerDropdown from './emoji_picker_dropdown'; import UploadFormContainer from '../containers/upload_form_container'; diff --git a/app/javascript/mastodon/features/compose/components/search_results.js b/app/javascript/mastodon/features/compose/components/search_results.js index 3d1c3ca5e..cae4ca412 100644 --- a/app/javascript/mastodon/features/compose/components/search_results.js +++ b/app/javascript/mastodon/features/compose/components/search_results.js @@ -2,7 +2,7 @@ import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage } from 'react-intl'; import AccountContainer from '../../../containers/account_container'; -import StatusContainer from '../../../../glitch/containers/status'; +import StatusContainer from '../../../../glitch/components/status/container'; import Link from 'react-router-dom/Link'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/mastodon/features/notifications/components/notification.js b/app/javascript/mastodon/features/notifications/components/notification.js index 9d631644a..0771849c2 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.js +++ b/app/javascript/mastodon/features/notifications/components/notification.js @@ -1,3 +1,6 @@ +// THIS FILE EXISTS FOR UPSTREAM COMPATIBILITY & SHOULDN'T BE USED !! +// SEE INSTEAD : glitch/components/notification + import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import StatusContainer from '../../../containers/status_container'; diff --git a/app/javascript/mastodon/features/notifications/containers/notification_container.js b/app/javascript/mastodon/features/notifications/containers/notification_container.js index 786222967..1f98a66d2 100644 --- a/app/javascript/mastodon/features/notifications/containers/notification_container.js +++ b/app/javascript/mastodon/features/notifications/containers/notification_container.js @@ -1,3 +1,6 @@ +// THIS FILE EXISTS FOR UPSTREAM COMPATIBILITY & SHOULDN'T BE USED !! +// SEE INSTEAD : glitch/components/notification/container + import { connect } from 'react-redux'; import { makeGetNotification } from '../../../selectors'; import Notification from '../components/notification'; diff --git a/app/javascript/mastodon/features/notifications/index.js b/app/javascript/mastodon/features/notifications/index.js index fb8f0d3cc..39fb4b26d 100644 --- a/app/javascript/mastodon/features/notifications/index.js +++ b/app/javascript/mastodon/features/notifications/index.js @@ -6,7 +6,7 @@ import Column from '../../components/column'; import ColumnHeader from '../../components/column_header'; import { expandNotifications, scrollTopNotifications } from '../../actions/notifications'; import { addColumn, removeColumn, moveColumn } from '../../actions/columns'; -import NotificationContainer from '../../../glitch/containers/notification'; +import NotificationContainer from '../../../glitch/components/notification/container'; import { ScrollContainer } from 'react-router-scroll'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ColumnSettingsContainer from './containers/column_settings_container'; diff --git a/app/javascript/mastodon/features/status/components/detailed_status.js b/app/javascript/mastodon/features/status/components/detailed_status.js index db0181f23..67d1e822d 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.js +++ b/app/javascript/mastodon/features/status/components/detailed_status.js @@ -5,7 +5,7 @@ import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; import StatusContent from '../../../../glitch/components/status/content'; import StatusGallery from '../../../../glitch/components/status/gallery'; -import StatusVideoPlayer from '../../../../glitch/components/status/video_player'; +import StatusPlayer from '../../../../glitch/components/status/player'; import AttachmentList from '../../../components/attachment_list'; import Link from 'react-router-dom/Link'; import { FormattedDate, FormattedNumber } from 'react-intl'; @@ -48,7 +48,7 @@ export default class DetailedStatus extends ImmutablePureComponent { media = <AttachmentList media={status.get('media_attachments')} />; } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') { media = ( - <StatusVideoPlayer + <StatusPlayer sensitive={status.get('sensitive')} media={status.getIn(['media_attachments', 0])} letterbox={settings.getIn(['media', 'letterbox'])} diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index b24beadd2..d774dfdfe 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -22,7 +22,7 @@ import { initReport } from '../../actions/reports'; import { makeGetStatus } from '../../selectors'; import { ScrollContainer } from 'react-router-scroll'; import ColumnBackButton from '../../components/column_back_button'; -import StatusContainer from '../../../glitch/containers/status'; +import StatusContainer from '../../../glitch/components/status/container'; import { openModal } from '../../actions/modal'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/mastodon/features/ui/util/async-components.js b/app/javascript/mastodon/features/ui/util/async-components.js index 8c9b1bd97..01e31749b 100644 --- a/app/javascript/mastodon/features/ui/util/async-components.js +++ b/app/javascript/mastodon/features/ui/util/async-components.js @@ -103,11 +103,11 @@ export function ReportModal () { } export function SettingsModal () { - return import(/* webpackChunkName: "modals/settings_modal" */'../../../../glitch/containers/settings'); + return import(/* webpackChunkName: "modals/settings_modal" */'../../../../glitch/components/settings/container'); } // THESE AREN'T USED BY US; SEE `glitch/components/status` AND `mastodon/features/status`. // -// HOWEVER, IF MASTODON EVER CHANGES DETAILED STATUSES SO THAT THEY NEED THEM, WE'LL NEED TO UPDATE THE URLS OR SOMETHING LOL. // +// IF MASTODON EVER CHANGES DETAILED STATUSES TO REQUIRE THEM, WE'LL NEED TO UPDATE THE URLS OR SOMETHING LOL. // export function MediaGallery () { return import(/* webpackChunkName: "status/MediaGallery" */'../../../components/media_gallery'); |