diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js index f30e193c4f..506e5ee6ad 100644 --- a/app/javascript/flavours/glitch/actions/importer/normalizer.js +++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js @@ -1,8 +1,8 @@ import escapeTextContentForBrowser from 'escape-html'; -import emojify from 'flavours/glitch/features/emoji/emoji'; -import { autoHideCW } from 'flavours/glitch/utils/content_warning'; -import { unescapeHTML } from 'flavours/glitch/utils/html'; +import emojify from '../../features/emoji/emoji'; +import { autoHideCW } from '../../utils/content_warning'; +import { unescapeHTML } from '../../utils/html'; const domParser = new DOMParser(); diff --git a/app/javascript/flavours/glitch/actions/mutes.js b/app/javascript/flavours/glitch/actions/mutes.js index 4af927d932..fb041078b8 100644 --- a/app/javascript/flavours/glitch/actions/mutes.js +++ b/app/javascript/flavours/glitch/actions/mutes.js @@ -1,9 +1,8 @@ -import { openModal } from 'flavours/glitch/actions/modal'; - import api, { getLinks } from '../api'; import { fetchRelationships } from './accounts'; import { importFetchedAccounts } from './importer'; +import { openModal } from './modal'; export const MUTES_FETCH_REQUEST = 'MUTES_FETCH_REQUEST'; export const MUTES_FETCH_SUCCESS = 'MUTES_FETCH_SUCCESS'; diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js index 81b8045d70..9a04b43408 100644 --- a/app/javascript/flavours/glitch/actions/notifications.js +++ b/app/javascript/flavours/glitch/actions/notifications.js @@ -5,10 +5,10 @@ import { List as ImmutableList } from 'immutable'; import { compareId } from 'flavours/glitch/compare_id'; import { usePendingItems as preferPendingItems } from 'flavours/glitch/initial_state'; -import { unescapeHTML } from 'flavours/glitch/utils/html'; -import { requestNotificationPermission } from 'flavours/glitch/utils/notifications'; import api, { getLinks } from '../api'; +import { unescapeHTML } from '../utils/html'; +import { requestNotificationPermission } from '../utils/notifications'; import { fetchFollowRequests, fetchRelationships } from './accounts'; import { diff --git a/app/javascript/flavours/glitch/actions/pin_statuses.js b/app/javascript/flavours/glitch/actions/pin_statuses.js index 8aca199e97..baa10d1562 100644 --- a/app/javascript/flavours/glitch/actions/pin_statuses.js +++ b/app/javascript/flavours/glitch/actions/pin_statuses.js @@ -1,10 +1,8 @@ -import { me } from 'flavours/glitch/initial_state'; - import api from '../api'; +import { me } from '../initial_state'; import { importFetchedStatuses } from './importer'; - export const PINNED_STATUSES_FETCH_REQUEST = 'PINNED_STATUSES_FETCH_REQUEST'; export const PINNED_STATUSES_FETCH_SUCCESS = 'PINNED_STATUSES_FETCH_SUCCESS'; export const PINNED_STATUSES_FETCH_FAIL = 'PINNED_STATUSES_FETCH_FAIL'; diff --git a/app/javascript/flavours/glitch/actions/streaming.js b/app/javascript/flavours/glitch/actions/streaming.js index f1c44d2e29..9ae13a4716 100644 --- a/app/javascript/flavours/glitch/actions/streaming.js +++ b/app/javascript/flavours/glitch/actions/streaming.js @@ -1,7 +1,6 @@ // @ts-check -import { getLocale } from 'flavours/glitch/locales'; - +import { getLocale } from '../locales'; import { connectStream } from '../stream'; import { diff --git a/app/javascript/flavours/glitch/components/autosuggest_emoji.jsx b/app/javascript/flavours/glitch/components/autosuggest_emoji.jsx index 0e7014e6b1..7c4f758b0f 100644 --- a/app/javascript/flavours/glitch/components/autosuggest_emoji.jsx +++ b/app/javascript/flavours/glitch/components/autosuggest_emoji.jsx @@ -1,9 +1,10 @@ import PropTypes from 'prop-types'; import { PureComponent } from 'react'; -import { unicodeMapping } from 'flavours/glitch/features/emoji/emoji_unicode_mapping_light'; import { assetHost } from 'flavours/glitch/utils/config'; +import { unicodeMapping } from '../features/emoji/emoji_unicode_mapping_light'; + export default class AutosuggestEmoji extends PureComponent { static propTypes = { diff --git a/app/javascript/flavours/glitch/components/autosuggest_input.jsx b/app/javascript/flavours/glitch/components/autosuggest_input.jsx index f0833c8c6b..6d2474b442 100644 --- a/app/javascript/flavours/glitch/components/autosuggest_input.jsx +++ b/app/javascript/flavours/glitch/components/autosuggest_input.jsx @@ -5,7 +5,7 @@ import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import AutosuggestAccountContainer from 'flavours/glitch/features/compose/containers/autosuggest_account_container'; +import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container'; import AutosuggestEmoji from './autosuggest_emoji'; import { AutosuggestHashtag } from './autosuggest_hashtag'; diff --git a/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx b/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx index 25ca3fefa5..c023b99f81 100644 --- a/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx +++ b/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx @@ -7,7 +7,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import Textarea from 'react-textarea-autosize'; -import AutosuggestAccountContainer from 'flavours/glitch/features/compose/containers/autosuggest_account_container'; +import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container'; import AutosuggestEmoji from './autosuggest_emoji'; import { AutosuggestHashtag } from './autosuggest_hashtag'; diff --git a/app/javascript/flavours/glitch/components/avatar.tsx b/app/javascript/flavours/glitch/components/avatar.tsx index 92d8a135b0..16360d27cd 100644 --- a/app/javascript/flavours/glitch/components/avatar.tsx +++ b/app/javascript/flavours/glitch/components/avatar.tsx @@ -2,9 +2,9 @@ import * as React from 'react'; import classNames from 'classnames'; -import { useHovering } from 'flavours/glitch/hooks/useHovering'; -import { autoPlayGif } from 'flavours/glitch/initial_state'; -import type { Account } from 'flavours/glitch/types/resources'; +import { useHovering } from '../hooks/useHovering'; +import { autoPlayGif } from '../initial_state'; +import type { Account } from '../types/resources'; interface Props { account: Account | undefined; diff --git a/app/javascript/flavours/glitch/components/avatar_composite.jsx b/app/javascript/flavours/glitch/components/avatar_composite.jsx index 5503abf4a9..762834f0fc 100644 --- a/app/javascript/flavours/glitch/components/avatar_composite.jsx +++ b/app/javascript/flavours/glitch/components/avatar_composite.jsx @@ -3,7 +3,7 @@ import { PureComponent } from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import { autoPlayGif } from 'flavours/glitch/initial_state'; +import { autoPlayGif } from '../initial_state'; export default class AvatarComposite extends PureComponent { diff --git a/app/javascript/flavours/glitch/components/display_name.tsx b/app/javascript/flavours/glitch/components/display_name.tsx index a140394320..3ad00b5855 100644 --- a/app/javascript/flavours/glitch/components/display_name.tsx +++ b/app/javascript/flavours/glitch/components/display_name.tsx @@ -4,9 +4,8 @@ import classNames from 'classnames'; import type { List } from 'immutable'; -import type { Account } from 'flavours/glitch/types/resources'; - import { autoPlayGif } from '../initial_state'; +import type { Account } from '../types/resources'; import { Skeleton } from './skeleton'; diff --git a/app/javascript/flavours/glitch/components/intersection_observer_article.jsx b/app/javascript/flavours/glitch/components/intersection_observer_article.jsx index bef40c07fa..455b4cf978 100644 --- a/app/javascript/flavours/glitch/components/intersection_observer_article.jsx +++ b/app/javascript/flavours/glitch/components/intersection_observer_article.jsx @@ -3,6 +3,7 @@ import { cloneElement, Component } from 'react'; import getRectFromEntry from '../features/ui/util/get_rect_from_entry'; import scheduleIdleTask from '../features/ui/util/schedule_idle_task'; + // Diff these props in the "unrendered" state const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'cachedHeight']; @@ -38,7 +39,6 @@ export default class IntersectionObserverArticle extends Component { return true; } - componentDidMount () { const { intersectionObserverWrapper, id } = this.props; diff --git a/app/javascript/flavours/glitch/components/media_gallery.jsx b/app/javascript/flavours/glitch/components/media_gallery.jsx index 21fdc47416..5b17f10ba7 100644 --- a/app/javascript/flavours/glitch/components/media_gallery.jsx +++ b/app/javascript/flavours/glitch/components/media_gallery.jsx @@ -11,7 +11,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import { Blurhash } from 'flavours/glitch/components/blurhash'; -import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state'; + +import { autoPlayGif, displayMedia, useBlurhash } from '../initial_state'; import { IconButton } from './icon_button'; diff --git a/app/javascript/flavours/glitch/components/poll.jsx b/app/javascript/flavours/glitch/components/poll.jsx index 03dd6b576e..7b69d302a7 100644 --- a/app/javascript/flavours/glitch/components/poll.jsx +++ b/app/javascript/flavours/glitch/components/poll.jsx @@ -10,13 +10,12 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import escapeTextContentForBrowser from 'escape-html'; import spring from 'react-motion/lib/spring'; -import { Icon } from 'flavours/glitch/components/icon'; +import { Icon } from 'flavours/glitch/components/icon'; import emojify from 'flavours/glitch/features/emoji/emoji'; import Motion from 'flavours/glitch/features/ui/util/optional_motion'; import { RelativeTimestamp } from './relative_timestamp'; - const messages = defineMessages({ closed: { id: 'poll.closed', diff --git a/app/javascript/flavours/glitch/components/scrollable_list.jsx b/app/javascript/flavours/glitch/components/scrollable_list.jsx index a281e56154..82d32185e1 100644 --- a/app/javascript/flavours/glitch/components/scrollable_list.jsx +++ b/app/javascript/flavours/glitch/components/scrollable_list.jsx @@ -10,11 +10,11 @@ import { connect } from 'react-redux'; import { supportsPassiveEvents } from 'detect-passive-events'; import { throttle } from 'lodash'; -import IntersectionObserverArticleContainer from 'flavours/glitch/containers/intersection_observer_article_container'; import ScrollContainer from 'flavours/glitch/containers/scroll_container'; -import IntersectionObserverWrapper from 'flavours/glitch/features/ui/util/intersection_observer_wrapper'; +import IntersectionObserverArticleContainer from '../containers/intersection_observer_article_container'; import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../features/ui/util/fullscreen'; +import IntersectionObserverWrapper from '../features/ui/util/intersection_observer_wrapper'; import { LoadMore } from './load_more'; import { LoadPending } from './load_pending'; diff --git a/app/javascript/flavours/glitch/components/status.jsx b/app/javascript/flavours/glitch/components/status.jsx index 54ccbbd9c8..72ea42d90a 100644 --- a/app/javascript/flavours/glitch/components/status.jsx +++ b/app/javascript/flavours/glitch/components/status.jsx @@ -12,13 +12,13 @@ import { HotKeys } from 'react-hotkeys'; import PictureInPicturePlaceholder from 'flavours/glitch/components/picture_in_picture_placeholder'; import PollContainer from 'flavours/glitch/containers/poll_container'; import NotificationOverlayContainer from 'flavours/glitch/features/notifications/containers/overlay_container'; -import { displayMedia } from 'flavours/glitch/initial_state'; import { autoUnfoldCW } from 'flavours/glitch/utils/content_warning'; import { withOptionalRouter, WithOptionalRouterPropTypes } from 'flavours/glitch/utils/react_router'; import Card from '../features/status/components/card'; import Bundle from '../features/ui/components/bundle'; import { MediaGallery, Video, Audio } from '../features/ui/util/async-components'; +import { displayMedia } from '../initial_state'; import AttachmentList from './attachment_list'; import StatusActionBar from './status_action_bar'; diff --git a/app/javascript/flavours/glitch/components/status_action_bar.jsx b/app/javascript/flavours/glitch/components/status_action_bar.jsx index b8dd63b270..9e401c593f 100644 --- a/app/javascript/flavours/glitch/components/status_action_bar.jsx +++ b/app/javascript/flavours/glitch/components/status_action_bar.jsx @@ -8,12 +8,13 @@ import { withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import DropdownMenuContainer from 'flavours/glitch/containers/dropdown_menu_container'; -import { me } from 'flavours/glitch/initial_state'; import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'flavours/glitch/permissions'; import { accountAdminLink, statusAdminLink } from 'flavours/glitch/utils/backend_links'; import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router'; +import DropdownMenuContainer from '../containers/dropdown_menu_container'; +import { me } from '../initial_state'; + import { IconButton } from './icon_button'; import { RelativeTimestamp } from './relative_timestamp'; diff --git a/app/javascript/flavours/glitch/components/status_list.jsx b/app/javascript/flavours/glitch/components/status_list.jsx index f28c42582c..87825839e5 100644 --- a/app/javascript/flavours/glitch/components/status_list.jsx +++ b/app/javascript/flavours/glitch/components/status_list.jsx @@ -6,7 +6,8 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { debounce } from 'lodash'; import RegenerationIndicator from 'flavours/glitch/components/regeneration_indicator'; -import StatusContainer from 'flavours/glitch/containers/status_container'; + +import StatusContainer from '../containers/status_container'; import { LoadGap } from './load_gap'; import ScrollableList from './scrollable_list'; diff --git a/app/javascript/flavours/glitch/containers/account_container.jsx b/app/javascript/flavours/glitch/containers/account_container.jsx index f204545852..a134452e77 100644 --- a/app/javascript/flavours/glitch/containers/account_container.jsx +++ b/app/javascript/flavours/glitch/containers/account_container.jsx @@ -9,12 +9,12 @@ import { unblockAccount, muteAccount, unmuteAccount, -} from 'flavours/glitch/actions/accounts'; -import { openModal } from 'flavours/glitch/actions/modal'; -import { initMuteModal } from 'flavours/glitch/actions/mutes'; -import Account from 'flavours/glitch/components/account'; -import { unfollowModal } from 'flavours/glitch/initial_state'; -import { makeGetAccount } from 'flavours/glitch/selectors'; +} from '../actions/accounts'; +import { openModal } from '../actions/modal'; +import { initMuteModal } from '../actions/mutes'; +import Account from '../components/account'; +import { unfollowModal } from '../initial_state'; +import { makeGetAccount } from '../selectors'; const messages = defineMessages({ unfollowConfirm: { id: 'confirmations.unfollow.confirm', defaultMessage: 'Unfollow' }, diff --git a/app/javascript/flavours/glitch/containers/compose_container.jsx b/app/javascript/flavours/glitch/containers/compose_container.jsx index f92bf9797b..f76550678e 100644 --- a/app/javascript/flavours/glitch/containers/compose_container.jsx +++ b/app/javascript/flavours/glitch/containers/compose_container.jsx @@ -2,12 +2,13 @@ import { PureComponent } from 'react'; import { Provider } from 'react-redux'; -import { fetchCustomEmojis } from 'flavours/glitch/actions/custom_emojis'; -import { hydrateStore } from 'flavours/glitch/actions/store'; -import Compose from 'flavours/glitch/features/standalone/compose'; -import initialState from 'flavours/glitch/initial_state'; -import { IntlProvider } from 'flavours/glitch/locales'; -import { store } from 'flavours/glitch/store'; +import { fetchCustomEmojis } from '../actions/custom_emojis'; +import { hydrateStore } from '../actions/store'; +import Compose from '../features/standalone/compose'; +import initialState from '../initial_state'; +import { IntlProvider } from '../locales'; +import { store } from '../store'; + if (initialState) { store.dispatch(hydrateStore(initialState)); diff --git a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js index e7958f4660..7550196742 100644 --- a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js +++ b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js @@ -1,9 +1,8 @@ import { connect } from 'react-redux'; -import { openDropdownMenu, closeDropdownMenu } from 'flavours/glitch/actions/dropdown_menu'; -import { openModal, closeModal } from 'flavours/glitch/actions/modal'; -import DropdownMenu from 'flavours/glitch/components/dropdown_menu'; - +import { openDropdownMenu, closeDropdownMenu } from '../actions/dropdown_menu'; +import { openModal, closeModal } from '../actions/modal'; +import DropdownMenu from '../components/dropdown_menu'; import { isUserTouching } from '../is_mobile'; /** diff --git a/app/javascript/flavours/glitch/containers/intersection_observer_article_container.js b/app/javascript/flavours/glitch/containers/intersection_observer_article_container.js index 11aedd5278..8d9bda6704 100644 --- a/app/javascript/flavours/glitch/containers/intersection_observer_article_container.js +++ b/app/javascript/flavours/glitch/containers/intersection_observer_article_container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux'; -import { setHeight } from 'flavours/glitch/actions/height_cache'; -import IntersectionObserverArticle from 'flavours/glitch/components/intersection_observer_article'; +import { setHeight } from '../actions/height_cache'; +import IntersectionObserverArticle from '../components/intersection_observer_article'; const makeMapStateToProps = (state, props) => ({ cachedHeight: state.getIn(['height_cache', props.saveHeightKey, props.id]), diff --git a/app/javascript/flavours/glitch/features/about/index.jsx b/app/javascript/flavours/glitch/features/about/index.jsx index feecc2dd6f..79b5f8114e 100644 --- a/app/javascript/flavours/glitch/features/about/index.jsx +++ b/app/javascript/flavours/glitch/features/about/index.jsx @@ -10,9 +10,9 @@ import { List as ImmutableList } from 'immutable'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; -import { fetchServer, fetchExtendedDescription, fetchDomainBlocks } from 'flavours/glitch/actions/server'; +import { fetchServer, fetchExtendedDescription, fetchDomainBlocks } from 'flavours/glitch/actions/server'; import Column from 'flavours/glitch/components/column'; -import { Icon } from 'flavours/glitch/components/icon'; +import { Icon } from 'flavours/glitch/components/icon'; import { ServerHeroImage } from 'flavours/glitch/components/server_hero_image'; import { Skeleton } from 'flavours/glitch/components/skeleton'; import Account from 'flavours/glitch/containers/account_container'; diff --git a/app/javascript/flavours/glitch/features/account_gallery/index.jsx b/app/javascript/flavours/glitch/features/account_gallery/index.jsx index 2da679fc27..d3f845ddc4 100644 --- a/app/javascript/flavours/glitch/features/account_gallery/index.jsx +++ b/app/javascript/flavours/glitch/features/account_gallery/index.jsx @@ -8,17 +8,18 @@ import { connect } from 'react-redux'; import { lookupAccount, fetchAccount } from 'flavours/glitch/actions/accounts'; import { openModal } from 'flavours/glitch/actions/modal'; -import { expandAccountMediaTimeline } from 'flavours/glitch/actions/timelines'; import { LoadMore } from 'flavours/glitch/components/load_more'; import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator'; import ScrollContainer from 'flavours/glitch/containers/scroll_container'; import ProfileColumnHeader from 'flavours/glitch/features/account/components/profile_column_header'; -import HeaderContainer from 'flavours/glitch/features/account_timeline/containers/header_container'; import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error'; -import Column from 'flavours/glitch/features/ui/components/column'; import { normalizeForLookup } from 'flavours/glitch/reducers/accounts_map'; import { getAccountGallery } from 'flavours/glitch/selectors'; +import { expandAccountMediaTimeline } from '../../actions/timelines'; +import HeaderContainer from '../account_timeline/containers/header_container'; +import Column from '../ui/components/column'; + import MediaItem from './components/media_item'; const mapStateToProps = (state, { params: { acct, id } }) => { diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/header.jsx b/app/javascript/flavours/glitch/features/account_timeline/components/header.jsx index 1e91ffa112..c38c1efa1b 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/header.jsx +++ b/app/javascript/flavours/glitch/features/account_timeline/components/header.jsx @@ -7,10 +7,11 @@ import { NavLink, withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import ActionBar from 'flavours/glitch/features/account/components/action_bar'; -import InnerHeader from 'flavours/glitch/features/account/components/header'; import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router'; +import ActionBar from '../../account/components/action_bar'; +import InnerHeader from '../../account/components/header'; + import MemorialNote from './memorial_note'; import MovedNote from './moved_note'; diff --git a/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.jsx b/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.jsx index 75b254b095..5bd0a23d3d 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.jsx +++ b/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.jsx @@ -2,7 +2,7 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; -import { initEditAccountNote } from 'flavours/glitch/actions/account_notes'; +import { initEditAccountNote } from '../../../actions/account_notes'; import { followAccount, unfollowAccount, @@ -10,19 +10,18 @@ import { unmuteAccount, pinAccount, unpinAccount, -} from 'flavours/glitch/actions/accounts'; -import { initBlockModal } from 'flavours/glitch/actions/blocks'; +} from '../../../actions/accounts'; +import { initBlockModal } from '../../../actions/blocks'; import { mentionCompose, directCompose, -} from 'flavours/glitch/actions/compose'; -import { blockDomain, unblockDomain } from 'flavours/glitch/actions/domain_blocks'; -import { openModal } from 'flavours/glitch/actions/modal'; -import { initMuteModal } from 'flavours/glitch/actions/mutes'; -import { initReport } from 'flavours/glitch/actions/reports'; -import { unfollowModal } from 'flavours/glitch/initial_state'; -import { makeGetAccount, getAccountHidden } from 'flavours/glitch/selectors'; - +} from '../../../actions/compose'; +import { blockDomain, unblockDomain } from '../../../actions/domain_blocks'; +import { openModal } from '../../../actions/modal'; +import { initMuteModal } from '../../../actions/mutes'; +import { initReport } from '../../../actions/reports'; +import { unfollowModal } from '../../../initial_state'; +import { makeGetAccount, getAccountHidden } from '../../../selectors'; import Header from '../components/header'; const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/features/account_timeline/index.jsx b/app/javascript/flavours/glitch/features/account_timeline/index.jsx index 03c989e969..45a599f24c 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/index.jsx +++ b/app/javascript/flavours/glitch/features/account_timeline/index.jsx @@ -7,13 +7,13 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import { lookupAccount, fetchAccount } from 'flavours/glitch/actions/accounts'; import { TimelineHint } from 'flavours/glitch/components/timeline_hint'; import ProfileColumnHeader from 'flavours/glitch/features/account/components/profile_column_header'; import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error'; import { normalizeForLookup } from 'flavours/glitch/reducers/accounts_map'; import { getAccountHidden } from 'flavours/glitch/selectors'; +import { lookupAccount, fetchAccount } from '../../actions/accounts'; import { fetchFeaturedTags } from '../../actions/featured_tags'; import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines'; import { LoadingIndicator } from '../../components/loading_indicator'; @@ -23,13 +23,6 @@ import Column from '../ui/components/column'; import LimitedAccountHint from './components/limited_account_hint'; import HeaderContainer from './containers/header_container'; - - - - - - - const emptyList = ImmutableList(); const mapStateToProps = (state, { params: { acct, id, tagged }, withReplies = false }) => { diff --git a/app/javascript/flavours/glitch/features/audio/index.jsx b/app/javascript/flavours/glitch/features/audio/index.jsx index 80c8af134a..5b9f38ecb1 100644 --- a/app/javascript/flavours/glitch/features/audio/index.jsx +++ b/app/javascript/flavours/glitch/features/audio/index.jsx @@ -9,15 +9,14 @@ import { is } from 'immutable'; import { throttle, debounce } from 'lodash'; -import { Blurhash } from 'flavours/glitch/components/blurhash'; import { Icon } from 'flavours/glitch/components/icon'; import { formatTime, getPointerPosition, fileNameFromURL } from 'flavours/glitch/features/video'; -import { displayMedia, useBlurhash } from 'flavours/glitch/initial_state'; + +import { Blurhash } from '../../components/blurhash'; +import { displayMedia, useBlurhash } from '../../initial_state'; import Visualizer from './visualizer'; - - const messages = defineMessages({ play: { id: 'video.play', defaultMessage: 'Play' }, pause: { id: 'video.pause', defaultMessage: 'Pause' }, diff --git a/app/javascript/flavours/glitch/features/blocks/index.jsx b/app/javascript/flavours/glitch/features/blocks/index.jsx index aa5479b208..ac5ebfd46e 100644 --- a/app/javascript/flavours/glitch/features/blocks/index.jsx +++ b/app/javascript/flavours/glitch/features/blocks/index.jsx @@ -8,13 +8,12 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import { fetchBlocks, expandBlocks } from 'flavours/glitch/actions/blocks'; -import ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim'; -import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator'; -import AccountContainer from 'flavours/glitch/containers/account_container'; -import Column from 'flavours/glitch/features/ui/components/column'; - +import { fetchBlocks, expandBlocks } from '../../actions/blocks'; +import ColumnBackButtonSlim from '../../components/column_back_button_slim'; +import { LoadingIndicator } from '../../components/loading_indicator'; import ScrollableList from '../../components/scrollable_list'; +import AccountContainer from '../../containers/account_container'; +import Column from '../ui/components/column'; const messages = defineMessages({ heading: { id: 'column.blocks', defaultMessage: 'Blocked users' }, diff --git a/app/javascript/flavours/glitch/features/community_timeline/containers/column_settings_container.js b/app/javascript/flavours/glitch/features/community_timeline/containers/column_settings_container.js index dbfc4594e1..1e9f121394 100644 --- a/app/javascript/flavours/glitch/features/community_timeline/containers/column_settings_container.js +++ b/app/javascript/flavours/glitch/features/community_timeline/containers/column_settings_container.js @@ -1,8 +1,7 @@ import { connect } from 'react-redux'; -import { changeColumnParams } from 'flavours/glitch/actions/columns'; -import { changeSetting } from 'flavours/glitch/actions/settings'; - +import { changeColumnParams } from '../../../actions/columns'; +import { changeSetting } from '../../../actions/settings'; import ColumnSettings from '../components/column_settings'; const mapStateToProps = (state, { columnId }) => { diff --git a/app/javascript/flavours/glitch/features/community_timeline/index.jsx b/app/javascript/flavours/glitch/features/community_timeline/index.jsx index f9436df0d0..e894cb932f 100644 --- a/app/javascript/flavours/glitch/features/community_timeline/index.jsx +++ b/app/javascript/flavours/glitch/features/community_timeline/index.jsx @@ -7,15 +7,16 @@ import { Helmet } from 'react-helmet'; import { connect } from 'react-redux'; -import { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/columns'; -import { connectCommunityStream } from 'flavours/glitch/actions/streaming'; -import { expandCommunityTimeline } from 'flavours/glitch/actions/timelines'; -import Column from 'flavours/glitch/components/column'; -import ColumnHeader from 'flavours/glitch/components/column_header'; import { DismissableBanner } from 'flavours/glitch/components/dismissable_banner'; -import StatusListContainer from 'flavours/glitch/features/ui/containers/status_list_container'; import { domain } from 'flavours/glitch/initial_state'; +import { addColumn, removeColumn, moveColumn } from '../../actions/columns'; +import { connectCommunityStream } from '../../actions/streaming'; +import { expandCommunityTimeline } from '../../actions/timelines'; +import Column from '../../components/column'; +import ColumnHeader from '../../components/column_header'; +import StatusListContainer from '../ui/containers/status_list_container'; + import ColumnSettingsContainer from './containers/column_settings_container'; const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/features/compose/components/autosuggest_account.jsx b/app/javascript/flavours/glitch/features/compose/components/autosuggest_account.jsx index 5f00da52c4..cf2b31c4d9 100644 --- a/app/javascript/flavours/glitch/features/compose/components/autosuggest_account.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/autosuggest_account.jsx @@ -1,8 +1,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { Avatar } from 'flavours/glitch/components/avatar'; -import { DisplayName } from 'flavours/glitch/components/display_name'; +import { Avatar } from '../../../components/avatar'; +import { DisplayName } from '../../../components/display_name'; export default class AutosuggestAccount extends ImmutablePureComponent { diff --git a/app/javascript/flavours/glitch/features/compose/components/navigation_bar.jsx b/app/javascript/flavours/glitch/features/compose/components/navigation_bar.jsx index 383a9db528..059c3fd6e4 100644 --- a/app/javascript/flavours/glitch/features/compose/components/navigation_bar.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/navigation_bar.jsx @@ -5,10 +5,11 @@ import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { Avatar } from 'flavours/glitch/components/avatar'; import Permalink from 'flavours/glitch/components/permalink'; import { profileLink } from 'flavours/glitch/utils/backend_links'; +import { Avatar } from '../../../components/avatar'; + import ActionBar from './action_bar'; export default class NavigationBar extends ImmutablePureComponent { diff --git a/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx b/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx index 2ba9f6db64..9f35e13941 100644 --- a/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx @@ -9,7 +9,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import AutosuggestInput from 'flavours/glitch/components/autosuggest_input'; -import { Icon } from 'flavours/glitch/components/icon'; +import { Icon } from 'flavours/glitch/components/icon'; import { IconButton } from 'flavours/glitch/components/icon_button'; import { pollLimits } from 'flavours/glitch/initial_state'; diff --git a/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.jsx b/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.jsx index d0f13cc33c..06775230fe 100644 --- a/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import { PureComponent } from 'react'; -import { defineMessages, injectIntl } from 'react-intl'; +import { injectIntl, defineMessages } from 'react-intl'; import Dropdown from './dropdown'; diff --git a/app/javascript/flavours/glitch/features/compose/components/search_results.jsx b/app/javascript/flavours/glitch/features/compose/components/search_results.jsx index a9687ffef5..e8379a9326 100644 --- a/app/javascript/flavours/glitch/features/compose/components/search_results.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/search_results.jsx @@ -5,13 +5,14 @@ import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { ImmutableHashtag as Hashtag } from 'flavours/glitch/components/hashtag'; import { Icon } from 'flavours/glitch/components/icon'; import { LoadMore } from 'flavours/glitch/components/load_more'; -import AccountContainer from 'flavours/glitch/containers/account_container'; -import StatusContainer from 'flavours/glitch/containers/status_container'; import { SearchSection } from 'flavours/glitch/features/explore/components/search_section'; +import { ImmutableHashtag as Hashtag } from '../../../components/hashtag'; +import AccountContainer from '../../../containers/account_container'; +import StatusContainer from '../../../containers/status_container'; + const INITIAL_PAGE_LIMIT = 10; const withoutLastResult = list => { diff --git a/app/javascript/flavours/glitch/features/compose/components/upload.jsx b/app/javascript/flavours/glitch/features/compose/components/upload.jsx index 91f649a131..ca0b32e526 100644 --- a/app/javascript/flavours/glitch/features/compose/components/upload.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/upload.jsx @@ -7,7 +7,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import spring from 'react-motion/lib/spring'; -import { Icon } from 'flavours/glitch/components/icon'; +import { Icon } from 'flavours/glitch/components/icon'; import Motion from '../../ui/util/optional_motion'; diff --git a/app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js b/app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js index 87362a4af4..f86f01bd97 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js @@ -1,7 +1,6 @@ import { connect } from 'react-redux'; -import { makeGetAccount } from 'flavours/glitch/selectors'; - +import { makeGetAccount } from '../../../selectors'; import AutosuggestAccount from '../components/autosuggest_account'; const makeMapStateToProps = () => { diff --git a/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js b/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js index e9724568cd..adc68840b3 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js @@ -2,24 +2,24 @@ import { defineMessages, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; +import { privacyPreference } from 'flavours/glitch/utils/privacy_preference'; + import { changeCompose, + submitCompose, + clearComposeSuggestions, + fetchComposeSuggestions, + selectComposeSuggestion, changeComposeSpoilerText, changeComposeSpoilerness, changeComposeVisibility, - clearComposeSuggestions, - fetchComposeSuggestions, insertEmojiCompose, - selectComposeSuggestion, - submitCompose, uploadCompose, -} from 'flavours/glitch/actions/compose'; -import { changeLocalSetting } from 'flavours/glitch/actions/local_settings'; +} from '../../../actions/compose'; +import { changeLocalSetting } from '../../../actions/local_settings'; import { openModal, -} from 'flavours/glitch/actions/modal'; -import { privacyPreference } from 'flavours/glitch/utils/privacy_preference'; - +} from '../../../actions/modal'; import ComposeForm from '../components/compose_form'; const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/features/compose/containers/emoji_picker_dropdown_container.js b/app/javascript/flavours/glitch/features/compose/containers/emoji_picker_dropdown_container.js index c06c52c14e..a0e50029df 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/emoji_picker_dropdown_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/emoji_picker_dropdown_container.js @@ -2,9 +2,8 @@ import { Map as ImmutableMap } from 'immutable'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { useEmoji } from 'flavours/glitch/actions/emojis'; -import { changeSetting } from 'flavours/glitch/actions/settings'; - +import { useEmoji } from '../../../actions/emojis'; +import { changeSetting } from '../../../actions/settings'; import EmojiPickerDropdown from '../components/emoji_picker_dropdown'; const perLine = 8; diff --git a/app/javascript/flavours/glitch/features/compose/containers/navigation_container.js b/app/javascript/flavours/glitch/features/compose/containers/navigation_container.js index 541365aa99..459fffd910 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/navigation_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/navigation_container.js @@ -3,9 +3,9 @@ import { defineMessages, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; import { openModal } from 'flavours/glitch/actions/modal'; -import { me } from 'flavours/glitch/initial_state'; import { logOut } from 'flavours/glitch/utils/log_out'; +import { me } from '../../../initial_state'; import NavigationBar from '../components/navigation_bar'; const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/features/compose/containers/poll_form_container.js b/app/javascript/flavours/glitch/features/compose/containers/poll_form_container.js index cc8f341a3a..177ffcea6a 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/poll_form_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/poll_form_container.js @@ -8,8 +8,7 @@ import { clearComposeSuggestions, fetchComposeSuggestions, selectComposeSuggestion, -} from 'flavours/glitch/actions/compose'; - +} from '../../../actions/compose'; import PollForm from '../components/poll_form'; const mapStateToProps = state => ({ diff --git a/app/javascript/flavours/glitch/features/compose/containers/privacy_dropdown_container.js b/app/javascript/flavours/glitch/features/compose/containers/privacy_dropdown_container.js index dcbd977dae..6d26abf4f6 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/privacy_dropdown_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/privacy_dropdown_container.js @@ -1,9 +1,8 @@ import { connect } from 'react-redux'; -import { changeComposeVisibility } from 'flavours/glitch/actions/compose'; -import { openModal, closeModal } from 'flavours/glitch/actions/modal'; -import { isUserTouching } from 'flavours/glitch/is_mobile'; - +import { changeComposeVisibility } from '../../../actions/compose'; +import { openModal, closeModal } from '../../../actions/modal'; +import { isUserTouching } from '../../../is_mobile'; import PrivacyDropdown from '../components/privacy_dropdown'; const mapStateToProps = state => ({ diff --git a/app/javascript/flavours/glitch/features/compose/containers/reply_indicator_container.js b/app/javascript/flavours/glitch/features/compose/containers/reply_indicator_container.js index 61012bcb1e..678124b2a8 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/reply_indicator_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/reply_indicator_container.js @@ -1,7 +1,6 @@ import { connect } from 'react-redux'; -import { cancelReplyCompose } from 'flavours/glitch/actions/compose'; - +import { cancelReplyCompose } from '../../../actions/compose'; import ReplyIndicator from '../components/reply_indicator'; const makeMapStateToProps = () => { diff --git a/app/javascript/flavours/glitch/features/compose/containers/upload_container.js b/app/javascript/flavours/glitch/features/compose/containers/upload_container.js index 006506f169..77bb90db87 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/upload_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/upload_container.js @@ -1,7 +1,6 @@ import { connect } from 'react-redux'; -import { undoUploadCompose, initMediaEditModal, submitCompose } from 'flavours/glitch/actions/compose'; - +import { undoUploadCompose, initMediaEditModal, submitCompose } from '../../../actions/compose'; import Upload from '../components/upload'; const mapStateToProps = (state, { id }) => ({ diff --git a/app/javascript/flavours/glitch/features/compose/containers/warning_container.jsx b/app/javascript/flavours/glitch/features/compose/containers/warning_container.jsx index 16916ba9c0..f339ccdfbf 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/warning_container.jsx +++ b/app/javascript/flavours/glitch/features/compose/containers/warning_container.jsx @@ -10,7 +10,6 @@ import { HASHTAG_PATTERN_REGEX } from 'flavours/glitch/utils/hashtags'; import Warning from '../components/warning'; - const mapStateToProps = state => ({ needsLockWarning: state.getIn(['compose', 'privacy']) === 'private' && !state.getIn(['accounts', me, 'locked']), hashtagWarning: state.getIn(['compose', 'privacy']) !== 'public' && HASHTAG_PATTERN_REGEX.test(state.getIn(['compose', 'text'])), diff --git a/app/javascript/flavours/glitch/features/compose/index.jsx b/app/javascript/flavours/glitch/features/compose/index.jsx index 39ef19ef59..86d5f31485 100644 --- a/app/javascript/flavours/glitch/features/compose/index.jsx +++ b/app/javascript/flavours/glitch/features/compose/index.jsx @@ -12,8 +12,8 @@ import spring from 'react-motion/lib/spring'; import { mountCompose, unmountCompose, cycleElefriendCompose } from 'flavours/glitch/actions/compose'; import Column from 'flavours/glitch/components/column'; -import { mascot } from 'flavours/glitch/initial_state'; +import { mascot } from '../../initial_state'; import Motion from '../ui/util/optional_motion'; import ComposeFormContainer from './containers/compose_form_container'; diff --git a/app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.jsx b/app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.jsx index 03e523bfd6..8c12ea9e5f 100644 --- a/app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.jsx +++ b/app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.jsx @@ -5,8 +5,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { debounce } from 'lodash'; -import ScrollableList from 'flavours/glitch/components/scrollable_list'; - +import ScrollableList from '../../../components/scrollable_list'; import ConversationContainer from '../containers/conversation_container'; export default class ConversationsList extends ImmutablePureComponent { diff --git a/app/javascript/flavours/glitch/features/direct_timeline/containers/conversations_list_container.js b/app/javascript/flavours/glitch/features/direct_timeline/containers/conversations_list_container.js index d0298c7233..1dcd3ec1bd 100644 --- a/app/javascript/flavours/glitch/features/direct_timeline/containers/conversations_list_container.js +++ b/app/javascript/flavours/glitch/features/direct_timeline/containers/conversations_list_container.js @@ -1,7 +1,6 @@ import { connect } from 'react-redux'; -import { expandConversations } from 'flavours/glitch/actions/conversations'; - +import { expandConversations } from '../../../actions/conversations'; import ConversationsList from '../components/conversations_list'; const mapStateToProps = state => ({ diff --git a/app/javascript/flavours/glitch/features/domain_blocks/index.jsx b/app/javascript/flavours/glitch/features/domain_blocks/index.jsx index c492552c02..26020a4dd2 100644 --- a/app/javascript/flavours/glitch/features/domain_blocks/index.jsx +++ b/app/javascript/flavours/glitch/features/domain_blocks/index.jsx @@ -10,18 +10,13 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import ScrollableList from 'flavours/glitch/components/scrollable_list'; - import { fetchDomainBlocks, expandDomainBlocks } from '../../actions/domain_blocks'; import ColumnBackButtonSlim from '../../components/column_back_button_slim'; import { LoadingIndicator } from '../../components/loading_indicator'; +import ScrollableList from '../../components/scrollable_list'; import DomainContainer from '../../containers/domain_container'; import Column from '../ui/components/column'; - - - - const messages = defineMessages({ heading: { id: 'column.domain_blocks', defaultMessage: 'Blocked domains' }, unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unblock domain {domain}' }, diff --git a/app/javascript/flavours/glitch/features/emoji/emoji.js b/app/javascript/flavours/glitch/features/emoji/emoji.js index b50447d406..6a2bb416e2 100644 --- a/app/javascript/flavours/glitch/features/emoji/emoji.js +++ b/app/javascript/flavours/glitch/features/emoji/emoji.js @@ -1,8 +1,9 @@ import Trie from 'substring-trie'; -import { autoPlayGif, useSystemEmojiFont } from 'flavours/glitch/initial_state'; import { assetHost } from 'flavours/glitch/utils/config'; +import { autoPlayGif, useSystemEmojiFont } from '../../initial_state'; + import { unicodeMapping } from './emoji_unicode_mapping_light'; const trie = new Trie(Object.keys(unicodeMapping)); diff --git a/app/javascript/flavours/glitch/features/explore/index.jsx b/app/javascript/flavours/glitch/features/explore/index.jsx index f5baeb4b49..27c544af0f 100644 --- a/app/javascript/flavours/glitch/features/explore/index.jsx +++ b/app/javascript/flavours/glitch/features/explore/index.jsx @@ -19,8 +19,6 @@ import Statuses from './statuses'; import Suggestions from './suggestions'; import Tags from './tags'; - - const messages = defineMessages({ title: { id: 'explore.title', defaultMessage: 'Explore' }, searchResults: { id: 'explore.search_results', defaultMessage: 'Search results' }, diff --git a/app/javascript/flavours/glitch/features/favourites/index.jsx b/app/javascript/flavours/glitch/features/favourites/index.jsx index 49fd62b966..623312a2fb 100644 --- a/app/javascript/flavours/glitch/features/favourites/index.jsx +++ b/app/javascript/flavours/glitch/features/favourites/index.jsx @@ -12,7 +12,7 @@ import { debounce } from 'lodash'; import { fetchFavourites, expandFavourites } from 'flavours/glitch/actions/interactions'; import ColumnHeader from 'flavours/glitch/components/column_header'; -import { Icon } from 'flavours/glitch/components/icon'; +import { Icon } from 'flavours/glitch/components/icon'; import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator'; import ScrollableList from 'flavours/glitch/components/scrollable_list'; import AccountContainer from 'flavours/glitch/containers/account_container'; diff --git a/app/javascript/flavours/glitch/features/filters/select_filter.jsx b/app/javascript/flavours/glitch/features/filters/select_filter.jsx index bae1d9ef95..de74fb240b 100644 --- a/app/javascript/flavours/glitch/features/filters/select_filter.jsx +++ b/app/javascript/flavours/glitch/features/filters/select_filter.jsx @@ -7,7 +7,7 @@ import { connect } from 'react-redux'; import fuzzysort from 'fuzzysort'; -import { Icon } from 'flavours/glitch/components/icon'; +import { Icon } from 'flavours/glitch/components/icon'; import { toServerSideType } from 'flavours/glitch/utils/filters'; import { loupeIcon, deleteIcon } from 'flavours/glitch/utils/icons'; diff --git a/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.jsx b/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.jsx index 1f665c0496..54a75dca70 100644 --- a/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.jsx +++ b/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.jsx @@ -5,10 +5,10 @@ import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { Avatar } from 'flavours/glitch/components/avatar'; -import { DisplayName } from 'flavours/glitch/components/display_name'; -import { IconButton } from 'flavours/glitch/components/icon_button'; -import Permalink from 'flavours/glitch/components/permalink'; +import { Avatar } from '../../../components/avatar'; +import { DisplayName } from '../../../components/display_name'; +import { IconButton } from '../../../components/icon_button'; +import Permalink from '../../../components/permalink'; const messages = defineMessages({ authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' }, diff --git a/app/javascript/flavours/glitch/features/follow_requests/containers/account_authorize_container.js b/app/javascript/flavours/glitch/features/follow_requests/containers/account_authorize_container.js index 854ebaecb8..c9c8dd7d87 100644 --- a/app/javascript/flavours/glitch/features/follow_requests/containers/account_authorize_container.js +++ b/app/javascript/flavours/glitch/features/follow_requests/containers/account_authorize_container.js @@ -1,8 +1,7 @@ import { connect } from 'react-redux'; -import { authorizeFollowRequest, rejectFollowRequest } from 'flavours/glitch/actions/accounts'; -import { makeGetAccount } from 'flavours/glitch/selectors'; - +import { authorizeFollowRequest, rejectFollowRequest } from '../../../actions/accounts'; +import { makeGetAccount } from '../../../selectors'; import AccountAuthorize from '../components/account_authorize'; const makeMapStateToProps = () => { diff --git a/app/javascript/flavours/glitch/features/follow_requests/index.jsx b/app/javascript/flavours/glitch/features/follow_requests/index.jsx index 70a2ac1e42..b0092c88ff 100644 --- a/app/javascript/flavours/glitch/features/follow_requests/index.jsx +++ b/app/javascript/flavours/glitch/features/follow_requests/index.jsx @@ -10,19 +10,14 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import { fetchFollowRequests, expandFollowRequests } from 'flavours/glitch/actions/accounts'; -import ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim'; -import ScrollableList from 'flavours/glitch/components/scrollable_list'; -import Column from 'flavours/glitch/features/ui/components/column'; -import { me } from 'flavours/glitch/initial_state'; +import { fetchFollowRequests, expandFollowRequests } from '../../actions/accounts'; +import ColumnBackButtonSlim from '../../components/column_back_button_slim'; +import ScrollableList from '../../components/scrollable_list'; +import { me } from '../../initial_state'; +import Column from '../ui/components/column'; import AccountAuthorizeContainer from './containers/account_authorize_container'; - - - - - const messages = defineMessages({ heading: { id: 'column.follow_requests', defaultMessage: 'Follow requests' }, }); diff --git a/app/javascript/flavours/glitch/features/followers/index.jsx b/app/javascript/flavours/glitch/features/followers/index.jsx index 935a0223e5..f3bcfbf271 100644 --- a/app/javascript/flavours/glitch/features/followers/index.jsx +++ b/app/javascript/flavours/glitch/features/followers/index.jsx @@ -8,24 +8,24 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; +import { TimelineHint } from 'flavours/glitch/components/timeline_hint'; +import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error'; +import { normalizeForLookup } from 'flavours/glitch/reducers/accounts_map'; +import { getAccountHidden } from 'flavours/glitch/selectors'; + import { lookupAccount, fetchAccount, fetchFollowers, expandFollowers, -} from 'flavours/glitch/actions/accounts'; -import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator'; -import ScrollableList from 'flavours/glitch/components/scrollable_list'; -import { TimelineHint } from 'flavours/glitch/components/timeline_hint'; -import AccountContainer from 'flavours/glitch/containers/account_container'; -import ProfileColumnHeader from 'flavours/glitch/features/account/components/profile_column_header'; -import HeaderContainer from 'flavours/glitch/features/account_timeline/containers/header_container'; -import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error'; -import Column from 'flavours/glitch/features/ui/components/column'; -import { normalizeForLookup } from 'flavours/glitch/reducers/accounts_map'; -import { getAccountHidden } from 'flavours/glitch/selectors'; - +} from '../../actions/accounts'; +import { LoadingIndicator } from '../../components/loading_indicator'; +import ScrollableList from '../../components/scrollable_list'; +import AccountContainer from '../../containers/account_container'; +import ProfileColumnHeader from '../account/components/profile_column_header'; import LimitedAccountHint from '../account_timeline/components/limited_account_hint'; +import HeaderContainer from '../account_timeline/containers/header_container'; +import Column from '../ui/components/column'; const mapStateToProps = (state, { params: { acct, id } }) => { const accountId = id || state.getIn(['accounts_map', normalizeForLookup(acct)]); diff --git a/app/javascript/flavours/glitch/features/following/index.jsx b/app/javascript/flavours/glitch/features/following/index.jsx index 498aa4fbe5..4ff59f6358 100644 --- a/app/javascript/flavours/glitch/features/following/index.jsx +++ b/app/javascript/flavours/glitch/features/following/index.jsx @@ -8,24 +8,24 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; +import { TimelineHint } from 'flavours/glitch/components/timeline_hint'; +import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error'; +import { normalizeForLookup } from 'flavours/glitch/reducers/accounts_map'; +import { getAccountHidden } from 'flavours/glitch/selectors'; + import { lookupAccount, fetchAccount, fetchFollowing, expandFollowing, -} from 'flavours/glitch/actions/accounts'; -import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator'; -import ScrollableList from 'flavours/glitch/components/scrollable_list'; -import { TimelineHint } from 'flavours/glitch/components/timeline_hint'; -import AccountContainer from 'flavours/glitch/containers/account_container'; -import ProfileColumnHeader from 'flavours/glitch/features/account/components/profile_column_header'; -import HeaderContainer from 'flavours/glitch/features/account_timeline/containers/header_container'; -import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error'; -import Column from 'flavours/glitch/features/ui/components/column'; -import { normalizeForLookup } from 'flavours/glitch/reducers/accounts_map'; -import { getAccountHidden } from 'flavours/glitch/selectors'; - +} from '../../actions/accounts'; +import { LoadingIndicator } from '../../components/loading_indicator'; +import ScrollableList from '../../components/scrollable_list'; +import AccountContainer from '../../containers/account_container'; +import ProfileColumnHeader from '../account/components/profile_column_header'; import LimitedAccountHint from '../account_timeline/components/limited_account_hint'; +import HeaderContainer from '../account_timeline/containers/header_container'; +import Column from '../ui/components/column'; const mapStateToProps = (state, { params: { acct, id } }) => { const accountId = id || state.getIn(['accounts_map', normalizeForLookup(acct)]); diff --git a/app/javascript/flavours/glitch/features/getting_started/index.jsx b/app/javascript/flavours/glitch/features/getting_started/index.jsx index 0987ad9352..e803c4949c 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.jsx +++ b/app/javascript/flavours/glitch/features/getting_started/index.jsx @@ -14,17 +14,16 @@ import { fetchFollowRequests } from 'flavours/glitch/actions/accounts'; import { fetchLists } from 'flavours/glitch/actions/lists'; import { openModal } from 'flavours/glitch/actions/modal'; import Column from 'flavours/glitch/features/ui/components/column'; -import ColumnLink from 'flavours/glitch/features/ui/components/column_link'; -import ColumnSubheading from 'flavours/glitch/features/ui/components/column_subheading'; import LinkFooter from 'flavours/glitch/features/ui/components/link_footer'; -import { me, showTrends } from 'flavours/glitch/initial_state'; import { preferencesLink } from 'flavours/glitch/utils/backend_links'; +import { me, showTrends } from '../../initial_state'; import NavigationBar from '../compose/components/navigation_bar'; +import ColumnLink from '../ui/components/column_link'; +import ColumnSubheading from '../ui/components/column_subheading'; import TrendsContainer from './containers/trends_container'; - const messages = defineMessages({ heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' }, home_timeline: { id: 'tabs_bar.home', defaultMessage: 'Home' }, diff --git a/app/javascript/flavours/glitch/features/hashtag_timeline/containers/column_settings_container.js b/app/javascript/flavours/glitch/features/hashtag_timeline/containers/column_settings_container.js index 6e67d1fce4..be95004cc7 100644 --- a/app/javascript/flavours/glitch/features/hashtag_timeline/containers/column_settings_container.js +++ b/app/javascript/flavours/glitch/features/hashtag_timeline/containers/column_settings_container.js @@ -1,8 +1,7 @@ import { connect } from 'react-redux'; -import { changeColumnParams } from 'flavours/glitch/actions/columns'; -import api from 'flavours/glitch/api'; - +import { changeColumnParams } from '../../../actions/columns'; +import api from '../../../api'; import ColumnSettings from '../components/column_settings'; const mapStateToProps = (state, { columnId }) => { diff --git a/app/javascript/flavours/glitch/features/hashtag_timeline/index.jsx b/app/javascript/flavours/glitch/features/hashtag_timeline/index.jsx index 675c4cc022..b2bf169da8 100644 --- a/app/javascript/flavours/glitch/features/hashtag_timeline/index.jsx +++ b/app/javascript/flavours/glitch/features/hashtag_timeline/index.jsx @@ -16,7 +16,8 @@ import { fetchHashtag, followHashtag, unfollowHashtag } from 'flavours/glitch/ac import { expandHashtagTimeline, clearTimeline } from 'flavours/glitch/actions/timelines'; import Column from 'flavours/glitch/components/column'; import ColumnHeader from 'flavours/glitch/components/column_header'; -import StatusListContainer from 'flavours/glitch/features/ui/containers/status_list_container'; + +import StatusListContainer from '../ui/containers/status_list_container'; import { HashtagHeader } from './components/hashtag_header'; import ColumnSettingsContainer from './containers/column_settings_container'; diff --git a/app/javascript/flavours/glitch/features/interaction_modal/index.jsx b/app/javascript/flavours/glitch/features/interaction_modal/index.jsx index ce5219e352..6f3a2b168c 100644 --- a/app/javascript/flavours/glitch/features/interaction_modal/index.jsx +++ b/app/javascript/flavours/glitch/features/interaction_modal/index.jsx @@ -12,7 +12,7 @@ import { throttle, escapeRegExp } from 'lodash'; import { openModal, closeModal } from 'flavours/glitch/actions/modal'; import api from 'flavours/glitch/api'; import { Button } from 'flavours/glitch/components/button'; -import { Icon } from 'flavours/glitch/components/icon'; +import { Icon } from 'flavours/glitch/components/icon'; import { registrationsOpen, sso_redirect } from 'flavours/glitch/initial_state'; const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx index c12368ac09..da5d334245 100644 --- a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx +++ b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx @@ -10,7 +10,6 @@ import { connect } from 'react-redux'; import Column from 'flavours/glitch/components/column'; import ColumnHeader from 'flavours/glitch/components/column_header'; - const messages = defineMessages({ heading: { id: 'keyboard_shortcuts.heading', defaultMessage: 'Keyboard Shortcuts' }, }); diff --git a/app/javascript/flavours/glitch/features/list_adder/components/account.jsx b/app/javascript/flavours/glitch/features/list_adder/components/account.jsx index 4dc9c1f893..31a2e96379 100644 --- a/app/javascript/flavours/glitch/features/list_adder/components/account.jsx +++ b/app/javascript/flavours/glitch/features/list_adder/components/account.jsx @@ -8,7 +8,6 @@ import { Avatar } from '../../../components/avatar'; import { DisplayName } from '../../../components/display_name'; import { makeGetAccount } from '../../../selectors'; - const makeMapStateToProps = () => { const getAccount = makeGetAccount(); @@ -19,7 +18,6 @@ const makeMapStateToProps = () => { return mapStateToProps; }; - class Account extends ImmutablePureComponent { static propTypes = { diff --git a/app/javascript/flavours/glitch/features/list_adder/components/list.jsx b/app/javascript/flavours/glitch/features/list_adder/components/list.jsx index 83a5ecb91f..c41fe532b5 100644 --- a/app/javascript/flavours/glitch/features/list_adder/components/list.jsx +++ b/app/javascript/flavours/glitch/features/list_adder/components/list.jsx @@ -9,7 +9,7 @@ import { connect } from 'react-redux'; import { Icon } from 'flavours/glitch/components/icon'; import { removeFromListAdder, addToListAdder } from '../../../actions/lists'; -import { IconButton } from '../../../components/icon_button'; +import { IconButton } from '../../../components/icon_button'; const messages = defineMessages({ remove: { id: 'lists.account.remove', defaultMessage: 'Remove from list' }, diff --git a/app/javascript/flavours/glitch/features/list_editor/components/account.jsx b/app/javascript/flavours/glitch/features/list_editor/components/account.jsx index 01c0444153..91a2bdb79d 100644 --- a/app/javascript/flavours/glitch/features/list_editor/components/account.jsx +++ b/app/javascript/flavours/glitch/features/list_editor/components/account.jsx @@ -5,10 +5,9 @@ import { defineMessages } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { Avatar } from 'flavours/glitch/components/avatar'; -import { DisplayName } from 'flavours/glitch/components/display_name'; -import { IconButton } from 'flavours/glitch/components/icon_button'; - +import { Avatar } from '../../../components/avatar'; +import { DisplayName } from '../../../components/display_name'; +import { IconButton } from '../../../components/icon_button'; const messages = defineMessages({ remove: { id: 'lists.account.remove', defaultMessage: 'Remove from list' }, diff --git a/app/javascript/flavours/glitch/features/list_editor/components/edit_list_form.jsx b/app/javascript/flavours/glitch/features/list_editor/components/edit_list_form.jsx index 5c4fff27b5..9e087a97d7 100644 --- a/app/javascript/flavours/glitch/features/list_editor/components/edit_list_form.jsx +++ b/app/javascript/flavours/glitch/features/list_editor/components/edit_list_form.jsx @@ -5,8 +5,8 @@ import { defineMessages, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; -import { changeListEditorTitle, submitListEditor } from 'flavours/glitch/actions/lists'; -import { IconButton } from 'flavours/glitch/components/icon_button'; +import { changeListEditorTitle, submitListEditor } from '../../../actions/lists'; +import { IconButton } from '../../../components/icon_button'; const messages = defineMessages({ title: { id: 'lists.edit.submit', defaultMessage: 'Change title' }, diff --git a/app/javascript/flavours/glitch/features/list_editor/index.jsx b/app/javascript/flavours/glitch/features/list_editor/index.jsx index 134d5ff074..dca690a3ec 100644 --- a/app/javascript/flavours/glitch/features/list_editor/index.jsx +++ b/app/javascript/flavours/glitch/features/list_editor/index.jsx @@ -8,8 +8,7 @@ import { connect } from 'react-redux'; import spring from 'react-motion/lib/spring'; -import { setupListEditor, clearListSuggestions, resetListEditor } from 'flavours/glitch/actions/lists'; - +import { setupListEditor, clearListSuggestions, resetListEditor } from '../../actions/lists'; import Motion from '../ui/util/optional_motion'; import EditListForm from './components/edit_list_form'; diff --git a/app/javascript/flavours/glitch/features/mutes/index.jsx b/app/javascript/flavours/glitch/features/mutes/index.jsx index b3c2ed38b0..82c1dce85b 100644 --- a/app/javascript/flavours/glitch/features/mutes/index.jsx +++ b/app/javascript/flavours/glitch/features/mutes/index.jsx @@ -10,15 +10,12 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import { fetchMutes, expandMutes } from 'flavours/glitch/actions/mutes'; -import ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim'; -import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator'; -import ScrollableList from 'flavours/glitch/components/scrollable_list'; -import AccountContainer from 'flavours/glitch/containers/account_container'; -import Column from 'flavours/glitch/features/ui/components/column'; - - - +import { fetchMutes, expandMutes } from '../../actions/mutes'; +import ColumnBackButtonSlim from '../../components/column_back_button_slim'; +import { LoadingIndicator } from '../../components/loading_indicator'; +import ScrollableList from '../../components/scrollable_list'; +import AccountContainer from '../../containers/account_container'; +import Column from '../ui/components/column'; const messages = defineMessages({ heading: { id: 'column.mutes', defaultMessage: 'Muted users' }, diff --git a/app/javascript/flavours/glitch/features/notifications/components/notifications_permission_banner.jsx b/app/javascript/flavours/glitch/features/notifications/components/notifications_permission_banner.jsx index 25d71467d3..53bf1747a1 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/notifications_permission_banner.jsx +++ b/app/javascript/flavours/glitch/features/notifications/components/notifications_permission_banner.jsx @@ -8,11 +8,9 @@ import { connect } from 'react-redux'; import { requestBrowserPermission } from 'flavours/glitch/actions/notifications'; import { changeSetting } from 'flavours/glitch/actions/settings'; import { Button } from 'flavours/glitch/components/button'; -import { Icon } from 'flavours/glitch/components/icon'; +import { Icon } from 'flavours/glitch/components/icon'; import { IconButton } from 'flavours/glitch/components/icon_button'; - - const messages = defineMessages({ close: { id: 'lightbox.close', defaultMessage: 'Close' }, }); diff --git a/app/javascript/flavours/glitch/features/notifications/containers/column_settings_container.js b/app/javascript/flavours/glitch/features/notifications/containers/column_settings_container.js index cc3793fccc..b63796a8b2 100644 --- a/app/javascript/flavours/glitch/features/notifications/containers/column_settings_container.js +++ b/app/javascript/flavours/glitch/features/notifications/containers/column_settings_container.js @@ -2,12 +2,11 @@ import { defineMessages, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; -import { showAlert } from 'flavours/glitch/actions/alerts'; -import { openModal } from 'flavours/glitch/actions/modal'; -import { setFilter, clearNotifications, requestBrowserPermission } from 'flavours/glitch/actions/notifications'; -import { changeAlerts as changePushNotifications } from 'flavours/glitch/actions/push_notifications'; -import { changeSetting } from 'flavours/glitch/actions/settings'; - +import { showAlert } from '../../../actions/alerts'; +import { openModal } from '../../../actions/modal'; +import { setFilter, clearNotifications, requestBrowserPermission } from '../../../actions/notifications'; +import { changeAlerts as changePushNotifications } from '../../../actions/push_notifications'; +import { changeSetting } from '../../../actions/settings'; import ColumnSettings from '../components/column_settings'; const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/features/notifications/index.jsx b/app/javascript/flavours/glitch/features/notifications/index.jsx index d84d29f112..6d42f27697 100644 --- a/app/javascript/flavours/glitch/features/notifications/index.jsx +++ b/app/javascript/flavours/glitch/features/notifications/index.jsx @@ -13,8 +13,12 @@ import { createSelector } from 'reselect'; import { debounce } from 'lodash'; -import { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/columns'; -import { submitMarkers } from 'flavours/glitch/actions/markers'; +import { compareId } from 'flavours/glitch/compare_id'; +import { Icon } from 'flavours/glitch/components/icon'; +import { NotSignedInIndicator } from 'flavours/glitch/components/not_signed_in_indicator'; + +import { addColumn, removeColumn, moveColumn } from '../../actions/columns'; +import { submitMarkers } from '../../actions/markers'; import { enterNotificationClearingMode, expandNotifications, @@ -23,26 +27,18 @@ import { mountNotifications, unmountNotifications, markNotificationsAsRead, -} from 'flavours/glitch/actions/notifications'; -import { compareId } from 'flavours/glitch/compare_id'; -import Column from 'flavours/glitch/components/column'; -import ColumnHeader from 'flavours/glitch/components/column_header'; -import { Icon } from 'flavours/glitch/components/icon'; -import { LoadGap } from 'flavours/glitch/components/load_gap'; -import { NotSignedInIndicator } from 'flavours/glitch/components/not_signed_in_indicator'; -import ScrollableList from 'flavours/glitch/components/scrollable_list'; -import NotificationPurgeButtonsContainer from 'flavours/glitch/containers/notification_purge_buttons_container'; +} from '../../actions/notifications'; +import Column from '../../components/column'; +import ColumnHeader from '../../components/column_header'; +import { LoadGap } from '../../components/load_gap'; +import ScrollableList from '../../components/scrollable_list'; +import NotificationPurgeButtonsContainer from '../../containers/notification_purge_buttons_container'; import NotificationsPermissionBanner from './components/notifications_permission_banner'; import ColumnSettingsContainer from './containers/column_settings_container'; import FilterBarContainer from './containers/filter_bar_container'; import NotificationContainer from './containers/notification_container'; - - - - - const messages = defineMessages({ title: { id: 'column.notifications', defaultMessage: 'Notifications' }, enterNotifCleaning : { id: 'notification_purge.start', defaultMessage: 'Enter notification cleaning mode' }, diff --git a/app/javascript/flavours/glitch/features/picture_in_picture/components/header.jsx b/app/javascript/flavours/glitch/features/picture_in_picture/components/header.jsx index d58d77d7ab..7a2902bbf0 100644 --- a/app/javascript/flavours/glitch/features/picture_in_picture/components/header.jsx +++ b/app/javascript/flavours/glitch/features/picture_in_picture/components/header.jsx @@ -12,8 +12,6 @@ import { Avatar } from 'flavours/glitch/components/avatar'; import { DisplayName } from 'flavours/glitch/components/display_name'; import { IconButton } from 'flavours/glitch/components/icon_button'; - - const messages = defineMessages({ close: { id: 'lightbox.close', defaultMessage: 'Close' }, }); diff --git a/app/javascript/flavours/glitch/features/public_timeline/containers/column_settings_container.js b/app/javascript/flavours/glitch/features/public_timeline/containers/column_settings_container.js index b884f15f5f..6476d51ffb 100644 --- a/app/javascript/flavours/glitch/features/public_timeline/containers/column_settings_container.js +++ b/app/javascript/flavours/glitch/features/public_timeline/containers/column_settings_container.js @@ -1,8 +1,7 @@ import { connect } from 'react-redux'; -import { changeColumnParams } from 'flavours/glitch/actions/columns'; -import { changeSetting } from 'flavours/glitch/actions/settings'; - +import { changeColumnParams } from '../../../actions/columns'; +import { changeSetting } from '../../../actions/settings'; import ColumnSettings from '../components/column_settings'; const mapStateToProps = (state, { columnId }) => { diff --git a/app/javascript/flavours/glitch/features/public_timeline/index.jsx b/app/javascript/flavours/glitch/features/public_timeline/index.jsx index dc5d53f9d4..05466c22fa 100644 --- a/app/javascript/flavours/glitch/features/public_timeline/index.jsx +++ b/app/javascript/flavours/glitch/features/public_timeline/index.jsx @@ -7,15 +7,16 @@ import { Helmet } from 'react-helmet'; import { connect } from 'react-redux'; -import { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/columns'; -import { connectPublicStream } from 'flavours/glitch/actions/streaming'; -import { expandPublicTimeline } from 'flavours/glitch/actions/timelines'; -import Column from 'flavours/glitch/components/column'; -import ColumnHeader from 'flavours/glitch/components/column_header'; import { DismissableBanner } from 'flavours/glitch/components/dismissable_banner'; -import StatusListContainer from 'flavours/glitch/features/ui/containers/status_list_container'; import { domain } from 'flavours/glitch/initial_state'; +import { addColumn, removeColumn, moveColumn } from '../../actions/columns'; +import { connectPublicStream } from '../../actions/streaming'; +import { expandPublicTimeline } from '../../actions/timelines'; +import Column from '../../components/column'; +import ColumnHeader from '../../components/column_header'; +import StatusListContainer from '../ui/containers/status_list_container'; + import ColumnSettingsContainer from './containers/column_settings_container'; const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/features/reblogs/index.jsx b/app/javascript/flavours/glitch/features/reblogs/index.jsx index 8cc4c004f0..9e656f4852 100644 --- a/app/javascript/flavours/glitch/features/reblogs/index.jsx +++ b/app/javascript/flavours/glitch/features/reblogs/index.jsx @@ -10,13 +10,14 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import { fetchReblogs, expandReblogs } from 'flavours/glitch/actions/interactions'; -import ColumnHeader from 'flavours/glitch/components/column_header'; -import { Icon } from 'flavours/glitch/components/icon'; -import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator'; -import ScrollableList from 'flavours/glitch/components/scrollable_list'; -import AccountContainer from 'flavours/glitch/containers/account_container'; -import Column from 'flavours/glitch/features/ui/components/column'; +import { Icon } from 'flavours/glitch/components/icon'; + +import { fetchReblogs, expandReblogs } from '../../actions/interactions'; +import ColumnHeader from '../../components/column_header'; +import { LoadingIndicator } from '../../components/loading_indicator'; +import ScrollableList from '../../components/scrollable_list'; +import AccountContainer from '../../containers/account_container'; +import Column from '../ui/components/column'; const messages = defineMessages({ heading: { id: 'column.reblogged_by', defaultMessage: 'Boosted by' }, diff --git a/app/javascript/flavours/glitch/features/standalone/compose/index.jsx b/app/javascript/flavours/glitch/features/standalone/compose/index.jsx index 8ffd98d4ec..c36e843f5a 100644 --- a/app/javascript/flavours/glitch/features/standalone/compose/index.jsx +++ b/app/javascript/flavours/glitch/features/standalone/compose/index.jsx @@ -1,9 +1,9 @@ import { PureComponent } from 'react'; -import ComposeFormContainer from 'flavours/glitch/features/compose/containers/compose_form_container'; -import LoadingBarContainer from 'flavours/glitch/features/ui/containers/loading_bar_container'; -import ModalContainer from 'flavours/glitch/features/ui/containers/modal_container'; -import NotificationsContainer from 'flavours/glitch/features/ui/containers/notifications_container'; +import ComposeFormContainer from '../../compose/containers/compose_form_container'; +import LoadingBarContainer from '../../ui/containers/loading_bar_container'; +import ModalContainer from '../../ui/containers/modal_container'; +import NotificationsContainer from '../../ui/containers/notifications_container'; export default class Compose extends PureComponent { diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.jsx b/app/javascript/flavours/glitch/features/status/components/detailed_status.jsx index 962a86da20..ec8db1febb 100644 --- a/app/javascript/flavours/glitch/features/status/components/detailed_status.jsx +++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.jsx @@ -10,20 +10,20 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { AnimatedNumber } from 'flavours/glitch/components/animated_number'; import AttachmentList from 'flavours/glitch/components/attachment_list'; -import { Avatar } from 'flavours/glitch/components/avatar'; -import { DisplayName } from 'flavours/glitch/components/display_name'; import EditedTimestamp from 'flavours/glitch/components/edited_timestamp'; import { Icon } from 'flavours/glitch/components/icon'; -import MediaGallery from 'flavours/glitch/components/media_gallery'; import PictureInPicturePlaceholder from 'flavours/glitch/components/picture_in_picture_placeholder'; -import StatusContent from 'flavours/glitch/components/status_content'; import VisibilityIcon from 'flavours/glitch/components/status_visibility_icon'; import PollContainer from 'flavours/glitch/containers/poll_container'; -import Audio from 'flavours/glitch/features/audio'; -import Video from 'flavours/glitch/features/video'; import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router'; +import { Avatar } from '../../../components/avatar'; +import { DisplayName } from '../../../components/display_name'; +import MediaGallery from '../../../components/media_gallery'; +import StatusContent from '../../../components/status_content'; +import Audio from '../../audio'; import scheduleIdleTask from '../../ui/util/schedule_idle_task'; +import Video from '../../video'; import Card from './card'; diff --git a/app/javascript/flavours/glitch/features/status/containers/detailed_status_container.js b/app/javascript/flavours/glitch/features/status/containers/detailed_status_container.js index 3b2ea6c74c..40803441d2 100644 --- a/app/javascript/flavours/glitch/features/status/containers/detailed_status_container.js +++ b/app/javascript/flavours/glitch/features/status/containers/detailed_status_container.js @@ -2,14 +2,14 @@ import { defineMessages, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; -import { showAlertForError } from 'flavours/glitch/actions/alerts'; -import { initBlockModal } from 'flavours/glitch/actions/blocks'; -import { initBoostModal } from 'flavours/glitch/actions/boosts'; +import { showAlertForError } from '../../../actions/alerts'; +import { initBlockModal } from '../../../actions/blocks'; +import { initBoostModal } from '../../../actions/boosts'; import { replyCompose, mentionCompose, directCompose, -} from 'flavours/glitch/actions/compose'; +} from '../../../actions/compose'; import { reblog, favourite, @@ -17,18 +17,17 @@ import { unfavourite, pin, unpin, -} from 'flavours/glitch/actions/interactions'; -import { openModal } from 'flavours/glitch/actions/modal'; -import { initMuteModal } from 'flavours/glitch/actions/mutes'; -import { initReport } from 'flavours/glitch/actions/reports'; +} from '../../../actions/interactions'; +import { openModal } from '../../../actions/modal'; +import { initMuteModal } from '../../../actions/mutes'; +import { initReport } from '../../../actions/reports'; import { muteStatus, unmuteStatus, deleteStatus, -} from 'flavours/glitch/actions/statuses'; -import { boostModal, deleteModal } from 'flavours/glitch/initial_state'; -import { makeGetStatus } from 'flavours/glitch/selectors'; - +} from '../../../actions/statuses'; +import { boostModal, deleteModal } from '../../../initial_state'; +import { makeGetStatus } from '../../../selectors'; import DetailedStatus from '../components/detailed_status'; const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/features/status/index.jsx b/app/javascript/flavours/glitch/features/status/index.jsx index 72a7e4009f..1063b5c22b 100644 --- a/app/javascript/flavours/glitch/features/status/index.jsx +++ b/app/javascript/flavours/glitch/features/status/index.jsx @@ -14,13 +14,20 @@ import { createSelector } from 'reselect'; import { HotKeys } from 'react-hotkeys'; -import { initBlockModal } from 'flavours/glitch/actions/blocks'; -import { initBoostModal } from 'flavours/glitch/actions/boosts'; +import { Icon } from 'flavours/glitch/components/icon'; +import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator'; +import ScrollContainer from 'flavours/glitch/containers/scroll_container'; +import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error'; +import { autoUnfoldCW } from 'flavours/glitch/utils/content_warning'; +import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router'; + +import { initBlockModal } from '../../actions/blocks'; +import { initBoostModal } from '../../actions/boosts'; import { replyCompose, mentionCompose, directCompose, -} from 'flavours/glitch/actions/compose'; +} from '../../actions/compose'; import { favourite, unfavourite, @@ -30,11 +37,11 @@ import { unreblog, pin, unpin, -} from 'flavours/glitch/actions/interactions'; -import { changeLocalSetting } from 'flavours/glitch/actions/local_settings'; -import { openModal } from 'flavours/glitch/actions/modal'; -import { initMuteModal } from 'flavours/glitch/actions/mutes'; -import { initReport } from 'flavours/glitch/actions/reports'; +} from '../../actions/interactions'; +import { changeLocalSetting } from '../../actions/local_settings'; +import { openModal } from '../../actions/modal'; +import { initMuteModal } from '../../actions/mutes'; +import { initReport } from '../../actions/reports'; import { fetchStatus, muteStatus, @@ -45,20 +52,13 @@ import { revealStatus, translateStatus, undoStatusTranslation, -} from 'flavours/glitch/actions/statuses'; -import { Icon } from 'flavours/glitch/components/icon'; -import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator'; -import { textForScreenReader, defaultMediaVisibility } from 'flavours/glitch/components/status'; -import ScrollContainer from 'flavours/glitch/containers/scroll_container'; -import StatusContainer from 'flavours/glitch/containers/status_container'; -import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error'; -import Column from 'flavours/glitch/features/ui/components/column'; -import { boostModal, favouriteModal, deleteModal } from 'flavours/glitch/initial_state'; -import { makeGetStatus, makeGetPictureInPicture } from 'flavours/glitch/selectors'; -import { autoUnfoldCW } from 'flavours/glitch/utils/content_warning'; -import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router'; - +} from '../../actions/statuses'; import ColumnHeader from '../../components/column_header'; +import { textForScreenReader, defaultMediaVisibility } from '../../components/status'; +import StatusContainer from '../../containers/status_container'; +import { boostModal, favouriteModal, deleteModal } from '../../initial_state'; +import { makeGetStatus, makeGetPictureInPicture } from '../../selectors'; +import Column from '../ui/components/column'; import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen'; import ActionBar from './components/action_bar'; diff --git a/app/javascript/flavours/glitch/features/ui/components/block_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/block_modal.jsx index af444a3ddb..cfac692324 100644 --- a/app/javascript/flavours/glitch/features/ui/components/block_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/block_modal.jsx @@ -11,7 +11,6 @@ import { initReport } from '../../../actions/reports'; import { Button } from '../../../components/button'; import { makeGetAccount } from '../../../selectors'; - const makeMapStateToProps = () => { const getAccount = makeGetAccount(); diff --git a/app/javascript/flavours/glitch/features/ui/components/boost_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/boost_modal.jsx index be78bb1f58..db02e52690 100644 --- a/app/javascript/flavours/glitch/features/ui/components/boost_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/boost_modal.jsx @@ -11,16 +11,17 @@ import { connect } from 'react-redux'; import { changeBoostPrivacy } from 'flavours/glitch/actions/boosts'; import AttachmentList from 'flavours/glitch/components/attachment_list'; -import { Avatar } from 'flavours/glitch/components/avatar'; -import { Button } from 'flavours/glitch/components/button'; -import { DisplayName } from 'flavours/glitch/components/display_name'; -import { Icon } from 'flavours/glitch/components/icon'; -import { RelativeTimestamp } from 'flavours/glitch/components/relative_timestamp'; -import StatusContent from 'flavours/glitch/components/status_content'; +import { Icon } from 'flavours/glitch/components/icon'; import VisibilityIcon from 'flavours/glitch/components/status_visibility_icon'; import PrivacyDropdown from 'flavours/glitch/features/compose/components/privacy_dropdown'; import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router'; +import { Avatar } from '../../../components/avatar'; +import { Button } from '../../../components/button'; +import { DisplayName } from '../../../components/display_name'; +import { RelativeTimestamp } from '../../../components/relative_timestamp'; +import StatusContent from '../../../components/status_content'; + const messages = defineMessages({ cancel_reblog: { id: 'status.cancel_reblog_private', defaultMessage: 'Unboost' }, reblog: { id: 'status.reblog', defaultMessage: 'Boost' }, diff --git a/app/javascript/flavours/glitch/features/ui/components/bundle_modal_error.jsx b/app/javascript/flavours/glitch/features/ui/components/bundle_modal_error.jsx index de43206481..1d792a2cfe 100644 --- a/app/javascript/flavours/glitch/features/ui/components/bundle_modal_error.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/bundle_modal_error.jsx @@ -3,7 +3,7 @@ import { Component } from 'react'; import { defineMessages, injectIntl } from 'react-intl'; -import { IconButton } from 'flavours/glitch/components/icon_button'; +import { IconButton } from '../../../components/icon_button'; const messages = defineMessages({ error: { id: 'bundle_modal_error.message', defaultMessage: 'Something went wrong while loading this component.' }, diff --git a/app/javascript/flavours/glitch/features/ui/components/column.jsx b/app/javascript/flavours/glitch/features/ui/components/column.jsx index 8f6259e5b7..6e8ff93e19 100644 --- a/app/javascript/flavours/glitch/features/ui/components/column.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/column.jsx @@ -3,8 +3,8 @@ import { PureComponent } from 'react'; import { debounce } from 'lodash'; -import { isMobile } from 'flavours/glitch/is_mobile'; -import { scrollTop } from 'flavours/glitch/scroll'; +import { isMobile } from '../../../is_mobile'; +import { scrollTop } from '../../../scroll'; import ColumnHeader from './column_header'; diff --git a/app/javascript/flavours/glitch/features/ui/components/column_header.jsx b/app/javascript/flavours/glitch/features/ui/components/column_header.jsx index a2934e60f1..c24ab898c9 100644 --- a/app/javascript/flavours/glitch/features/ui/components/column_header.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/column_header.jsx @@ -3,7 +3,7 @@ import { PureComponent } from 'react'; import classNames from 'classnames'; -import { Icon } from 'flavours/glitch/components/icon'; +import { Icon } from 'flavours/glitch/components/icon'; export default class ColumnHeader extends PureComponent { diff --git a/app/javascript/flavours/glitch/features/ui/components/columns_area.jsx b/app/javascript/flavours/glitch/features/ui/components/columns_area.jsx index 98303ef2d5..f1e7baf8dd 100644 --- a/app/javascript/flavours/glitch/features/ui/components/columns_area.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/columns_area.jsx @@ -6,8 +6,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { supportsPassiveEvents } from 'detect-passive-events'; -import { scrollRight } from 'flavours/glitch/scroll'; - +import { scrollRight } from '../../../scroll'; import BundleContainer from '../containers/bundle_container'; import { Compose, diff --git a/app/javascript/flavours/glitch/features/ui/components/confirmation_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/confirmation_modal.jsx index c7b4c736c8..59913b4bdb 100644 --- a/app/javascript/flavours/glitch/features/ui/components/confirmation_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/confirmation_modal.jsx @@ -3,7 +3,7 @@ import { PureComponent } from 'react'; import { injectIntl, FormattedMessage } from 'react-intl'; -import { Button } from 'flavours/glitch/components/button'; +import { Button } from '../../../components/button'; class ConfirmationModal extends PureComponent { diff --git a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx index 2efa6a4f16..be7266d746 100644 --- a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.jsx @@ -23,11 +23,11 @@ import Audio from 'flavours/glitch/features/audio'; import CharacterCounter from 'flavours/glitch/features/compose/components/character_counter'; import UploadProgress from 'flavours/glitch/features/compose/components/upload_progress'; import { Tesseract as fetchTesseract } from 'flavours/glitch/features/ui/util/async-components'; -import Video, { getPointerPosition } from 'flavours/glitch/features/video'; import { me } from 'flavours/glitch/initial_state'; import { assetHost } from 'flavours/glitch/utils/config'; import { changeUploadCompose, uploadThumbnail, onChangeMediaDescription, onChangeMediaFocus } from '../../../actions/compose'; +import Video, { getPointerPosition } from '../../video'; const messages = defineMessages({ close: { id: 'lightbox.close', defaultMessage: 'Close' }, diff --git a/app/javascript/flavours/glitch/features/ui/components/modal_loading.jsx b/app/javascript/flavours/glitch/features/ui/components/modal_loading.jsx index 3206e06c6a..7d19e73513 100644 --- a/app/javascript/flavours/glitch/features/ui/components/modal_loading.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/modal_loading.jsx @@ -1,4 +1,4 @@ -import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator'; +import { LoadingIndicator } from '../../../components/loading_indicator'; // Keep the markup in sync with // (make sure they have the same dimensions) diff --git a/app/javascript/flavours/glitch/features/ui/components/mute_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/mute_modal.jsx index fc72355109..2d95cabef8 100644 --- a/app/javascript/flavours/glitch/features/ui/components/mute_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/mute_modal.jsx @@ -7,10 +7,10 @@ import { connect } from 'react-redux'; import Toggle from 'react-toggle'; -import { muteAccount } from 'flavours/glitch/actions/accounts'; -import { closeModal } from 'flavours/glitch/actions/modal'; -import { toggleHideNotifications, changeMuteDuration } from 'flavours/glitch/actions/mutes'; -import { Button } from 'flavours/glitch/components/button'; +import { muteAccount } from '../../../actions/accounts'; +import { closeModal } from '../../../actions/modal'; +import { toggleHideNotifications, changeMuteDuration } from '../../../actions/mutes'; +import { Button } from '../../../components/button'; const messages = defineMessages({ minutes: { id: 'intervals.full.minutes', defaultMessage: '{number, plural, one {# minute} other {# minutes}}' }, diff --git a/app/javascript/flavours/glitch/features/ui/components/upload_area.jsx b/app/javascript/flavours/glitch/features/ui/components/upload_area.jsx index 621f8c2277..9aa8e359f8 100644 --- a/app/javascript/flavours/glitch/features/ui/components/upload_area.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/upload_area.jsx @@ -7,8 +7,6 @@ import spring from 'react-motion/lib/spring'; import Motion from '../util/optional_motion'; - - export default class UploadArea extends PureComponent { static propTypes = { diff --git a/app/javascript/flavours/glitch/features/ui/containers/bundle_container.js b/app/javascript/flavours/glitch/features/ui/containers/bundle_container.js index ff5a35319e..6a476fe248 100644 --- a/app/javascript/flavours/glitch/features/ui/containers/bundle_container.js +++ b/app/javascript/flavours/glitch/features/ui/containers/bundle_container.js @@ -1,10 +1,8 @@ import { connect } from 'react-redux'; -import { fetchBundleRequest, fetchBundleSuccess, fetchBundleFail } from 'flavours/glitch/actions/bundles'; - +import { fetchBundleRequest, fetchBundleSuccess, fetchBundleFail } from '../../../actions/bundles'; import Bundle from '../components/bundle'; - const mapDispatchToProps = dispatch => ({ onFetch () { dispatch(fetchBundleRequest()); diff --git a/app/javascript/flavours/glitch/features/ui/containers/modal_container.js b/app/javascript/flavours/glitch/features/ui/containers/modal_container.js index 0d07d68a5d..1c3872cd50 100644 --- a/app/javascript/flavours/glitch/features/ui/containers/modal_container.js +++ b/app/javascript/flavours/glitch/features/ui/containers/modal_container.js @@ -1,7 +1,6 @@ import { connect } from 'react-redux'; -import { openModal, closeModal } from 'flavours/glitch/actions/modal'; - +import { openModal, closeModal } from '../../../actions/modal'; import ModalRoot from '../components/modal_root'; const mapStateToProps = state => ({ diff --git a/app/javascript/flavours/glitch/features/ui/containers/notifications_container.js b/app/javascript/flavours/glitch/features/ui/containers/notifications_container.js index 42a55a4b80..c1d19f7100 100644 --- a/app/javascript/flavours/glitch/features/ui/containers/notifications_container.js +++ b/app/javascript/flavours/glitch/features/ui/containers/notifications_container.js @@ -4,8 +4,8 @@ import { connect } from 'react-redux'; import { NotificationStack } from 'react-notification'; -import { dismissAlert } from 'flavours/glitch/actions/alerts'; -import { getAlerts } from 'flavours/glitch/selectors'; +import { dismissAlert } from '../../../actions/alerts'; +import { getAlerts } from '../../../selectors'; const mapStateToProps = (state, { intl }) => { const notifications = getAlerts(state); diff --git a/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js b/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js index 5f34f5cd2e..f34d099b24 100644 --- a/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js +++ b/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js @@ -4,9 +4,9 @@ import { createSelector } from 'reselect'; import { debounce } from 'lodash'; -import { scrollTopTimeline, loadPending } from 'flavours/glitch/actions/timelines'; -import StatusList from 'flavours/glitch/components/status_list'; -import { me } from 'flavours/glitch/initial_state'; +import { scrollTopTimeline, loadPending } from '../../../actions/timelines'; +import StatusList from '../../../components/status_list'; +import { me } from '../../../initial_state'; const getRegex = createSelector([ (state, { regex }) => regex, diff --git a/app/javascript/flavours/glitch/features/ui/index.jsx b/app/javascript/flavours/glitch/features/ui/index.jsx index 35b2a6db4e..566421e65c 100644 --- a/app/javascript/flavours/glitch/features/ui/index.jsx +++ b/app/javascript/flavours/glitch/features/ui/index.jsx @@ -13,17 +13,17 @@ import { debounce } from 'lodash'; import { HotKeys } from 'react-hotkeys'; import { changeLayout } from 'flavours/glitch/actions/app'; -import { uploadCompose, resetCompose, changeComposeSpoilerness } from 'flavours/glitch/actions/compose'; -import { clearHeight } from 'flavours/glitch/actions/height_cache'; import { synchronouslySubmitMarkers, submitMarkers, fetchMarkers } from 'flavours/glitch/actions/markers'; -import { expandNotifications, notificationsSetVisibility } from 'flavours/glitch/actions/notifications'; -import { fetchServer, fetchServerTranslationLanguages } from 'flavours/glitch/actions/server'; -import { expandHomeTimeline } from 'flavours/glitch/actions/timelines'; import PermaLink from 'flavours/glitch/components/permalink'; import PictureInPicture from 'flavours/glitch/features/picture_in_picture'; import { layoutFromWindow } from 'flavours/glitch/is_mobile'; import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router'; +import { uploadCompose, resetCompose, changeComposeSpoilerness } from '../../actions/compose'; +import { clearHeight } from '../../actions/height_cache'; +import { expandNotifications, notificationsSetVisibility } from '../../actions/notifications'; +import { fetchServer, fetchServerTranslationLanguages } from '../../actions/server'; +import { expandHomeTimeline } from '../../actions/timelines'; import initialState, { me, owner, singleUserMode, trendsEnabled, trendsAsLanding } from '../../initial_state'; import BundleColumnError from './components/bundle_column_error'; diff --git a/app/javascript/flavours/glitch/features/ui/util/optional_motion.js b/app/javascript/flavours/glitch/features/ui/util/optional_motion.js index 4ec6877384..0b6d4d97f7 100644 --- a/app/javascript/flavours/glitch/features/ui/util/optional_motion.js +++ b/app/javascript/flavours/glitch/features/ui/util/optional_motion.js @@ -1,6 +1,6 @@ import Motion from 'react-motion/lib/Motion'; -import { reduceMotion } from 'flavours/glitch/initial_state'; +import { reduceMotion } from '../../../initial_state'; import ReducedMotion from './reduced_motion'; diff --git a/app/javascript/flavours/glitch/features/ui/util/react_router_helpers.jsx b/app/javascript/flavours/glitch/features/ui/util/react_router_helpers.jsx index 0847aa4435..aeb21c2490 100644 --- a/app/javascript/flavours/glitch/features/ui/util/react_router_helpers.jsx +++ b/app/javascript/flavours/glitch/features/ui/util/react_router_helpers.jsx @@ -5,9 +5,9 @@ import { Switch, Route, useLocation } from 'react-router-dom'; import StackTrace from 'stacktrace-js'; -import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error'; -import ColumnLoading from 'flavours/glitch/features/ui/components/column_loading'; -import BundleContainer from 'flavours/glitch/features/ui/containers/bundle_container'; +import BundleColumnError from '../components/bundle_column_error'; +import ColumnLoading from '../components/column_loading'; +import BundleContainer from '../containers/bundle_container'; // Small wrapper to pass multiColumn to the route components export const WrappedSwitch = ({ multiColumn, children }) => { diff --git a/app/javascript/flavours/glitch/features/video/index.jsx b/app/javascript/flavours/glitch/features/video/index.jsx index 022f662699..2d50f3d8eb 100644 --- a/app/javascript/flavours/glitch/features/video/index.jsx +++ b/app/javascript/flavours/glitch/features/video/index.jsx @@ -10,9 +10,9 @@ import { is } from 'immutable'; import { throttle } from 'lodash'; import { Blurhash } from 'flavours/glitch/components/blurhash'; -import { Icon } from 'flavours/glitch/components/icon'; -import { displayMedia, useBlurhash } from 'flavours/glitch/initial_state'; +import { Icon } from 'flavours/glitch/components/icon'; +import { displayMedia, useBlurhash } from '../../initial_state'; import { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen'; const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/reducers/alerts.js b/app/javascript/flavours/glitch/reducers/alerts.js index 4e237d419d..bd49d748f9 100644 --- a/app/javascript/flavours/glitch/reducers/alerts.js +++ b/app/javascript/flavours/glitch/reducers/alerts.js @@ -4,7 +4,7 @@ import { ALERT_SHOW, ALERT_DISMISS, ALERT_CLEAR, -} from 'flavours/glitch/actions/alerts'; +} from '../actions/alerts'; const initialState = ImmutableList([]); diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 0915ecba0f..d71148be28 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -51,16 +51,15 @@ import { COMPOSE_CHANGE_MEDIA_DESCRIPTION, COMPOSE_CHANGE_MEDIA_FOCUS, COMPOSE_SET_STATUS, -} from 'flavours/glitch/actions/compose'; -import { REDRAFT } from 'flavours/glitch/actions/statuses'; -import { STORE_HYDRATE } from 'flavours/glitch/actions/store'; -import { TIMELINE_DELETE } from 'flavours/glitch/actions/timelines'; -import { me, defaultContentType } from 'flavours/glitch/initial_state'; -import { recoverHashtags } from 'flavours/glitch/utils/hashtag'; -import { unescapeHTML } from 'flavours/glitch/utils/html'; -import { overwrite } from 'flavours/glitch/utils/js_helpers'; -import { privacyPreference } from 'flavours/glitch/utils/privacy_preference'; - +} from '../actions/compose'; +import { REDRAFT } from '../actions/statuses'; +import { STORE_HYDRATE } from '../actions/store'; +import { TIMELINE_DELETE } from '../actions/timelines'; +import { me, defaultContentType } from '../initial_state'; +import { recoverHashtags } from '../utils/hashtag'; +import { unescapeHTML } from '../utils/html'; +import { overwrite } from '../utils/js_helpers'; +import { privacyPreference } from '../utils/privacy_preference'; import { uuid } from '../uuid'; const totalElefriends = 3; diff --git a/app/javascript/flavours/glitch/reducers/contexts.js b/app/javascript/flavours/glitch/reducers/contexts.js index 552709383e..73c13db918 100644 --- a/app/javascript/flavours/glitch/reducers/contexts.js +++ b/app/javascript/flavours/glitch/reducers/contexts.js @@ -3,10 +3,9 @@ import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS, -} from 'flavours/glitch/actions/accounts'; -import { CONTEXT_FETCH_SUCCESS } from 'flavours/glitch/actions/statuses'; -import { TIMELINE_DELETE, TIMELINE_UPDATE } from 'flavours/glitch/actions/timelines'; - +} from '../actions/accounts'; +import { CONTEXT_FETCH_SUCCESS } from '../actions/statuses'; +import { TIMELINE_DELETE, TIMELINE_UPDATE } from '../actions/timelines'; import { compareId } from '../compare_id'; const initialState = ImmutableMap({ diff --git a/app/javascript/flavours/glitch/reducers/custom_emojis.js b/app/javascript/flavours/glitch/reducers/custom_emojis.js index 13396db7e7..56ec80f2ff 100644 --- a/app/javascript/flavours/glitch/reducers/custom_emojis.js +++ b/app/javascript/flavours/glitch/reducers/custom_emojis.js @@ -1,8 +1,8 @@ import { List as ImmutableList, fromJS as ConvertToImmutable } from 'immutable'; -import { CUSTOM_EMOJIS_FETCH_SUCCESS } from 'flavours/glitch/actions/custom_emojis'; -import { buildCustomEmojis } from 'flavours/glitch/features/emoji/emoji'; -import { search as emojiSearch } from 'flavours/glitch/features/emoji/emoji_mart_search_light'; +import { CUSTOM_EMOJIS_FETCH_SUCCESS } from '../actions/custom_emojis'; +import { buildCustomEmojis } from '../features/emoji/emoji'; +import { search as emojiSearch } from '../features/emoji/emoji_mart_search_light'; const initialState = ImmutableList([]); diff --git a/app/javascript/flavours/glitch/reducers/height_cache.js b/app/javascript/flavours/glitch/reducers/height_cache.js index 89282994e3..2664d4f824 100644 --- a/app/javascript/flavours/glitch/reducers/height_cache.js +++ b/app/javascript/flavours/glitch/reducers/height_cache.js @@ -1,6 +1,6 @@ import { Map as ImmutableMap } from 'immutable'; -import { HEIGHT_CACHE_SET, HEIGHT_CACHE_CLEAR } from 'flavours/glitch/actions/height_cache'; +import { HEIGHT_CACHE_SET, HEIGHT_CACHE_CLEAR } from '../actions/height_cache'; const initialState = ImmutableMap(); diff --git a/app/javascript/flavours/glitch/reducers/media_attachments.js b/app/javascript/flavours/glitch/reducers/media_attachments.js index 5086126ab7..cbb4933bc7 100644 --- a/app/javascript/flavours/glitch/reducers/media_attachments.js +++ b/app/javascript/flavours/glitch/reducers/media_attachments.js @@ -1,6 +1,6 @@ import { Map as ImmutableMap } from 'immutable'; -import { STORE_HYDRATE } from 'flavours/glitch/actions/store'; +import { STORE_HYDRATE } from '../actions/store'; const initialState = ImmutableMap({ accept_content_types: [], diff --git a/app/javascript/flavours/glitch/reducers/mutes.js b/app/javascript/flavours/glitch/reducers/mutes.js index d346d9a78a..a9eb61ff83 100644 --- a/app/javascript/flavours/glitch/reducers/mutes.js +++ b/app/javascript/flavours/glitch/reducers/mutes.js @@ -4,7 +4,7 @@ import { MUTES_INIT_MODAL, MUTES_TOGGLE_HIDE_NOTIFICATIONS, MUTES_CHANGE_DURATION, -} from 'flavours/glitch/actions/mutes'; +} from '../actions/mutes'; const initialState = Immutable.Map({ new: Immutable.Map({ diff --git a/app/javascript/flavours/glitch/reducers/notifications.js b/app/javascript/flavours/glitch/reducers/notifications.js index 9a4b75dce1..4415c778bb 100644 --- a/app/javascript/flavours/glitch/reducers/notifications.js +++ b/app/javascript/flavours/glitch/reducers/notifications.js @@ -5,11 +5,11 @@ import { ACCOUNT_MUTE_SUCCESS, FOLLOW_REQUEST_AUTHORIZE_SUCCESS, FOLLOW_REQUEST_REJECT_SUCCESS, -} from 'flavours/glitch/actions/accounts'; -import { DOMAIN_BLOCK_SUCCESS } from 'flavours/glitch/actions/domain_blocks'; +} from '../actions/accounts'; +import { DOMAIN_BLOCK_SUCCESS } from '../actions/domain_blocks'; import { MARKERS_FETCH_SUCCESS, -} from 'flavours/glitch/actions/markers'; +} from '../actions/markers'; import { NOTIFICATIONS_MOUNT, NOTIFICATIONS_UNMOUNT, @@ -31,9 +31,8 @@ import { NOTIFICATIONS_MARK_AS_READ, NOTIFICATIONS_SET_BROWSER_SUPPORT, NOTIFICATIONS_SET_BROWSER_PERMISSION, -} from 'flavours/glitch/actions/notifications'; -import { TIMELINE_DELETE, TIMELINE_DISCONNECT } from 'flavours/glitch/actions/timelines'; - +} from '../actions/notifications'; +import { TIMELINE_DELETE, TIMELINE_DISCONNECT } from '../actions/timelines'; import { compareId } from '../compare_id'; const initialState = ImmutableMap({ diff --git a/app/javascript/flavours/glitch/reducers/picture_in_picture.js b/app/javascript/flavours/glitch/reducers/picture_in_picture.js index 395c21245f..961fc5699c 100644 --- a/app/javascript/flavours/glitch/reducers/picture_in_picture.js +++ b/app/javascript/flavours/glitch/reducers/picture_in_picture.js @@ -1,5 +1,6 @@ import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'flavours/glitch/actions/picture_in_picture'; -import { TIMELINE_DELETE } from 'flavours/glitch/actions/timelines'; + +import { TIMELINE_DELETE } from '../actions/timelines'; const initialState = { statusId: null, diff --git a/app/javascript/flavours/glitch/reducers/push_notifications.js b/app/javascript/flavours/glitch/reducers/push_notifications.js index 23aa9bd033..fa8af0e8cc 100644 --- a/app/javascript/flavours/glitch/reducers/push_notifications.js +++ b/app/javascript/flavours/glitch/reducers/push_notifications.js @@ -1,7 +1,7 @@ import Immutable from 'immutable'; -import { SET_BROWSER_SUPPORT, SET_SUBSCRIPTION, CLEAR_SUBSCRIPTION, SET_ALERTS } from 'flavours/glitch/actions/push_notifications'; -import { STORE_HYDRATE } from 'flavours/glitch/actions/store'; +import { SET_BROWSER_SUPPORT, SET_SUBSCRIPTION, CLEAR_SUBSCRIPTION, SET_ALERTS } from '../actions/push_notifications'; +import { STORE_HYDRATE } from '../actions/store'; const initialState = Immutable.Map({ subscription: null, diff --git a/app/javascript/flavours/glitch/reducers/relationships.js b/app/javascript/flavours/glitch/reducers/relationships.js index 38fd0caa49..d1ccf9ac95 100644 --- a/app/javascript/flavours/glitch/reducers/relationships.js +++ b/app/javascript/flavours/glitch/reducers/relationships.js @@ -2,7 +2,7 @@ import { Map as ImmutableMap, fromJS } from 'immutable'; import { ACCOUNT_NOTE_SUBMIT_SUCCESS, -} from 'flavours/glitch/actions/account_notes'; +} from '../actions/account_notes'; import { ACCOUNT_FOLLOW_SUCCESS, ACCOUNT_FOLLOW_REQUEST, @@ -19,12 +19,11 @@ import { RELATIONSHIPS_FETCH_SUCCESS, FOLLOW_REQUEST_AUTHORIZE_SUCCESS, FOLLOW_REQUEST_REJECT_SUCCESS, -} from 'flavours/glitch/actions/accounts'; +} from '../actions/accounts'; import { DOMAIN_BLOCK_SUCCESS, DOMAIN_UNBLOCK_SUCCESS, -} from 'flavours/glitch/actions/domain_blocks'; - +} from '../actions/domain_blocks'; import { NOTIFICATIONS_UPDATE, } from '../actions/notifications'; diff --git a/app/javascript/flavours/glitch/reducers/search.js b/app/javascript/flavours/glitch/reducers/search.js index e4144db62e..72835eb917 100644 --- a/app/javascript/flavours/glitch/reducers/search.js +++ b/app/javascript/flavours/glitch/reducers/search.js @@ -4,7 +4,7 @@ import { COMPOSE_MENTION, COMPOSE_REPLY, COMPOSE_DIRECT, -} from 'flavours/glitch/actions/compose'; +} from '../actions/compose'; import { SEARCH_CHANGE, SEARCH_CLEAR, @@ -16,7 +16,7 @@ import { SEARCH_EXPAND_SUCCESS, SEARCH_EXPAND_FAIL, SEARCH_HISTORY_UPDATE, -} from 'flavours/glitch/actions/search'; +} from '../actions/search'; const initialState = ImmutableMap({ value: '', diff --git a/app/javascript/flavours/glitch/reducers/settings.js b/app/javascript/flavours/glitch/reducers/settings.js index 19a6e43e34..3d04419d8d 100644 --- a/app/javascript/flavours/glitch/reducers/settings.js +++ b/app/javascript/flavours/glitch/reducers/settings.js @@ -1,13 +1,12 @@ import { Map as ImmutableMap, fromJS } from 'immutable'; -import { COLUMN_ADD, COLUMN_REMOVE, COLUMN_MOVE, COLUMN_PARAMS_CHANGE } from 'flavours/glitch/actions/columns'; -import { EMOJI_USE } from 'flavours/glitch/actions/emojis'; -import { LANGUAGE_USE } from 'flavours/glitch/actions/languages'; -import { NOTIFICATIONS_FILTER_SET } from 'flavours/glitch/actions/notifications'; -import { SETTING_CHANGE, SETTING_SAVE } from 'flavours/glitch/actions/settings'; -import { STORE_HYDRATE } from 'flavours/glitch/actions/store'; - +import { COLUMN_ADD, COLUMN_REMOVE, COLUMN_MOVE, COLUMN_PARAMS_CHANGE } from '../actions/columns'; +import { EMOJI_USE } from '../actions/emojis'; +import { LANGUAGE_USE } from '../actions/languages'; import { LIST_DELETE_SUCCESS, LIST_FETCH_FAIL } from '../actions/lists'; +import { NOTIFICATIONS_FILTER_SET } from '../actions/notifications'; +import { SETTING_CHANGE, SETTING_SAVE } from '../actions/settings'; +import { STORE_HYDRATE } from '../actions/store'; import { uuid } from '../uuid'; const initialState = ImmutableMap({ diff --git a/app/javascript/flavours/glitch/reducers/status_lists.js b/app/javascript/flavours/glitch/reducers/status_lists.js index c4780a661f..41cc07341c 100644 --- a/app/javascript/flavours/glitch/reducers/status_lists.js +++ b/app/javascript/flavours/glitch/reducers/status_lists.js @@ -3,7 +3,7 @@ import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutabl import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS, -} from 'flavours/glitch/actions/accounts'; +} from '../actions/accounts'; import { BOOKMARKED_STATUSES_FETCH_REQUEST, BOOKMARKED_STATUSES_FETCH_SUCCESS, @@ -11,7 +11,7 @@ import { BOOKMARKED_STATUSES_EXPAND_REQUEST, BOOKMARKED_STATUSES_EXPAND_SUCCESS, BOOKMARKED_STATUSES_EXPAND_FAIL, -} from 'flavours/glitch/actions/bookmarks'; +} from '../actions/bookmarks'; import { FAVOURITED_STATUSES_FETCH_REQUEST, FAVOURITED_STATUSES_FETCH_SUCCESS, @@ -19,7 +19,7 @@ import { FAVOURITED_STATUSES_EXPAND_REQUEST, FAVOURITED_STATUSES_EXPAND_SUCCESS, FAVOURITED_STATUSES_EXPAND_FAIL, -} from 'flavours/glitch/actions/favourites'; +} from '../actions/favourites'; import { FAVOURITE_SUCCESS, UNFAVOURITE_SUCCESS, @@ -27,10 +27,10 @@ import { UNBOOKMARK_SUCCESS, PIN_SUCCESS, UNPIN_SUCCESS, -} from 'flavours/glitch/actions/interactions'; +} from '../actions/interactions'; import { PINNED_STATUSES_FETCH_SUCCESS, -} from 'flavours/glitch/actions/pin_statuses'; +} from '../actions/pin_statuses'; import { TRENDS_STATUSES_FETCH_REQUEST, TRENDS_STATUSES_FETCH_SUCCESS, @@ -38,7 +38,7 @@ import { TRENDS_STATUSES_EXPAND_REQUEST, TRENDS_STATUSES_EXPAND_SUCCESS, TRENDS_STATUSES_EXPAND_FAIL, -} from 'flavours/glitch/actions/trends'; +} from '../actions/trends'; diff --git a/app/javascript/flavours/glitch/reducers/statuses.js b/app/javascript/flavours/glitch/reducers/statuses.js index 59da21ad6a..683fe848f7 100644 --- a/app/javascript/flavours/glitch/reducers/statuses.js +++ b/app/javascript/flavours/glitch/reducers/statuses.js @@ -1,5 +1,7 @@ import { Map as ImmutableMap, fromJS } from 'immutable'; +import { STATUS_IMPORT, STATUSES_IMPORT } from '../actions/importer'; +import { normalizeStatusTranslation } from '../actions/importer/normalizer'; import { REBLOG_REQUEST, REBLOG_FAIL, @@ -13,7 +15,7 @@ import { BOOKMARK_FAIL, UNBOOKMARK_REQUEST, UNBOOKMARK_FAIL, -} from 'flavours/glitch/actions/interactions'; +} from '../actions/interactions'; import { STATUS_MUTE_SUCCESS, STATUS_UNMUTE_SUCCESS, @@ -24,13 +26,8 @@ import { STATUS_TRANSLATE_UNDO, STATUS_FETCH_REQUEST, STATUS_FETCH_FAIL, -} from 'flavours/glitch/actions/statuses'; -import { - TIMELINE_DELETE, -} from 'flavours/glitch/actions/timelines'; - -import { STATUS_IMPORT, STATUSES_IMPORT } from '../actions/importer'; -import { normalizeStatusTranslation } from '../actions/importer/normalizer'; +} from '../actions/statuses'; +import { TIMELINE_DELETE } from '../actions/timelines'; const importStatus = (state, status) => state.set(status.id, fromJS(status)); diff --git a/app/javascript/flavours/glitch/reducers/timelines.js b/app/javascript/flavours/glitch/reducers/timelines.js index 76bc6c8174..69f28d6849 100644 --- a/app/javascript/flavours/glitch/reducers/timelines.js +++ b/app/javascript/flavours/glitch/reducers/timelines.js @@ -4,7 +4,7 @@ import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS, ACCOUNT_UNFOLLOW_SUCCESS, -} from 'flavours/glitch/actions/accounts'; +} from '../actions/accounts'; import { TIMELINE_UPDATE, TIMELINE_DELETE, @@ -17,8 +17,7 @@ import { TIMELINE_DISCONNECT, TIMELINE_LOAD_PENDING, TIMELINE_MARK_AS_PARTIAL, -} from 'flavours/glitch/actions/timelines'; - +} from '../actions/timelines'; import { compareId } from '../compare_id'; const initialState = ImmutableMap(); diff --git a/app/javascript/flavours/glitch/reducers/user_lists.js b/app/javascript/flavours/glitch/reducers/user_lists.js index d37451d005..76786b4220 100644 --- a/app/javascript/flavours/glitch/reducers/user_lists.js +++ b/app/javascript/flavours/glitch/reducers/user_lists.js @@ -1,5 +1,19 @@ import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable'; +import { + DIRECTORY_FETCH_REQUEST, + DIRECTORY_FETCH_SUCCESS, + DIRECTORY_FETCH_FAIL, + DIRECTORY_EXPAND_REQUEST, + DIRECTORY_EXPAND_SUCCESS, + DIRECTORY_EXPAND_FAIL, +} from 'flavours/glitch/actions/directory'; +import { + FEATURED_TAGS_FETCH_REQUEST, + FEATURED_TAGS_FETCH_SUCCESS, + FEATURED_TAGS_FETCH_FAIL, +} from 'flavours/glitch/actions/featured_tags'; + import { FOLLOWERS_FETCH_REQUEST, FOLLOWERS_FETCH_SUCCESS, @@ -21,7 +35,7 @@ import { FOLLOW_REQUESTS_EXPAND_FAIL, FOLLOW_REQUEST_AUTHORIZE_SUCCESS, FOLLOW_REQUEST_REJECT_SUCCESS, -} from 'flavours/glitch/actions/accounts'; +} from '../actions/accounts'; import { BLOCKS_FETCH_REQUEST, BLOCKS_FETCH_SUCCESS, @@ -29,20 +43,7 @@ import { BLOCKS_EXPAND_REQUEST, BLOCKS_EXPAND_SUCCESS, BLOCKS_EXPAND_FAIL, -} from 'flavours/glitch/actions/blocks'; -import { - DIRECTORY_FETCH_REQUEST, - DIRECTORY_FETCH_SUCCESS, - DIRECTORY_FETCH_FAIL, - DIRECTORY_EXPAND_REQUEST, - DIRECTORY_EXPAND_SUCCESS, - DIRECTORY_EXPAND_FAIL, -} from 'flavours/glitch/actions/directory'; -import { - FEATURED_TAGS_FETCH_REQUEST, - FEATURED_TAGS_FETCH_SUCCESS, - FEATURED_TAGS_FETCH_FAIL, -} from 'flavours/glitch/actions/featured_tags'; +} from '../actions/blocks'; import { REBLOGS_FETCH_REQUEST, REBLOGS_FETCH_SUCCESS, @@ -56,7 +57,7 @@ import { FAVOURITES_EXPAND_REQUEST, FAVOURITES_EXPAND_SUCCESS, FAVOURITES_EXPAND_FAIL, -} from 'flavours/glitch/actions/interactions'; +} from '../actions/interactions'; import { MUTES_FETCH_REQUEST, MUTES_FETCH_SUCCESS, @@ -64,13 +65,13 @@ import { MUTES_EXPAND_REQUEST, MUTES_EXPAND_SUCCESS, MUTES_EXPAND_FAIL, -} from 'flavours/glitch/actions/mutes'; - +} from '../actions/mutes'; import { NOTIFICATIONS_UPDATE, } from '../actions/notifications'; + const initialListState = ImmutableMap({ next: null, isLoading: false, diff --git a/app/javascript/flavours/glitch/selectors/index.js b/app/javascript/flavours/glitch/selectors/index.js index a296ef8ede..74188aff6d 100644 --- a/app/javascript/flavours/glitch/selectors/index.js +++ b/app/javascript/flavours/glitch/selectors/index.js @@ -1,9 +1,10 @@ import { List as ImmutableList, Map as ImmutableMap } from 'immutable'; import { createSelector } from 'reselect'; -import { me } from 'flavours/glitch/initial_state'; import { toServerSideType } from 'flavours/glitch/utils/filters'; +import { me } from '../initial_state'; + const getAccountBase = (state, id) => state.getIn(['accounts', id], null); const getAccountCounters = (state, id) => state.getIn(['accounts_counters', id], null); const getAccountRelationship = (state, id) => state.getIn(['relationships', id], null); diff --git a/app/javascript/flavours/glitch/store/middlewares/errors.ts b/app/javascript/flavours/glitch/store/middlewares/errors.ts index 2697f80f18..4e720bfed4 100644 --- a/app/javascript/flavours/glitch/store/middlewares/errors.ts +++ b/app/javascript/flavours/glitch/store/middlewares/errors.ts @@ -1,8 +1,7 @@ import type { AnyAction, Middleware } from 'redux'; -import { showAlertForError } from 'flavours/glitch/actions/alerts'; - import type { RootState } from '..'; +import { showAlertForError } from '../../actions/alerts'; const defaultFailSuffix = 'FAIL'; diff --git a/app/javascript/flavours/glitch/stream.js b/app/javascript/flavours/glitch/stream.js index 55f009e130..ff3af5fd88 100644 --- a/app/javascript/flavours/glitch/stream.js +++ b/app/javascript/flavours/glitch/stream.js @@ -1,6 +1,7 @@ // @ts-check import WebSocketClient from '@gamestdio/websocket'; + /** * @type {WebSocketClient | undefined} */ @@ -85,12 +86,12 @@ const unsubscribe = ({ channelName, params, onDisconnect }) => { }; const sharedCallbacks = { - connected () { + connected() { subscriptions.forEach(subscription => subscribe(subscription)); }, // @ts-expect-error - received (data) { + received(data) { const { stream } = data; subscriptions.filter(({ channelName, params }) => { @@ -114,11 +115,11 @@ const sharedCallbacks = { }); }, - disconnected () { + disconnected() { subscriptions.forEach(subscription => unsubscribe(subscription)); }, - reconnected () { + reconnected() { }, }; @@ -151,19 +152,19 @@ export const connectStream = (channelName, params, callbacks) => (dispatch, getS // to using individual connections for each channel if (!streamingAPIBaseURL.startsWith('ws')) { const connection = createConnection(streamingAPIBaseURL, accessToken, channelNameWithInlineParams(channelName, params), { - connected () { + connected() { onConnect(); }, - received (data) { + received(data) { onReceive(data); }, - disconnected () { + disconnected() { onDisconnect(); }, - reconnected () { + reconnected() { onConnect(); }, }); @@ -239,10 +240,10 @@ const createConnection = (streamingAPIBaseURL, accessToken, channelName, { conne const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?${params.join('&')}`, accessToken); // @ts-expect-error - ws.onopen = connected; - ws.onmessage = e => received(JSON.parse(e.data)); + ws.onopen = connected; + ws.onmessage = e => received(JSON.parse(e.data)); // @ts-expect-error - ws.onclose = disconnected; + ws.onclose = disconnected; // @ts-expect-error ws.onreconnect = reconnected; @@ -265,7 +266,7 @@ const createConnection = (streamingAPIBaseURL, accessToken, channelName, { conne }; KNOWN_EVENT_TYPES.forEach(type => { - es.addEventListener(type, e => handleEventSourceMessage(/** @type {MessageEvent} */ (e), received)); + es.addEventListener(type, e => handleEventSourceMessage(/** @type {MessageEvent} */(e), received)); }); es.onerror = /** @type {function(): void} */ (disconnected);