From 5770d461b21cf5b6a8adcaa44d19832e11289960 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Thu, 13 Jul 2017 02:40:16 -0700 Subject: [PATCH] Moved glitch containers and commented unused files --- .../compose/advanced_options/container.js} | 4 ++-- .../{advanced_options.js => advanced_options/index.js} | 2 +- .../index.js => components/notification/container.js} | 2 +- app/javascript/glitch/components/notification/index.js | 2 +- .../settings/index.js => components/settings/container.js} | 0 .../status/index.js => components/status/container.js} | 2 +- app/javascript/glitch/components/status/index.js | 4 ++-- .../glitch/components/status/{video_player.js => player.js} | 2 +- app/javascript/mastodon/components/media_gallery.js | 3 +++ app/javascript/mastodon/components/status.js | 3 +++ app/javascript/mastodon/components/status_action_bar.js | 3 +++ app/javascript/mastodon/components/status_content.js | 3 +++ app/javascript/mastodon/components/status_list.js | 2 +- app/javascript/mastodon/components/video_player.js | 3 +++ app/javascript/mastodon/containers/status_container.js | 3 +++ app/javascript/mastodon/features/account/components/header.js | 3 +++ .../mastodon/features/compose/components/compose_form.js | 2 +- .../mastodon/features/compose/components/search_results.js | 2 +- .../features/notifications/components/notification.js | 3 +++ .../notifications/containers/notification_container.js | 3 +++ app/javascript/mastodon/features/notifications/index.js | 2 +- .../mastodon/features/status/components/detailed_status.js | 4 ++-- app/javascript/mastodon/features/status/index.js | 2 +- app/javascript/mastodon/features/ui/util/async-components.js | 4 ++-- 24 files changed, 45 insertions(+), 18 deletions(-) rename app/javascript/glitch/{containers/compose/advanced_options.js => components/compose/advanced_options/container.js} (72%) rename app/javascript/glitch/components/compose/{advanced_options.js => advanced_options/index.js} (98%) rename app/javascript/glitch/{containers/notification/index.js => components/notification/container.js} (90%) rename app/javascript/glitch/{containers/settings/index.js => components/settings/container.js} (100%) rename app/javascript/glitch/{containers/status/index.js => components/status/container.js} (99%) rename app/javascript/glitch/components/status/{video_player.js => player.js} (98%) diff --git a/app/javascript/glitch/containers/compose/advanced_options.js b/app/javascript/glitch/components/compose/advanced_options/container.js similarity index 72% rename from app/javascript/glitch/containers/compose/advanced_options.js rename to app/javascript/glitch/components/compose/advanced_options/container.js index 92b989052d..10804454ae 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 similarity index 98% rename from app/javascript/glitch/components/compose/advanced_options.js rename to app/javascript/glitch/components/compose/advanced_options/index.js index 17fc1d801d..dabf660955 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 similarity index 90% rename from app/javascript/glitch/containers/notification/index.js rename to app/javascript/glitch/components/notification/container.js index 783c838ae5..c58ef4bd2c 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 3f424d85d1..34e03cdca0 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 similarity index 100% rename from app/javascript/glitch/containers/settings/index.js rename to 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 similarity index 99% rename from app/javascript/glitch/containers/status/index.js rename to app/javascript/glitch/components/status/container.js index baf898e977..a8aa6efe9d 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 12ea0e9aae..1d135754ad 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' - ; } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') { media = ( -