From b75bf336bdb874eb9bbe3cec1a95ee59c2b3b54c Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 11 Oct 2022 11:39:52 +0200 Subject: [PATCH] Move more modules from flavours/glitch/utils to flavours/glitch --- app/javascript/flavours/glitch/actions/compose.js | 2 +- app/javascript/flavours/glitch/actions/markers.js | 2 +- app/javascript/flavours/glitch/actions/notifications.js | 2 +- .../flavours/glitch/actions/push_notifications/registerer.js | 2 +- app/javascript/flavours/glitch/actions/streaming.js | 2 +- app/javascript/flavours/glitch/actions/timelines.js | 2 +- app/javascript/flavours/glitch/{utils => }/base_polyfills.js | 2 +- app/javascript/flavours/glitch/{utils => }/compare_id.js | 0 app/javascript/flavours/glitch/components/column.js | 2 +- app/javascript/flavours/glitch/components/media_gallery.js | 2 +- .../flavours/glitch/containers/dropdown_menu_container.js | 2 +- app/javascript/flavours/glitch/{utils => }/extra_polyfills.js | 0 .../glitch/features/account_gallery/components/media_item.js | 2 +- .../glitch/features/compose/components/compose_form.js | 2 +- .../flavours/glitch/features/compose/components/dropdown.js | 2 +- .../flavours/glitch/features/compose/components/upload.js | 2 +- .../flavours/glitch/features/notifications/index.js | 2 +- .../flavours/glitch/features/ui/components/column.js | 4 ++-- .../flavours/glitch/features/ui/components/columns_area.js | 2 +- .../flavours/glitch/features/ui/components/tabs_bar.js | 2 +- app/javascript/flavours/glitch/features/ui/index.js | 2 +- app/javascript/flavours/glitch/{utils => }/is_mobile.js | 0 .../flavours/glitch/{utils => }/load_keyboard_extensions.js | 0 app/javascript/flavours/glitch/{utils => }/load_polyfills.js | 0 app/javascript/flavours/glitch/{utils => }/main.js | 2 +- app/javascript/flavours/glitch/packs/about.js | 2 +- app/javascript/flavours/glitch/packs/home.js | 4 ++-- app/javascript/flavours/glitch/packs/public.js | 4 ++-- app/javascript/flavours/glitch/packs/settings.js | 4 ++-- app/javascript/flavours/glitch/packs/share.js | 2 +- app/javascript/flavours/glitch/{utils => }/performance.js | 0 app/javascript/flavours/glitch/reducers/compose.js | 2 +- app/javascript/flavours/glitch/reducers/contexts.js | 2 +- app/javascript/flavours/glitch/reducers/conversations.js | 2 +- app/javascript/flavours/glitch/reducers/meta.js | 2 +- app/javascript/flavours/glitch/reducers/notifications.js | 2 +- app/javascript/flavours/glitch/reducers/settings.js | 2 +- app/javascript/flavours/glitch/reducers/timelines.js | 2 +- app/javascript/flavours/glitch/{utils => }/scroll.js | 0 app/javascript/flavours/glitch/{utils => }/settings.js | 0 app/javascript/flavours/glitch/{utils => }/stream.js | 0 app/javascript/flavours/glitch/{utils => }/uuid.js | 0 42 files changed, 36 insertions(+), 36 deletions(-) rename app/javascript/flavours/glitch/{utils => }/base_polyfills.js (94%) rename app/javascript/flavours/glitch/{utils => }/compare_id.js (100%) rename app/javascript/flavours/glitch/{utils => }/extra_polyfills.js (100%) rename app/javascript/flavours/glitch/{utils => }/is_mobile.js (100%) rename app/javascript/flavours/glitch/{utils => }/load_keyboard_extensions.js (100%) rename app/javascript/flavours/glitch/{utils => }/load_polyfills.js (100%) rename app/javascript/flavours/glitch/{utils => }/main.js (96%) rename app/javascript/flavours/glitch/{utils => }/performance.js (100%) rename app/javascript/flavours/glitch/{utils => }/scroll.js (100%) rename app/javascript/flavours/glitch/{utils => }/settings.js (100%) rename app/javascript/flavours/glitch/{utils => }/stream.js (100%) rename app/javascript/flavours/glitch/{utils => }/uuid.js (100%) diff --git a/app/javascript/flavours/glitch/actions/compose.js b/app/javascript/flavours/glitch/actions/compose.js index 2f2fea590..0ef505363 100644 --- a/app/javascript/flavours/glitch/actions/compose.js +++ b/app/javascript/flavours/glitch/actions/compose.js @@ -3,7 +3,7 @@ import { CancelToken, isCancel } from 'axios'; import { throttle } from 'lodash'; import { search as emojiSearch } from 'flavours/glitch/utils/emoji/emoji_mart_search_light'; import { useEmoji } from './emojis'; -import { tagHistory } from 'flavours/glitch/utils/settings'; +import { tagHistory } from '../settings'; import { recoverHashtags } from 'flavours/glitch/utils/hashtag'; import resizeImage from 'flavours/glitch/utils/resize_image'; import { importFetchedAccounts } from './importer'; diff --git a/app/javascript/flavours/glitch/actions/markers.js b/app/javascript/flavours/glitch/actions/markers.js index 66ae19316..3b6a76bc4 100644 --- a/app/javascript/flavours/glitch/actions/markers.js +++ b/app/javascript/flavours/glitch/actions/markers.js @@ -1,6 +1,6 @@ import api from '../api'; import { debounce } from 'lodash'; -import compareId from 'flavours/glitch/utils/compare_id'; +import compareId from '../compare_id'; import { List as ImmutableList } from 'immutable'; export const MARKERS_FETCH_REQUEST = 'MARKERS_FETCH_REQUEST'; diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js index 343d75908..158a5b7e4 100644 --- a/app/javascript/flavours/glitch/actions/notifications.js +++ b/app/javascript/flavours/glitch/actions/notifications.js @@ -13,7 +13,7 @@ import { defineMessages } from 'react-intl'; import { List as ImmutableList } from 'immutable'; import { unescapeHTML } from 'flavours/glitch/utils/html'; import { usePendingItems as preferPendingItems } from 'flavours/glitch/initial_state'; -import compareId from 'flavours/glitch/utils/compare_id'; +import compareId from 'flavours/glitch/compare_id'; import { requestNotificationPermission } from 'flavours/glitch/utils/notifications'; export const NOTIFICATIONS_UPDATE = 'NOTIFICATIONS_UPDATE'; diff --git a/app/javascript/flavours/glitch/actions/push_notifications/registerer.js b/app/javascript/flavours/glitch/actions/push_notifications/registerer.js index d55e91fd4..762fe260c 100644 --- a/app/javascript/flavours/glitch/actions/push_notifications/registerer.js +++ b/app/javascript/flavours/glitch/actions/push_notifications/registerer.js @@ -1,5 +1,5 @@ import api from '../../api'; -import { pushNotificationsSetting } from 'flavours/glitch/utils/settings'; +import { pushNotificationsSetting } from '../../settings'; import { setBrowserSupport, setSubscription, clearSubscription } from './setter'; // Taken from https://www.npmjs.com/package/web-push diff --git a/app/javascript/flavours/glitch/actions/streaming.js b/app/javascript/flavours/glitch/actions/streaming.js index e41f5cf46..ffac1b258 100644 --- a/app/javascript/flavours/glitch/actions/streaming.js +++ b/app/javascript/flavours/glitch/actions/streaming.js @@ -1,6 +1,6 @@ // @ts-check -import { connectStream } from 'flavours/glitch/utils/stream'; +import { connectStream } from '../stream'; import { updateTimeline, deleteFromTimelines, diff --git a/app/javascript/flavours/glitch/actions/timelines.js b/app/javascript/flavours/glitch/actions/timelines.js index f812babbd..ef1e4dbbb 100644 --- a/app/javascript/flavours/glitch/actions/timelines.js +++ b/app/javascript/flavours/glitch/actions/timelines.js @@ -2,7 +2,7 @@ import { importFetchedStatus, importFetchedStatuses } from './importer'; import { submitMarkers } from './markers'; import api, { getLinks } from 'flavours/glitch/api'; import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; -import compareId from 'flavours/glitch/utils/compare_id'; +import compareId from 'flavours/glitch/compare_id'; import { me, usePendingItems as preferPendingItems } from 'flavours/glitch/initial_state'; import { toServerSideType } from 'flavours/glitch/utils/filters'; diff --git a/app/javascript/flavours/glitch/utils/base_polyfills.js b/app/javascript/flavours/glitch/base_polyfills.js similarity index 94% rename from app/javascript/flavours/glitch/utils/base_polyfills.js rename to app/javascript/flavours/glitch/base_polyfills.js index 4b8123dba..12096d902 100644 --- a/app/javascript/flavours/glitch/utils/base_polyfills.js +++ b/app/javascript/flavours/glitch/base_polyfills.js @@ -5,7 +5,7 @@ import includes from 'array-includes'; import assign from 'object-assign'; import values from 'object.values'; import isNaN from 'is-nan'; -import { decode as decodeBase64 } from './base64'; +import { decode as decodeBase64 } from './utils/base64'; import promiseFinally from 'promise.prototype.finally'; if (!Array.prototype.includes) { diff --git a/app/javascript/flavours/glitch/utils/compare_id.js b/app/javascript/flavours/glitch/compare_id.js similarity index 100% rename from app/javascript/flavours/glitch/utils/compare_id.js rename to app/javascript/flavours/glitch/compare_id.js diff --git a/app/javascript/flavours/glitch/components/column.js b/app/javascript/flavours/glitch/components/column.js index 052939e8a..cf0e6d5e4 100644 --- a/app/javascript/flavours/glitch/components/column.js +++ b/app/javascript/flavours/glitch/components/column.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { supportsPassiveEvents } from 'detect-passive-events'; -import { scrollTop } from 'flavours/glitch/utils/scroll'; +import { scrollTop } from '../scroll'; export default class Column extends React.PureComponent { diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js index 4bcc1ff10..5414b4858 100644 --- a/app/javascript/flavours/glitch/components/media_gallery.js +++ b/app/javascript/flavours/glitch/components/media_gallery.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { is } from 'immutable'; import IconButton from './icon_button'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { isIOS } from 'flavours/glitch/utils/is_mobile'; +import { isIOS } from '../is_mobile'; import classNames from 'classnames'; import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state'; import { debounce } from 'lodash'; diff --git a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js index 6b02a56ad..b2dff63db 100644 --- a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js +++ b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js @@ -2,7 +2,7 @@ import { openDropdownMenu, closeDropdownMenu } from 'flavours/glitch/actions/dro import { openModal, closeModal } from 'flavours/glitch/actions/modal'; import { connect } from 'react-redux'; import DropdownMenu from 'flavours/glitch/components/dropdown_menu'; -import { isUserTouching } from 'flavours/glitch/utils/is_mobile'; +import { isUserTouching } from '../is_mobile'; const mapStateToProps = state => ({ dropdownPlacement: state.getIn(['dropdown_menu', 'placement']), diff --git a/app/javascript/flavours/glitch/utils/extra_polyfills.js b/app/javascript/flavours/glitch/extra_polyfills.js similarity index 100% rename from app/javascript/flavours/glitch/utils/extra_polyfills.js rename to app/javascript/flavours/glitch/extra_polyfills.js diff --git a/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js b/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js index 7e75d7dfe..a16ee4806 100644 --- a/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js +++ b/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js @@ -2,7 +2,7 @@ import Blurhash from 'flavours/glitch/components/blurhash'; import classNames from 'classnames'; import Icon from 'flavours/glitch/components/icon'; import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state'; -import { isIOS } from 'flavours/glitch/utils/is_mobile'; +import { isIOS } from 'flavours/glitch/is_mobile'; import PropTypes from 'prop-types'; import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; diff --git a/app/javascript/flavours/glitch/features/compose/components/compose_form.js b/app/javascript/flavours/glitch/features/compose/components/compose_form.js index 3a9fa01e1..44dd2693a 100644 --- a/app/javascript/flavours/glitch/features/compose/components/compose_form.js +++ b/app/javascript/flavours/glitch/features/compose/components/compose_form.js @@ -9,7 +9,7 @@ import EmojiPicker from 'flavours/glitch/features/emoji_picker'; import PollFormContainer from '../containers/poll_form_container'; import UploadFormContainer from '../containers/upload_form_container'; import WarningContainer from '../containers/warning_container'; -import { isMobile } from 'flavours/glitch/utils/is_mobile'; +import { isMobile } from 'flavours/glitch/is_mobile'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { countableText } from '../util/counter'; import OptionsContainer from '../containers/options_container'; diff --git a/app/javascript/flavours/glitch/features/compose/components/dropdown.js b/app/javascript/flavours/glitch/features/compose/components/dropdown.js index b072317b7..829f6d00f 100644 --- a/app/javascript/flavours/glitch/features/compose/components/dropdown.js +++ b/app/javascript/flavours/glitch/features/compose/components/dropdown.js @@ -9,7 +9,7 @@ import IconButton from 'flavours/glitch/components/icon_button'; import DropdownMenu from './dropdown_menu'; // Utils. -import { isUserTouching } from 'flavours/glitch/utils/is_mobile'; +import { isUserTouching } from 'flavours/glitch/is_mobile'; import { assignHandlers } from 'flavours/glitch/utils/react_helpers'; // The component. diff --git a/app/javascript/flavours/glitch/features/compose/components/upload.js b/app/javascript/flavours/glitch/features/compose/components/upload.js index b926c455d..ade6f0437 100644 --- a/app/javascript/flavours/glitch/features/compose/components/upload.js +++ b/app/javascript/flavours/glitch/features/compose/components/upload.js @@ -6,7 +6,7 @@ import spring from 'react-motion/lib/spring'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } from 'react-intl'; import Icon from 'flavours/glitch/components/icon'; -import { isUserTouching } from 'flavours/glitch/utils/is_mobile'; +import { isUserTouching } from 'flavours/glitch/is_mobile'; export default class Upload extends ImmutablePureComponent { diff --git a/app/javascript/flavours/glitch/features/notifications/index.js b/app/javascript/flavours/glitch/features/notifications/index.js index 3c221732e..26eeba168 100644 --- a/app/javascript/flavours/glitch/features/notifications/index.js +++ b/app/javascript/flavours/glitch/features/notifications/index.js @@ -26,7 +26,7 @@ import { debounce } from 'lodash'; import ScrollableList from 'flavours/glitch/components/scrollable_list'; import LoadGap from 'flavours/glitch/components/load_gap'; import Icon from 'flavours/glitch/components/icon'; -import compareId from 'flavours/glitch/utils/compare_id'; +import compareId from 'flavours/glitch/compare_id'; import NotificationsPermissionBanner from './components/notifications_permission_banner'; import NotSignedInIndicator from 'flavours/glitch/components/not_signed_in_indicator'; import { Helmet } from 'react-helmet'; diff --git a/app/javascript/flavours/glitch/features/ui/components/column.js b/app/javascript/flavours/glitch/features/ui/components/column.js index c97f98420..e9c1e2f87 100644 --- a/app/javascript/flavours/glitch/features/ui/components/column.js +++ b/app/javascript/flavours/glitch/features/ui/components/column.js @@ -2,8 +2,8 @@ import React from 'react'; import ColumnHeader from './column_header'; import PropTypes from 'prop-types'; import { debounce } from 'lodash'; -import { scrollTop } from 'flavours/glitch/utils/scroll'; -import { isMobile } from 'flavours/glitch/utils/is_mobile'; +import { scrollTop } from 'flavours/glitch/scroll'; +import { isMobile } from 'flavours/glitch/is_mobile'; export default class Column extends React.PureComponent { diff --git a/app/javascript/flavours/glitch/features/ui/components/columns_area.js b/app/javascript/flavours/glitch/features/ui/components/columns_area.js index b38fe4b17..718b4a27f 100644 --- a/app/javascript/flavours/glitch/features/ui/components/columns_area.js +++ b/app/javascript/flavours/glitch/features/ui/components/columns_area.js @@ -32,7 +32,7 @@ import ComposePanel from './compose_panel'; import NavigationPanel from './navigation_panel'; import { supportsPassiveEvents } from 'detect-passive-events'; -import { scrollRight } from 'flavours/glitch/utils/scroll'; +import { scrollRight } from 'flavours/glitch/scroll'; const componentMap = { 'COMPOSE': Compose, diff --git a/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js b/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js index cc4b70293..9c82fc91d 100644 --- a/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js +++ b/app/javascript/flavours/glitch/features/ui/components/tabs_bar.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { NavLink, withRouter } from 'react-router-dom'; import { FormattedMessage, injectIntl } from 'react-intl'; import { debounce } from 'lodash'; -import { isUserTouching } from 'flavours/glitch/utils/is_mobile'; +import { isUserTouching } from 'flavours/glitch/is_mobile'; import Icon from 'flavours/glitch/components/icon'; import NotificationsCounterIcon from './notifications_counter_icon'; diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index 3c679d394..c8cc905e7 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -5,7 +5,7 @@ import LoadingBarContainer from './containers/loading_bar_container'; import ModalContainer from './containers/modal_container'; import { connect } from 'react-redux'; import { Redirect, withRouter } from 'react-router-dom'; -import { layoutFromWindow } from 'flavours/glitch/utils/is_mobile'; +import { layoutFromWindow } from 'flavours/glitch/is_mobile'; import { debounce } from 'lodash'; import { uploadCompose, resetCompose, changeComposeSpoilerness } from 'flavours/glitch/actions/compose'; import { expandHomeTimeline } from 'flavours/glitch/actions/timelines'; diff --git a/app/javascript/flavours/glitch/utils/is_mobile.js b/app/javascript/flavours/glitch/is_mobile.js similarity index 100% rename from app/javascript/flavours/glitch/utils/is_mobile.js rename to app/javascript/flavours/glitch/is_mobile.js diff --git a/app/javascript/flavours/glitch/utils/load_keyboard_extensions.js b/app/javascript/flavours/glitch/load_keyboard_extensions.js similarity index 100% rename from app/javascript/flavours/glitch/utils/load_keyboard_extensions.js rename to app/javascript/flavours/glitch/load_keyboard_extensions.js diff --git a/app/javascript/flavours/glitch/utils/load_polyfills.js b/app/javascript/flavours/glitch/load_polyfills.js similarity index 100% rename from app/javascript/flavours/glitch/utils/load_polyfills.js rename to app/javascript/flavours/glitch/load_polyfills.js diff --git a/app/javascript/flavours/glitch/utils/main.js b/app/javascript/flavours/glitch/main.js similarity index 96% rename from app/javascript/flavours/glitch/utils/main.js rename to app/javascript/flavours/glitch/main.js index 39a46db00..04efcd43f 100644 --- a/app/javascript/flavours/glitch/utils/main.js +++ b/app/javascript/flavours/glitch/main.js @@ -4,7 +4,7 @@ import { setupBrowserNotifications } from 'flavours/glitch/actions/notifications import Mastodon, { store } from 'flavours/glitch/containers/mastodon'; import ready from 'flavours/glitch/ready'; -const perf = require('flavours/glitch/utils/performance'); +const perf = require('flavours/glitch/performance'); /** * @returns {Promise} diff --git a/app/javascript/flavours/glitch/packs/about.js b/app/javascript/flavours/glitch/packs/about.js index 50e789946..ef17fdea4 100644 --- a/app/javascript/flavours/glitch/packs/about.js +++ b/app/javascript/flavours/glitch/packs/about.js @@ -1,5 +1,5 @@ import 'packs/public-path'; -import loadPolyfills from 'flavours/glitch/utils/load_polyfills'; +import loadPolyfills from 'flavours/glitch/load_polyfills'; function loaded() { const TimelineContainer = require('flavours/glitch/containers/timeline_container').default; diff --git a/app/javascript/flavours/glitch/packs/home.js b/app/javascript/flavours/glitch/packs/home.js index 0311df9b2..ace9dc3c4 100644 --- a/app/javascript/flavours/glitch/packs/home.js +++ b/app/javascript/flavours/glitch/packs/home.js @@ -1,8 +1,8 @@ import 'packs/public-path'; -import loadPolyfills from 'flavours/glitch/utils/load_polyfills'; +import loadPolyfills from 'flavours/glitch/load_polyfills'; loadPolyfills().then(async () => { - const { default: main } = await import('flavours/glitch/utils/main'); + const { default: main } = await import('flavours/glitch/main'); return main(); }).catch(e => { diff --git a/app/javascript/flavours/glitch/packs/public.js b/app/javascript/flavours/glitch/packs/public.js index d920acc00..4b5b7343e 100644 --- a/app/javascript/flavours/glitch/packs/public.js +++ b/app/javascript/flavours/glitch/packs/public.js @@ -1,7 +1,7 @@ import 'packs/public-path'; -import loadPolyfills from 'flavours/glitch/utils/load_polyfills'; +import loadPolyfills from 'flavours/glitch/load_polyfills'; import ready from 'flavours/glitch/ready'; -import loadKeyboardExtensions from 'flavours/glitch/utils/load_keyboard_extensions'; +import loadKeyboardExtensions from 'flavours/glitch/load_keyboard_extensions'; function main() { const IntlMessageFormat = require('intl-messageformat').default; diff --git a/app/javascript/flavours/glitch/packs/settings.js b/app/javascript/flavours/glitch/packs/settings.js index 80f53bc78..4c85f6556 100644 --- a/app/javascript/flavours/glitch/packs/settings.js +++ b/app/javascript/flavours/glitch/packs/settings.js @@ -1,7 +1,7 @@ import 'packs/public-path'; -import loadPolyfills from 'flavours/glitch/utils/load_polyfills'; +import loadPolyfills from 'flavours/glitch/load_polyfills'; import ready from 'flavours/glitch/ready'; -import loadKeyboardExtensions from 'flavours/glitch/utils/load_keyboard_extensions'; +import loadKeyboardExtensions from 'flavours/glitch/load_keyboard_extensions'; import 'cocoon-js-vanilla'; function main() { diff --git a/app/javascript/flavours/glitch/packs/share.js b/app/javascript/flavours/glitch/packs/share.js index 49c8545e7..e5a79849a 100644 --- a/app/javascript/flavours/glitch/packs/share.js +++ b/app/javascript/flavours/glitch/packs/share.js @@ -1,5 +1,5 @@ import 'packs/public-path'; -import loadPolyfills from 'flavours/glitch/utils/load_polyfills'; +import loadPolyfills from 'flavours/glitch/load_polyfills'; function loaded() { const ComposeContainer = require('flavours/glitch/containers/compose_container').default; diff --git a/app/javascript/flavours/glitch/utils/performance.js b/app/javascript/flavours/glitch/performance.js similarity index 100% rename from app/javascript/flavours/glitch/utils/performance.js rename to app/javascript/flavours/glitch/performance.js diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index d0bc46002..035e9f564 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -53,7 +53,7 @@ import { TIMELINE_DELETE } from 'flavours/glitch/actions/timelines'; import { STORE_HYDRATE } from 'flavours/glitch/actions/store'; import { REDRAFT } from 'flavours/glitch/actions/statuses'; import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable'; -import uuid from 'flavours/glitch/utils/uuid'; +import uuid from '../uuid'; import { privacyPreference } from 'flavours/glitch/utils/privacy_preference'; import { me, defaultContentType } from 'flavours/glitch/initial_state'; import { overwrite } from 'flavours/glitch/utils/js_helpers'; diff --git a/app/javascript/flavours/glitch/reducers/contexts.js b/app/javascript/flavours/glitch/reducers/contexts.js index 5dec090da..a0fcc4158 100644 --- a/app/javascript/flavours/glitch/reducers/contexts.js +++ b/app/javascript/flavours/glitch/reducers/contexts.js @@ -5,7 +5,7 @@ import { import { CONTEXT_FETCH_SUCCESS } from 'flavours/glitch/actions/statuses'; import { TIMELINE_DELETE, TIMELINE_UPDATE } from 'flavours/glitch/actions/timelines'; import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; -import compareId from 'flavours/glitch/utils/compare_id'; +import compareId from '../compare_id'; const initialState = ImmutableMap({ inReplyTos: ImmutableMap(), diff --git a/app/javascript/flavours/glitch/reducers/conversations.js b/app/javascript/flavours/glitch/reducers/conversations.js index 4e8db82a9..4407dcf04 100644 --- a/app/javascript/flavours/glitch/reducers/conversations.js +++ b/app/javascript/flavours/glitch/reducers/conversations.js @@ -11,7 +11,7 @@ import { } from '../actions/conversations'; import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'flavours/glitch/actions/accounts'; import { DOMAIN_BLOCK_SUCCESS } from 'flavours/glitch/actions/domain_blocks'; -import compareId from 'flavours/glitch/utils/compare_id'; +import compareId from '../compare_id'; const initialState = ImmutableMap({ items: ImmutableList(), diff --git a/app/javascript/flavours/glitch/reducers/meta.js b/app/javascript/flavours/glitch/reducers/meta.js index 7af7e9514..b1482777a 100644 --- a/app/javascript/flavours/glitch/reducers/meta.js +++ b/app/javascript/flavours/glitch/reducers/meta.js @@ -1,7 +1,7 @@ import { STORE_HYDRATE } from 'flavours/glitch/actions/store'; import { APP_LAYOUT_CHANGE } from 'flavours/glitch/actions/app'; import { Map as ImmutableMap } from 'immutable'; -import { layoutFromWindow } from 'flavours/glitch/utils/is_mobile'; +import { layoutFromWindow } from 'flavours/glitch/is_mobile'; const initialState = ImmutableMap({ streaming_api_base_url: null, diff --git a/app/javascript/flavours/glitch/reducers/notifications.js b/app/javascript/flavours/glitch/reducers/notifications.js index d2eda9ab8..1b593b128 100644 --- a/app/javascript/flavours/glitch/reducers/notifications.js +++ b/app/javascript/flavours/glitch/reducers/notifications.js @@ -32,7 +32,7 @@ import { import { DOMAIN_BLOCK_SUCCESS } from 'flavours/glitch/actions/domain_blocks'; import { TIMELINE_DELETE, TIMELINE_DISCONNECT } from 'flavours/glitch/actions/timelines'; import { fromJS, Map as ImmutableMap, List as ImmutableList } from 'immutable'; -import compareId from 'flavours/glitch/utils/compare_id'; +import compareId from '../compare_id'; const initialState = ImmutableMap({ pendingItems: ImmutableList(), diff --git a/app/javascript/flavours/glitch/reducers/settings.js b/app/javascript/flavours/glitch/reducers/settings.js index 90e50479f..82927f7cd 100644 --- a/app/javascript/flavours/glitch/reducers/settings.js +++ b/app/javascript/flavours/glitch/reducers/settings.js @@ -6,7 +6,7 @@ import { EMOJI_USE } from 'flavours/glitch/actions/emojis'; import { LANGUAGE_USE } from 'flavours/glitch/actions/languages'; import { LIST_DELETE_SUCCESS, LIST_FETCH_FAIL } from '../actions/lists'; import { Map as ImmutableMap, fromJS } from 'immutable'; -import uuid from 'flavours/glitch/utils/uuid'; +import uuid from '../uuid'; const initialState = ImmutableMap({ saved: true, diff --git a/app/javascript/flavours/glitch/reducers/timelines.js b/app/javascript/flavours/glitch/reducers/timelines.js index 2586c837b..407293c62 100644 --- a/app/javascript/flavours/glitch/reducers/timelines.js +++ b/app/javascript/flavours/glitch/reducers/timelines.js @@ -17,7 +17,7 @@ import { ACCOUNT_UNFOLLOW_SUCCESS, } from 'flavours/glitch/actions/accounts'; import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable'; -import compareId from 'flavours/glitch/utils/compare_id'; +import compareId from '../compare_id'; const initialState = ImmutableMap(); diff --git a/app/javascript/flavours/glitch/utils/scroll.js b/app/javascript/flavours/glitch/scroll.js similarity index 100% rename from app/javascript/flavours/glitch/utils/scroll.js rename to app/javascript/flavours/glitch/scroll.js diff --git a/app/javascript/flavours/glitch/utils/settings.js b/app/javascript/flavours/glitch/settings.js similarity index 100% rename from app/javascript/flavours/glitch/utils/settings.js rename to app/javascript/flavours/glitch/settings.js diff --git a/app/javascript/flavours/glitch/utils/stream.js b/app/javascript/flavours/glitch/stream.js similarity index 100% rename from app/javascript/flavours/glitch/utils/stream.js rename to app/javascript/flavours/glitch/stream.js diff --git a/app/javascript/flavours/glitch/utils/uuid.js b/app/javascript/flavours/glitch/uuid.js similarity index 100% rename from app/javascript/flavours/glitch/utils/uuid.js rename to app/javascript/flavours/glitch/uuid.js