From d3879c07b1b2140bd19433ae06855894228bd90f Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 11 Oct 2022 10:41:15 +0200 Subject: [PATCH] Rename flavours/glitch/util into flavours/glitch/utils --- app/javascript/flavours/glitch/actions/compose.js | 8 ++++---- .../flavours/glitch/actions/importer/normalizer.js | 6 +++--- app/javascript/flavours/glitch/actions/markers.js | 2 +- .../flavours/glitch/actions/notifications.js | 6 +++--- .../glitch/actions/push_notifications/registerer.js | 2 +- app/javascript/flavours/glitch/actions/streaming.js | 2 +- app/javascript/flavours/glitch/actions/timelines.js | 4 ++-- .../flavours/glitch/components/admin/Dimension.js | 2 +- .../flavours/glitch/components/admin/Retention.js | 2 +- .../flavours/glitch/components/autosuggest_emoji.js | 4 ++-- app/javascript/flavours/glitch/components/column.js | 2 +- .../flavours/glitch/components/dropdown_menu.js | 2 +- .../flavours/glitch/components/error_boundary.js | 2 +- .../flavours/glitch/components/icon_button.js | 2 +- .../glitch/components/intersection_observer_article.js | 4 ++-- app/javascript/flavours/glitch/components/link.js | 2 +- .../flavours/glitch/components/media_attachments.js | 2 +- .../flavours/glitch/components/media_gallery.js | 2 +- app/javascript/flavours/glitch/components/poll.js | 4 ++-- .../flavours/glitch/components/scrollable_list.js | 4 ++-- .../flavours/glitch/components/short_number.js | 4 ++-- app/javascript/flavours/glitch/components/status.js | 4 ++-- .../flavours/glitch/components/status_action_bar.js | 2 +- .../flavours/glitch/components/status_content.js | 2 +- .../glitch/containers/dropdown_menu_container.js | 2 +- .../flavours/glitch/containers/media_container.js | 2 +- .../flavours/glitch/containers/status_container.js | 2 +- .../glitch/features/account/components/action_bar.js | 2 +- .../glitch/features/account/components/header.js | 2 +- .../features/account_gallery/components/media_item.js | 2 +- .../glitch/features/compose/components/compose_form.js | 4 ++-- .../glitch/features/compose/components/dropdown.js | 4 ++-- .../features/compose/components/dropdown_menu.js | 6 +++--- .../glitch/features/compose/components/header.js | 4 ++-- .../features/compose/components/language_dropdown.js | 4 ++-- .../features/compose/components/navigation_bar.js | 2 +- .../glitch/features/compose/components/options.js | 2 +- .../glitch/features/compose/components/search.js | 4 ++-- .../glitch/features/compose/components/upload.js | 4 ++-- .../features/compose/components/upload_progress.js | 2 +- .../glitch/features/compose/components/warning.js | 2 +- .../compose/containers/compose_form_container.js | 2 +- .../features/compose/containers/header_container.js | 2 +- .../features/compose/containers/warning_container.js | 2 +- .../flavours/glitch/features/compose/index.js | 2 +- .../flavours/glitch/features/emoji_picker/index.js | 6 +++--- .../glitch/features/filters/added_to_filter.js | 2 +- .../flavours/glitch/features/filters/select_filter.js | 4 ++-- .../getting_started/components/announcements.js | 4 ++-- .../flavours/glitch/features/getting_started/index.js | 2 +- .../flavours/glitch/features/list_editor/index.js | 2 +- .../glitch/features/local_settings/navigation/index.js | 2 +- .../glitch/features/local_settings/page/index.js | 2 +- .../flavours/glitch/features/notifications/index.js | 2 +- .../glitch/features/pinned_accounts_editor/index.js | 2 +- .../glitch/features/status/components/action_bar.js | 2 +- .../flavours/glitch/features/status/components/card.js | 2 +- .../features/status/components/detailed_status.js | 2 +- .../flavours/glitch/features/status/index.js | 4 ++-- .../flavours/glitch/features/ui/components/column.js | 4 ++-- .../glitch/features/ui/components/columns_area.js | 4 ++-- .../features/ui/components/compare_history_modal.js | 2 +- .../ui/components/deprecated_settings_modal.js | 2 +- .../glitch/features/ui/components/focal_point_modal.js | 4 ++-- .../glitch/features/ui/components/link_footer.js | 4 ++-- .../glitch/features/ui/components/modal_root.js | 4 ++-- .../glitch/features/ui/components/navigation_panel.js | 2 +- .../flavours/glitch/features/ui/components/tabs_bar.js | 2 +- .../glitch/features/ui/components/upload_area.js | 2 +- app/javascript/flavours/glitch/features/ui/index.js | 6 +++--- app/javascript/flavours/glitch/features/video/index.js | 2 +- app/javascript/flavours/glitch/packs/about.js | 4 ++-- app/javascript/flavours/glitch/packs/admin.js | 2 +- app/javascript/flavours/glitch/packs/error.js | 2 +- app/javascript/flavours/glitch/packs/home.js | 4 ++-- app/javascript/flavours/glitch/packs/public.js | 8 ++++---- app/javascript/flavours/glitch/packs/settings.js | 6 +++--- app/javascript/flavours/glitch/packs/share.js | 4 ++-- app/javascript/flavours/glitch/reducers/compose.js | 10 +++++----- app/javascript/flavours/glitch/reducers/contexts.js | 2 +- .../flavours/glitch/reducers/conversations.js | 2 +- .../flavours/glitch/reducers/custom_emojis.js | 4 ++-- app/javascript/flavours/glitch/reducers/meta.js | 2 +- .../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/selectors/index.js | 2 +- .../glitch/{util => utils}/async-components.js | 2 +- .../flavours/glitch/{util => utils}/backend_links.js | 0 .../flavours/glitch/{util => utils}/base64.js | 0 .../flavours/glitch/{util => utils}/base_polyfills.js | 0 .../flavours/glitch/{util => utils}/compare_id.js | 0 .../flavours/glitch/{util => utils}/config.js | 0 .../flavours/glitch/{util => utils}/content_warning.js | 0 .../flavours/glitch/{util => utils}/counter.js | 0 .../flavours/glitch/{util => utils}/dom_helpers.js | 0 .../glitch/{util => utils}/emoji/emoji_compressed.js | 0 .../glitch/{util => utils}/emoji/emoji_map.json | 0 .../{util => utils}/emoji/emoji_mart_data_light.js | 0 .../{util => utils}/emoji/emoji_mart_search_light.js | 0 .../glitch/{util => utils}/emoji/emoji_picker.js | 0 .../emoji/emoji_unicode_mapping_light.js | 0 .../glitch/{util => utils}/emoji/emoji_utils.js | 0 .../flavours/glitch/{util => utils}/emoji/index.js | 2 +- .../{util => utils}/emoji/unicode_to_filename.js | 0 .../{util => utils}/emoji/unicode_to_unified_name.js | 0 .../flavours/glitch/{util => utils}/extra_polyfills.js | 0 .../flavours/glitch/{util => utils}/filters.js | 0 .../flavours/glitch/{util => utils}/fullscreen.js | 0 .../glitch/{util => utils}/get_rect_from_entry.js | 0 .../flavours/glitch/{util => utils}/hashtag.js | 0 app/javascript/flavours/glitch/{util => utils}/html.js | 0 .../flavours/glitch/{util => utils}/icons.js | 0 app/javascript/flavours/glitch/{util => utils}/idna.js | 0 .../{util => utils}/intersection_observer_wrapper.js | 0 .../flavours/glitch/{util => utils}/is_mobile.js | 0 .../flavours/glitch/{util => utils}/js_helpers.js | 0 .../glitch/{util => utils}/load_keyboard_extensions.js | 0 .../flavours/glitch/{util => utils}/load_polyfills.js | 0 .../flavours/glitch/{util => utils}/log_out.js | 2 +- app/javascript/flavours/glitch/{util => utils}/main.js | 4 ++-- .../flavours/glitch/{util => utils}/notifications.js | 0 .../flavours/glitch/{util => utils}/numbers.js | 0 .../flavours/glitch/{util => utils}/optional_motion.js | 0 .../flavours/glitch/{util => utils}/performance.js | 0 .../glitch/{util => utils}/privacy_preference.js | 0 .../flavours/glitch/{util => utils}/react_helpers.js | 0 .../glitch/{util => utils}/react_router_helpers.js | 0 .../flavours/glitch/{util => utils}/ready.js | 0 .../flavours/glitch/{util => utils}/reduced_motion.js | 0 .../flavours/glitch/{util => utils}/redux_helpers.js | 0 .../flavours/glitch/{util => utils}/resize_image.js | 0 .../glitch/{util => utils}/schedule_idle_task.js | 0 .../flavours/glitch/{util => utils}/scroll.js | 0 .../flavours/glitch/{util => utils}/scrollbar.js | 0 .../flavours/glitch/{util => utils}/settings.js | 0 .../flavours/glitch/{util => utils}/stream.js | 0 .../flavours/glitch/{util => utils}/url_regex.js | 0 app/javascript/flavours/glitch/{util => utils}/uuid.js | 0 139 files changed, 139 insertions(+), 139 deletions(-) rename app/javascript/flavours/glitch/{util => utils}/async-components.js (99%) rename app/javascript/flavours/glitch/{util => utils}/backend_links.js (100%) rename app/javascript/flavours/glitch/{util => utils}/base64.js (100%) rename app/javascript/flavours/glitch/{util => utils}/base_polyfills.js (100%) rename app/javascript/flavours/glitch/{util => utils}/compare_id.js (100%) rename app/javascript/flavours/glitch/{util => utils}/config.js (100%) rename app/javascript/flavours/glitch/{util => utils}/content_warning.js (100%) rename app/javascript/flavours/glitch/{util => utils}/counter.js (100%) rename app/javascript/flavours/glitch/{util => utils}/dom_helpers.js (100%) rename app/javascript/flavours/glitch/{util => utils}/emoji/emoji_compressed.js (100%) rename app/javascript/flavours/glitch/{util => utils}/emoji/emoji_map.json (100%) rename app/javascript/flavours/glitch/{util => utils}/emoji/emoji_mart_data_light.js (100%) rename app/javascript/flavours/glitch/{util => utils}/emoji/emoji_mart_search_light.js (100%) rename app/javascript/flavours/glitch/{util => utils}/emoji/emoji_picker.js (100%) rename app/javascript/flavours/glitch/{util => utils}/emoji/emoji_unicode_mapping_light.js (100%) rename app/javascript/flavours/glitch/{util => utils}/emoji/emoji_utils.js (100%) rename app/javascript/flavours/glitch/{util => utils}/emoji/index.js (98%) rename app/javascript/flavours/glitch/{util => utils}/emoji/unicode_to_filename.js (100%) rename app/javascript/flavours/glitch/{util => utils}/emoji/unicode_to_unified_name.js (100%) rename app/javascript/flavours/glitch/{util => utils}/extra_polyfills.js (100%) rename app/javascript/flavours/glitch/{util => utils}/filters.js (100%) rename app/javascript/flavours/glitch/{util => utils}/fullscreen.js (100%) rename app/javascript/flavours/glitch/{util => utils}/get_rect_from_entry.js (100%) rename app/javascript/flavours/glitch/{util => utils}/hashtag.js (100%) rename app/javascript/flavours/glitch/{util => utils}/html.js (100%) rename app/javascript/flavours/glitch/{util => utils}/icons.js (100%) rename app/javascript/flavours/glitch/{util => utils}/idna.js (100%) rename app/javascript/flavours/glitch/{util => utils}/intersection_observer_wrapper.js (100%) rename app/javascript/flavours/glitch/{util => utils}/is_mobile.js (100%) rename app/javascript/flavours/glitch/{util => utils}/js_helpers.js (100%) rename app/javascript/flavours/glitch/{util => utils}/load_keyboard_extensions.js (100%) rename app/javascript/flavours/glitch/{util => utils}/load_polyfills.js (100%) rename app/javascript/flavours/glitch/{util => utils}/log_out.js (93%) rename app/javascript/flavours/glitch/{util => utils}/main.js (93%) rename app/javascript/flavours/glitch/{util => utils}/notifications.js (100%) rename app/javascript/flavours/glitch/{util => utils}/numbers.js (100%) rename app/javascript/flavours/glitch/{util => utils}/optional_motion.js (100%) rename app/javascript/flavours/glitch/{util => utils}/performance.js (100%) rename app/javascript/flavours/glitch/{util => utils}/privacy_preference.js (100%) rename app/javascript/flavours/glitch/{util => utils}/react_helpers.js (100%) rename app/javascript/flavours/glitch/{util => utils}/react_router_helpers.js (100%) rename app/javascript/flavours/glitch/{util => utils}/ready.js (100%) rename app/javascript/flavours/glitch/{util => utils}/reduced_motion.js (100%) rename app/javascript/flavours/glitch/{util => utils}/redux_helpers.js (100%) rename app/javascript/flavours/glitch/{util => utils}/resize_image.js (100%) rename app/javascript/flavours/glitch/{util => utils}/schedule_idle_task.js (100%) rename app/javascript/flavours/glitch/{util => utils}/scroll.js (100%) rename app/javascript/flavours/glitch/{util => utils}/scrollbar.js (100%) rename app/javascript/flavours/glitch/{util => utils}/settings.js (100%) rename app/javascript/flavours/glitch/{util => utils}/stream.js (100%) rename app/javascript/flavours/glitch/{util => utils}/url_regex.js (100%) rename app/javascript/flavours/glitch/{util => utils}/uuid.js (100%) diff --git a/app/javascript/flavours/glitch/actions/compose.js b/app/javascript/flavours/glitch/actions/compose.js index b34ac6253d..2f2fea590c 100644 --- a/app/javascript/flavours/glitch/actions/compose.js +++ b/app/javascript/flavours/glitch/actions/compose.js @@ -1,11 +1,11 @@ import api from '../api'; import { CancelToken, isCancel } from 'axios'; import { throttle } from 'lodash'; -import { search as emojiSearch } from 'flavours/glitch/util/emoji/emoji_mart_search_light'; +import { search as emojiSearch } from 'flavours/glitch/utils/emoji/emoji_mart_search_light'; import { useEmoji } from './emojis'; -import { tagHistory } from 'flavours/glitch/util/settings'; -import { recoverHashtags } from 'flavours/glitch/util/hashtag'; -import resizeImage from 'flavours/glitch/util/resize_image'; +import { tagHistory } from 'flavours/glitch/utils/settings'; +import { recoverHashtags } from 'flavours/glitch/utils/hashtag'; +import resizeImage from 'flavours/glitch/utils/resize_image'; import { importFetchedAccounts } from './importer'; import { updateTimeline } from './timelines'; import { showAlertForError } from './alerts'; diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js index 9950a720bd..bf1e129a26 100644 --- a/app/javascript/flavours/glitch/actions/importer/normalizer.js +++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js @@ -1,7 +1,7 @@ import escapeTextContentForBrowser from 'escape-html'; -import emojify from 'flavours/glitch/util/emoji'; -import { unescapeHTML } from 'flavours/glitch/util/html'; -import { autoHideCW } from 'flavours/glitch/util/content_warning'; +import emojify from 'flavours/glitch/utils/emoji'; +import { unescapeHTML } from 'flavours/glitch/utils/html'; +import { autoHideCW } from 'flavours/glitch/utils/content_warning'; const domParser = new DOMParser(); diff --git a/app/javascript/flavours/glitch/actions/markers.js b/app/javascript/flavours/glitch/actions/markers.js index 943052c0d8..66ae193163 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/util/compare_id'; +import compareId from 'flavours/glitch/utils/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 a2deb02106..343d759085 100644 --- a/app/javascript/flavours/glitch/actions/notifications.js +++ b/app/javascript/flavours/glitch/actions/notifications.js @@ -11,10 +11,10 @@ import { submitMarkers } from './markers'; import { saveSettings } from './settings'; import { defineMessages } from 'react-intl'; import { List as ImmutableList } from 'immutable'; -import { unescapeHTML } from 'flavours/glitch/util/html'; +import { unescapeHTML } from 'flavours/glitch/utils/html'; import { usePendingItems as preferPendingItems } from 'flavours/glitch/initial_state'; -import compareId from 'flavours/glitch/util/compare_id'; -import { requestNotificationPermission } from 'flavours/glitch/util/notifications'; +import compareId from 'flavours/glitch/utils/compare_id'; +import { requestNotificationPermission } from 'flavours/glitch/utils/notifications'; export const NOTIFICATIONS_UPDATE = 'NOTIFICATIONS_UPDATE'; export const NOTIFICATIONS_UPDATE_NOOP = 'NOTIFICATIONS_UPDATE_NOOP'; diff --git a/app/javascript/flavours/glitch/actions/push_notifications/registerer.js b/app/javascript/flavours/glitch/actions/push_notifications/registerer.js index a7ad576904..d55e91fd4d 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/util/settings'; +import { pushNotificationsSetting } from 'flavours/glitch/utils/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 375728cb5a..e41f5cf46f 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/util/stream'; +import { connectStream } from 'flavours/glitch/utils/stream'; import { updateTimeline, deleteFromTimelines, diff --git a/app/javascript/flavours/glitch/actions/timelines.js b/app/javascript/flavours/glitch/actions/timelines.js index 402e3ce40f..f812babbd1 100644 --- a/app/javascript/flavours/glitch/actions/timelines.js +++ b/app/javascript/flavours/glitch/actions/timelines.js @@ -2,9 +2,9 @@ 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/util/compare_id'; +import compareId from 'flavours/glitch/utils/compare_id'; import { me, usePendingItems as preferPendingItems } from 'flavours/glitch/initial_state'; -import { toServerSideType } from 'flavours/glitch/util/filters'; +import { toServerSideType } from 'flavours/glitch/utils/filters'; export const TIMELINE_UPDATE = 'TIMELINE_UPDATE'; export const TIMELINE_DELETE = 'TIMELINE_DELETE'; diff --git a/app/javascript/flavours/glitch/components/admin/Dimension.js b/app/javascript/flavours/glitch/components/admin/Dimension.js index c2cef4e16b..3dac8c6c24 100644 --- a/app/javascript/flavours/glitch/components/admin/Dimension.js +++ b/app/javascript/flavours/glitch/components/admin/Dimension.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import api from 'flavours/glitch/api'; import { FormattedNumber } from 'react-intl'; -import { roundTo10 } from 'flavours/glitch/util/numbers'; +import { roundTo10 } from 'flavours/glitch/utils/numbers'; import Skeleton from 'flavours/glitch/components/skeleton'; export default class Dimension extends React.PureComponent { diff --git a/app/javascript/flavours/glitch/components/admin/Retention.js b/app/javascript/flavours/glitch/components/admin/Retention.js index 8ffc9a9be4..9cc39040b9 100644 --- a/app/javascript/flavours/glitch/components/admin/Retention.js +++ b/app/javascript/flavours/glitch/components/admin/Retention.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import api from 'flavours/glitch/api'; import { FormattedMessage, FormattedNumber, FormattedDate } from 'react-intl'; import classNames from 'classnames'; -import { roundTo10 } from 'flavours/glitch/util/numbers'; +import { roundTo10 } from 'flavours/glitch/utils/numbers'; const dateForCohort = cohort => { switch(cohort.frequency) { diff --git a/app/javascript/flavours/glitch/components/autosuggest_emoji.js b/app/javascript/flavours/glitch/components/autosuggest_emoji.js index d04c1eb687..dd756544bf 100644 --- a/app/javascript/flavours/glitch/components/autosuggest_emoji.js +++ b/app/javascript/flavours/glitch/components/autosuggest_emoji.js @@ -1,8 +1,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import unicodeMapping from 'flavours/glitch/util/emoji/emoji_unicode_mapping_light'; +import unicodeMapping from 'flavours/glitch/utils/emoji/emoji_unicode_mapping_light'; -import { assetHost } from 'flavours/glitch/util/config'; +import { assetHost } from 'flavours/glitch/utils/config'; export default class AutosuggestEmoji extends React.PureComponent { diff --git a/app/javascript/flavours/glitch/components/column.js b/app/javascript/flavours/glitch/components/column.js index c9da7d329e..052939e8a0 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/util/scroll'; +import { scrollTop } from 'flavours/glitch/utils/scroll'; export default class Column extends React.PureComponent { diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.js b/app/javascript/flavours/glitch/components/dropdown_menu.js index e04af8074b..33385bc5f5 100644 --- a/app/javascript/flavours/glitch/components/dropdown_menu.js +++ b/app/javascript/flavours/glitch/components/dropdown_menu.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import IconButton from './icon_button'; import Overlay from 'react-overlays/lib/Overlay'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import spring from 'react-motion/lib/spring'; import { supportsPassiveEvents } from 'detect-passive-events'; import classNames from 'classnames'; diff --git a/app/javascript/flavours/glitch/components/error_boundary.js b/app/javascript/flavours/glitch/components/error_boundary.js index e80b6f6540..fd3659de7a 100644 --- a/app/javascript/flavours/glitch/components/error_boundary.js +++ b/app/javascript/flavours/glitch/components/error_boundary.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { source_url } from 'flavours/glitch/initial_state'; -import { preferencesLink } from 'flavours/glitch/util/backend_links'; +import { preferencesLink } from 'flavours/glitch/utils/backend_links'; import StackTrace from 'stacktrace-js'; export default class ErrorBoundary extends React.PureComponent { diff --git a/app/javascript/flavours/glitch/components/icon_button.js b/app/javascript/flavours/glitch/components/icon_button.js index c0664ec890..0ff5a60bd5 100644 --- a/app/javascript/flavours/glitch/components/icon_button.js +++ b/app/javascript/flavours/glitch/components/icon_button.js @@ -1,5 +1,5 @@ import React from 'react'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import spring from 'react-motion/lib/spring'; import PropTypes from 'prop-types'; import classNames from 'classnames'; diff --git a/app/javascript/flavours/glitch/components/intersection_observer_article.js b/app/javascript/flavours/glitch/components/intersection_observer_article.js index 88f29892e8..aaf8170d92 100644 --- a/app/javascript/flavours/glitch/components/intersection_observer_article.js +++ b/app/javascript/flavours/glitch/components/intersection_observer_article.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import scheduleIdleTask from 'flavours/glitch/util/schedule_idle_task'; -import getRectFromEntry from 'flavours/glitch/util/get_rect_from_entry'; +import scheduleIdleTask from 'flavours/glitch/utils/schedule_idle_task'; +import getRectFromEntry from 'flavours/glitch/utils/get_rect_from_entry'; // Diff these props in the "unrendered" state const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'cachedHeight']; diff --git a/app/javascript/flavours/glitch/components/link.js b/app/javascript/flavours/glitch/components/link.js index de99f7d42b..bbec121a86 100644 --- a/app/javascript/flavours/glitch/components/link.js +++ b/app/javascript/flavours/glitch/components/link.js @@ -7,7 +7,7 @@ import PropTypes from 'prop-types'; import React from 'react'; // Utils. -import { assignHandlers } from 'flavours/glitch/util/react_helpers'; +import { assignHandlers } from 'flavours/glitch/utils/react_helpers'; // Handlers. const handlers = { diff --git a/app/javascript/flavours/glitch/components/media_attachments.js b/app/javascript/flavours/glitch/components/media_attachments.js index c8d133f09d..dec2624358 100644 --- a/app/javascript/flavours/glitch/components/media_attachments.js +++ b/app/javascript/flavours/glitch/components/media_attachments.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { MediaGallery, Video, Audio } from 'flavours/glitch/util/async-components'; +import { MediaGallery, Video, Audio } from 'flavours/glitch/utils/async-components'; import Bundle from 'flavours/glitch/features/ui/components/bundle'; import noop from 'lodash/noop'; diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js index ee05681f8f..4bcc1ff10d 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/util/is_mobile'; +import { isIOS } from 'flavours/glitch/utils/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/components/poll.js b/app/javascript/flavours/glitch/components/poll.js index bcd9fe3418..593bf13563 100644 --- a/app/javascript/flavours/glitch/components/poll.js +++ b/app/javascript/flavours/glitch/components/poll.js @@ -4,10 +4,10 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import classNames from 'classnames'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import spring from 'react-motion/lib/spring'; import escapeTextContentForBrowser from 'escape-html'; -import emojify from 'flavours/glitch/util/emoji'; +import emojify from 'flavours/glitch/utils/emoji'; import RelativeTimestamp from './relative_timestamp'; import Icon from 'flavours/glitch/components/icon'; diff --git a/app/javascript/flavours/glitch/components/scrollable_list.js b/app/javascript/flavours/glitch/components/scrollable_list.js index 50bfacc6ad..ddf83ef7f6 100644 --- a/app/javascript/flavours/glitch/components/scrollable_list.js +++ b/app/javascript/flavours/glitch/components/scrollable_list.js @@ -4,11 +4,11 @@ import PropTypes from 'prop-types'; import IntersectionObserverArticleContainer from 'flavours/glitch/containers/intersection_observer_article_container'; import LoadMore from './load_more'; import LoadPending from './load_pending'; -import IntersectionObserverWrapper from 'flavours/glitch/util/intersection_observer_wrapper'; +import IntersectionObserverWrapper from 'flavours/glitch/utils/intersection_observer_wrapper'; import { throttle } from 'lodash'; import { List as ImmutableList } from 'immutable'; import classNames from 'classnames'; -import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from 'flavours/glitch/util/fullscreen'; +import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from 'flavours/glitch/utils/fullscreen'; import LoadingIndicator from './loading_indicator'; import { connect } from 'react-redux'; diff --git a/app/javascript/flavours/glitch/components/short_number.js b/app/javascript/flavours/glitch/components/short_number.js index e4ba09634c..535c17727d 100644 --- a/app/javascript/flavours/glitch/components/short_number.js +++ b/app/javascript/flavours/glitch/components/short_number.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { toShortNumber, pluralReady, DECIMAL_UNITS } from '../util/numbers'; +import { toShortNumber, pluralReady, DECIMAL_UNITS } from '../utils/numbers'; import { FormattedMessage, FormattedNumber } from 'react-intl'; // @ts-check @@ -56,7 +56,7 @@ ShortNumber.propTypes = { /** * @typedef {object} ShortNumberCounterProps - * @property {import('../util/number').ShortNumber} value Short number + * @property {import('../utils/number').ShortNumber} value Short number */ /** diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index f1bd49e15b..9748f27468 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -10,11 +10,11 @@ import AttachmentList from './attachment_list'; import Card from '../features/status/components/card'; import { injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { MediaGallery, Video, Audio } from 'flavours/glitch/util/async-components'; +import { MediaGallery, Video, Audio } from 'flavours/glitch/utils/async-components'; import { HotKeys } from 'react-hotkeys'; import NotificationOverlayContainer from 'flavours/glitch/features/notifications/containers/overlay_container'; import classNames from 'classnames'; -import { autoUnfoldCW } from 'flavours/glitch/util/content_warning'; +import { autoUnfoldCW } from 'flavours/glitch/utils/content_warning'; import PollContainer from 'flavours/glitch/containers/poll_container'; import { displayMedia } from 'flavours/glitch/initial_state'; import PictureInPicturePlaceholder from 'flavours/glitch/components/picture_in_picture_placeholder'; diff --git a/app/javascript/flavours/glitch/components/status_action_bar.js b/app/javascript/flavours/glitch/components/status_action_bar.js index f3afc141bd..deb9cfc150 100644 --- a/app/javascript/flavours/glitch/components/status_action_bar.js +++ b/app/javascript/flavours/glitch/components/status_action_bar.js @@ -7,7 +7,7 @@ import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { me } from 'flavours/glitch/initial_state'; import RelativeTimestamp from './relative_timestamp'; -import { accountAdminLink, statusAdminLink } from 'flavours/glitch/util/backend_links'; +import { accountAdminLink, statusAdminLink } from 'flavours/glitch/utils/backend_links'; import classNames from 'classnames'; import { PERMISSION_MANAGE_USERS } from 'flavours/glitch/permissions'; diff --git a/app/javascript/flavours/glitch/components/status_content.js b/app/javascript/flavours/glitch/components/status_content.js index c1d64a99c1..fe0d4c0439 100644 --- a/app/javascript/flavours/glitch/components/status_content.js +++ b/app/javascript/flavours/glitch/components/status_content.js @@ -6,7 +6,7 @@ import Permalink from './permalink'; import classnames from 'classnames'; import Icon from 'flavours/glitch/components/icon'; import { autoPlayGif } from 'flavours/glitch/initial_state'; -import { decode as decodeIDNA } from 'flavours/glitch/util/idna'; +import { decode as decodeIDNA } from 'flavours/glitch/utils/idna'; const textMatchesTarget = (text, origin, host) => { return (text === origin || text === host diff --git a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js index 0c4a2b50ff..6b02a56ada 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/util/is_mobile'; +import { isUserTouching } from 'flavours/glitch/utils/is_mobile'; const mapStateToProps = state => ({ dropdownPlacement: state.getIn(['dropdown_menu', 'placement']), diff --git a/app/javascript/flavours/glitch/containers/media_container.js b/app/javascript/flavours/glitch/containers/media_container.js index 11c15d7c6f..f1e8534aad 100644 --- a/app/javascript/flavours/glitch/containers/media_container.js +++ b/app/javascript/flavours/glitch/containers/media_container.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { IntlProvider, addLocaleData } from 'react-intl'; import { fromJS } from 'immutable'; import { getLocale } from 'mastodon/locales'; -import { getScrollbarWidth } from 'flavours/glitch/util/scrollbar'; +import { getScrollbarWidth } from 'flavours/glitch/utils/scrollbar'; import MediaGallery from 'flavours/glitch/components/media_gallery'; import Poll from 'flavours/glitch/components/poll'; import { ImmutableHashtag as Hashtag } from 'flavours/glitch/components/hashtag'; diff --git a/app/javascript/flavours/glitch/containers/status_container.js b/app/javascript/flavours/glitch/containers/status_container.js index 8c32c436e7..c12b2e6143 100644 --- a/app/javascript/flavours/glitch/containers/status_container.js +++ b/app/javascript/flavours/glitch/containers/status_container.js @@ -37,7 +37,7 @@ import { deployPictureInPicture } from 'flavours/glitch/actions/picture_in_pictu import { changeLocalSetting } from 'flavours/glitch/actions/local_settings'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { boostModal, favouriteModal, deleteModal } from 'flavours/glitch/initial_state'; -import { filterEditLink } from 'flavours/glitch/util/backend_links'; +import { filterEditLink } from 'flavours/glitch/utils/backend_links'; import { showAlertForError } from '../actions/alerts'; import AccountContainer from 'flavours/glitch/containers/account_container'; import Spoilers from '../components/spoilers'; diff --git a/app/javascript/flavours/glitch/features/account/components/action_bar.js b/app/javascript/flavours/glitch/features/account/components/action_bar.js index 0f07ea2c20..ce05841241 100644 --- a/app/javascript/flavours/glitch/features/account/components/action_bar.js +++ b/app/javascript/flavours/glitch/features/account/components/action_bar.js @@ -5,7 +5,7 @@ import DropdownMenuContainer from 'flavours/glitch/containers/dropdown_menu_cont import { NavLink } from 'react-router-dom'; import { injectIntl, FormattedMessage, FormattedNumber } from 'react-intl'; import { me, isStaff } from 'flavours/glitch/initial_state'; -import { profileLink, accountAdminLink } from 'flavours/glitch/util/backend_links'; +import { profileLink, accountAdminLink } from 'flavours/glitch/utils/backend_links'; import Icon from 'flavours/glitch/components/icon'; export default @injectIntl diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index ffaa44ba61..0f0e40268f 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { autoPlayGif, me, title, domain } from 'flavours/glitch/initial_state'; -import { preferencesLink, profileLink, accountAdminLink } from 'flavours/glitch/util/backend_links'; +import { preferencesLink, profileLink, accountAdminLink } from 'flavours/glitch/utils/backend_links'; import classNames from 'classnames'; import Icon from 'flavours/glitch/components/icon'; import IconButton from 'flavours/glitch/components/icon_button'; 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 e3ed47fcc2..7e75d7dfe5 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/util/is_mobile'; +import { isIOS } from 'flavours/glitch/utils/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 76113beac1..4fc8f08847 100644 --- a/app/javascript/flavours/glitch/features/compose/components/compose_form.js +++ b/app/javascript/flavours/glitch/features/compose/components/compose_form.js @@ -9,9 +9,9 @@ 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/util/is_mobile'; +import { isMobile } from 'flavours/glitch/utils/is_mobile'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { countableText } from 'flavours/glitch/util/counter'; +import { countableText } from 'flavours/glitch/utils/counter'; import OptionsContainer from '../containers/options_container'; import Publisher from './publisher'; import TextareaIcons from './textarea_icons'; diff --git a/app/javascript/flavours/glitch/features/compose/components/dropdown.js b/app/javascript/flavours/glitch/features/compose/components/dropdown.js index 9f70d6b794..b072317b73 100644 --- a/app/javascript/flavours/glitch/features/compose/components/dropdown.js +++ b/app/javascript/flavours/glitch/features/compose/components/dropdown.js @@ -9,8 +9,8 @@ import IconButton from 'flavours/glitch/components/icon_button'; import DropdownMenu from './dropdown_menu'; // Utils. -import { isUserTouching } from 'flavours/glitch/util/is_mobile'; -import { assignHandlers } from 'flavours/glitch/util/react_helpers'; +import { isUserTouching } from 'flavours/glitch/utils/is_mobile'; +import { assignHandlers } from 'flavours/glitch/utils/react_helpers'; // The component. export default class ComposerOptionsDropdown extends React.PureComponent { diff --git a/app/javascript/flavours/glitch/features/compose/components/dropdown_menu.js b/app/javascript/flavours/glitch/features/compose/components/dropdown_menu.js index 0649fe1caa..0cab9a8a88 100644 --- a/app/javascript/flavours/glitch/features/compose/components/dropdown_menu.js +++ b/app/javascript/flavours/glitch/features/compose/components/dropdown_menu.js @@ -9,9 +9,9 @@ import classNames from 'classnames'; import Icon from 'flavours/glitch/components/icon'; // Utils. -import { withPassive } from 'flavours/glitch/util/dom_helpers'; -import Motion from 'flavours/glitch/util/optional_motion'; -import { assignHandlers } from 'flavours/glitch/util/react_helpers'; +import { withPassive } from 'flavours/glitch/utils/dom_helpers'; +import Motion from 'flavours/glitch/utils/optional_motion'; +import { assignHandlers } from 'flavours/glitch/utils/react_helpers'; // The spring to use with our motion. const springMotion = spring(1, { diff --git a/app/javascript/flavours/glitch/features/compose/components/header.js b/app/javascript/flavours/glitch/features/compose/components/header.js index 95add2027d..7ecb573aba 100644 --- a/app/javascript/flavours/glitch/features/compose/components/header.js +++ b/app/javascript/flavours/glitch/features/compose/components/header.js @@ -10,8 +10,8 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import Icon from 'flavours/glitch/components/icon'; // Utils. -import { conditionalRender } from 'flavours/glitch/util/react_helpers'; -import { signOutLink } from 'flavours/glitch/util/backend_links'; +import { conditionalRender } from 'flavours/glitch/utils/react_helpers'; +import { signOutLink } from 'flavours/glitch/utils/backend_links'; // Messages. const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/features/compose/components/language_dropdown.js b/app/javascript/flavours/glitch/features/compose/components/language_dropdown.js index a512101082..563a9d687e 100644 --- a/app/javascript/flavours/glitch/features/compose/components/language_dropdown.js +++ b/app/javascript/flavours/glitch/features/compose/components/language_dropdown.js @@ -3,12 +3,12 @@ import PropTypes from 'prop-types'; import { injectIntl, defineMessages } from 'react-intl'; import TextIconButton from './text_icon_button'; import Overlay from 'react-overlays/lib/Overlay'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import spring from 'react-motion/lib/spring'; import { supportsPassiveEvents } from 'detect-passive-events'; import classNames from 'classnames'; import { languages as preloadedLanguages } from 'flavours/glitch/initial_state'; -import { loupeIcon, deleteIcon } from 'flavours/glitch/util/icons'; +import { loupeIcon, deleteIcon } from 'flavours/glitch/utils/icons'; import fuzzysort from 'fuzzysort'; const messages = defineMessages({ diff --git a/app/javascript/flavours/glitch/features/compose/components/navigation_bar.js b/app/javascript/flavours/glitch/features/compose/components/navigation_bar.js index 595ca55122..ba73ed553a 100644 --- a/app/javascript/flavours/glitch/features/compose/components/navigation_bar.js +++ b/app/javascript/flavours/glitch/features/compose/components/navigation_bar.js @@ -4,7 +4,7 @@ import Avatar from 'flavours/glitch/components/avatar'; import Permalink from 'flavours/glitch/components/permalink'; import { FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { profileLink } from 'flavours/glitch/util/backend_links'; +import { profileLink } from 'flavours/glitch/utils/backend_links'; export default class NavigationBar extends ImmutablePureComponent { diff --git a/app/javascript/flavours/glitch/features/compose/components/options.js b/app/javascript/flavours/glitch/features/compose/components/options.js index 0170ac49e1..b885ae5b0e 100644 --- a/app/javascript/flavours/glitch/features/compose/components/options.js +++ b/app/javascript/flavours/glitch/features/compose/components/options.js @@ -16,7 +16,7 @@ import LanguageDropdown from '../containers/language_dropdown_container'; import ImmutablePureComponent from 'react-immutable-pure-component'; // Utils. -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import { pollLimits } from 'flavours/glitch/initial_state'; // Messages. diff --git a/app/javascript/flavours/glitch/features/compose/components/search.js b/app/javascript/flavours/glitch/features/compose/components/search.js index 827305ccdd..148e432601 100644 --- a/app/javascript/flavours/glitch/features/compose/components/search.js +++ b/app/javascript/flavours/glitch/features/compose/components/search.js @@ -15,9 +15,9 @@ import Overlay from 'react-overlays/lib/Overlay'; import Icon from 'flavours/glitch/components/icon'; // Utils. -import { focusRoot } from 'flavours/glitch/util/dom_helpers'; +import { focusRoot } from 'flavours/glitch/utils/dom_helpers'; import { searchEnabled } from 'flavours/glitch/initial_state'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; const messages = defineMessages({ placeholder: { id: 'search.placeholder', defaultMessage: 'Search' }, diff --git a/app/javascript/flavours/glitch/features/compose/components/upload.js b/app/javascript/flavours/glitch/features/compose/components/upload.js index 963b95c87b..b344dece1c 100644 --- a/app/javascript/flavours/glitch/features/compose/components/upload.js +++ b/app/javascript/flavours/glitch/features/compose/components/upload.js @@ -1,12 +1,12 @@ import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; 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/util/is_mobile'; +import { isUserTouching } from 'flavours/glitch/utils/is_mobile'; export default class Upload extends ImmutablePureComponent { diff --git a/app/javascript/flavours/glitch/features/compose/components/upload_progress.js b/app/javascript/flavours/glitch/features/compose/components/upload_progress.js index 493bb9ca53..b5126bd4e1 100644 --- a/app/javascript/flavours/glitch/features/compose/components/upload_progress.js +++ b/app/javascript/flavours/glitch/features/compose/components/upload_progress.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import spring from 'react-motion/lib/spring'; import Icon from 'flavours/glitch/components/icon'; diff --git a/app/javascript/flavours/glitch/features/compose/components/warning.js b/app/javascript/flavours/glitch/features/compose/components/warning.js index 6ee3640bc5..3bcf9a7f75 100644 --- a/app/javascript/flavours/glitch/features/compose/components/warning.js +++ b/app/javascript/flavours/glitch/features/compose/components/warning.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import spring from 'react-motion/lib/spring'; export default class Warning extends React.PureComponent { 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 a037bbbcc9..d12c98c01d 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 @@ -18,7 +18,7 @@ import { } from 'flavours/glitch/actions/modal'; import { changeLocalSetting } from 'flavours/glitch/actions/local_settings'; -import { privacyPreference } from 'flavours/glitch/util/privacy_preference'; +import { privacyPreference } from 'flavours/glitch/utils/privacy_preference'; const messages = defineMessages({ missingDescriptionMessage: { id: 'confirmations.missing_media_description.message', diff --git a/app/javascript/flavours/glitch/features/compose/containers/header_container.js b/app/javascript/flavours/glitch/features/compose/containers/header_container.js index 2f0da48c86..e1ce19fb08 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/header_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/header_container.js @@ -2,7 +2,7 @@ import { openModal } from 'flavours/glitch/actions/modal'; import { connect } from 'react-redux'; import { defineMessages, injectIntl } from 'react-intl'; import Header from '../components/header'; -import { logOut } from 'flavours/glitch/util/log_out'; +import { logOut } from 'flavours/glitch/utils/log_out'; const messages = defineMessages({ logoutMessage: { id: 'confirmations.logout.message', defaultMessage: 'Are you sure you want to log out?' }, diff --git a/app/javascript/flavours/glitch/features/compose/containers/warning_container.js b/app/javascript/flavours/glitch/features/compose/containers/warning_container.js index d440407dc2..b2ed40b82f 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/warning_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/warning_container.js @@ -4,7 +4,7 @@ import Warning from '../components/warning'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { me } from 'flavours/glitch/initial_state'; -import { profileLink, termsLink } from 'flavours/glitch/util/backend_links'; +import { profileLink, termsLink } from 'flavours/glitch/utils/backend_links'; const buildHashtagRE = () => { try { diff --git a/app/javascript/flavours/glitch/features/compose/index.js b/app/javascript/flavours/glitch/features/compose/index.js index 10b66cd95d..7c723b0485 100644 --- a/app/javascript/flavours/glitch/features/compose/index.js +++ b/app/javascript/flavours/glitch/features/compose/index.js @@ -8,7 +8,7 @@ import { mountCompose, unmountCompose } from 'flavours/glitch/actions/compose'; import { injectIntl, defineMessages } from 'react-intl'; import classNames from 'classnames'; import SearchContainer from './containers/search_container'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import spring from 'react-motion/lib/spring'; import SearchResultsContainer from './containers/search_results_container'; import { me, mascot } from 'flavours/glitch/initial_state'; diff --git a/app/javascript/flavours/glitch/features/emoji_picker/index.js b/app/javascript/flavours/glitch/features/emoji_picker/index.js index e54fa20072..bf58441f34 100644 --- a/app/javascript/flavours/glitch/features/emoji_picker/index.js +++ b/app/javascript/flavours/glitch/features/emoji_picker/index.js @@ -6,14 +6,14 @@ import { useEmoji } from 'flavours/glitch/actions/emojis'; import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { EmojiPicker as EmojiPickerAsync } from 'flavours/glitch/util/async-components'; +import { EmojiPicker as EmojiPickerAsync } from 'flavours/glitch/utils/async-components'; import Overlay from 'react-overlays/lib/Overlay'; import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { supportsPassiveEvents } from 'detect-passive-events'; -import { buildCustomEmojis, categoriesFromEmojis } from 'flavours/glitch/util/emoji'; +import { buildCustomEmojis, categoriesFromEmojis } from 'flavours/glitch/utils/emoji'; import { useSystemEmojiFont } from 'flavours/glitch/initial_state'; -import { assetHost } from 'flavours/glitch/util/config'; +import { assetHost } from 'flavours/glitch/utils/config'; const messages = defineMessages({ emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' }, diff --git a/app/javascript/flavours/glitch/features/filters/added_to_filter.js b/app/javascript/flavours/glitch/features/filters/added_to_filter.js index f777ca429e..becb170cd2 100644 --- a/app/javascript/flavours/glitch/features/filters/added_to_filter.js +++ b/app/javascript/flavours/glitch/features/filters/added_to_filter.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage } from 'react-intl'; -import { toServerSideType } from 'flavours/glitch/util/filters'; +import { toServerSideType } from 'flavours/glitch/utils/filters'; import Button from 'flavours/glitch/components/button'; import { connect } from 'react-redux'; diff --git a/app/javascript/flavours/glitch/features/filters/select_filter.js b/app/javascript/flavours/glitch/features/filters/select_filter.js index 5321dbb960..5391766c91 100644 --- a/app/javascript/flavours/glitch/features/filters/select_filter.js +++ b/app/javascript/flavours/glitch/features/filters/select_filter.js @@ -2,8 +2,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { toServerSideType } from 'flavours/glitch/util/filters'; -import { loupeIcon, deleteIcon } from 'flavours/glitch/util/icons'; +import { toServerSideType } from 'flavours/glitch/utils/filters'; +import { loupeIcon, deleteIcon } from 'flavours/glitch/utils/icons'; import Icon from 'flavours/glitch/components/icon'; import fuzzysort from 'fuzzysort'; diff --git a/app/javascript/flavours/glitch/features/getting_started/components/announcements.js b/app/javascript/flavours/glitch/features/getting_started/components/announcements.js index a58282dad4..b2b9af2186 100644 --- a/app/javascript/flavours/glitch/features/getting_started/components/announcements.js +++ b/app/javascript/flavours/glitch/features/getting_started/components/announcements.js @@ -9,13 +9,13 @@ import { defineMessages, injectIntl, FormattedMessage, FormattedDate } from 'rea import { autoPlayGif, reduceMotion, disableSwiping } from 'flavours/glitch/initial_state'; import elephantUIPlane from 'mastodon/../images/elephant_ui_plane.svg'; import { mascot } from 'flavours/glitch/initial_state'; -import unicodeMapping from 'flavours/glitch/util/emoji/emoji_unicode_mapping_light'; +import unicodeMapping from 'flavours/glitch/utils/emoji/emoji_unicode_mapping_light'; import classNames from 'classnames'; import EmojiPickerDropdown from 'flavours/glitch/features/emoji_picker'; import AnimatedNumber from 'flavours/glitch/components/animated_number'; import TransitionMotion from 'react-motion/lib/TransitionMotion'; import spring from 'react-motion/lib/spring'; -import { assetHost } from 'flavours/glitch/util/config'; +import { assetHost } from 'flavours/glitch/utils/config'; const messages = defineMessages({ close: { id: 'lightbox.close', defaultMessage: 'Close' }, diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index 41ba074ef4..f52b769a33 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -13,7 +13,7 @@ import { fetchFollowRequests } from 'flavours/glitch/actions/accounts'; import { List as ImmutableList } from 'immutable'; import { createSelector } from 'reselect'; import { fetchLists } from 'flavours/glitch/actions/lists'; -import { preferencesLink } from 'flavours/glitch/util/backend_links'; +import { preferencesLink } from 'flavours/glitch/utils/backend_links'; import NavigationBar from '../compose/components/navigation_bar'; import LinkFooter from 'flavours/glitch/features/ui/components/link_footer'; import TrendsContainer from './containers/trends_container'; diff --git a/app/javascript/flavours/glitch/features/list_editor/index.js b/app/javascript/flavours/glitch/features/list_editor/index.js index 75b0de3d37..505b07cfc0 100644 --- a/app/javascript/flavours/glitch/features/list_editor/index.js +++ b/app/javascript/flavours/glitch/features/list_editor/index.js @@ -8,7 +8,7 @@ import { setupListEditor, clearListSuggestions, resetListEditor } from 'flavours import AccountContainer from './containers/account_container'; import SearchContainer from './containers/search_container'; import EditListForm from './components/edit_list_form'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import spring from 'react-motion/lib/spring'; const mapStateToProps = state => ({ diff --git a/app/javascript/flavours/glitch/features/local_settings/navigation/index.js b/app/javascript/flavours/glitch/features/local_settings/navigation/index.js index d085a606c3..e618a981e8 100644 --- a/app/javascript/flavours/glitch/features/local_settings/navigation/index.js +++ b/app/javascript/flavours/glitch/features/local_settings/navigation/index.js @@ -5,7 +5,7 @@ import { injectIntl, defineMessages } from 'react-intl'; // Our imports import LocalSettingsNavigationItem from './item'; -import { preferencesLink } from 'flavours/glitch/util/backend_links'; +import { preferencesLink } from 'flavours/glitch/utils/backend_links'; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/app/javascript/flavours/glitch/features/local_settings/page/index.js b/app/javascript/flavours/glitch/features/local_settings/page/index.js index 96111abe82..e154fe1c81 100644 --- a/app/javascript/flavours/glitch/features/local_settings/page/index.js +++ b/app/javascript/flavours/glitch/features/local_settings/page/index.js @@ -6,7 +6,7 @@ import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; // Our imports import { expandSpoilers, disableSwiping } from 'flavours/glitch/initial_state'; -import { preferenceLink } from 'flavours/glitch/util/backend_links'; +import { preferenceLink } from 'flavours/glitch/utils/backend_links'; import LocalSettingsPageItem from './item'; import DeprecatedLocalSettingsPageItem from './deprecated_item'; diff --git a/app/javascript/flavours/glitch/features/notifications/index.js b/app/javascript/flavours/glitch/features/notifications/index.js index 76972ecea2..3c221732e9 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/util/compare_id'; +import compareId from 'flavours/glitch/utils/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/pinned_accounts_editor/index.js b/app/javascript/flavours/glitch/features/pinned_accounts_editor/index.js index 5f03c7e93c..30fc0b6f9c 100644 --- a/app/javascript/flavours/glitch/features/pinned_accounts_editor/index.js +++ b/app/javascript/flavours/glitch/features/pinned_accounts_editor/index.js @@ -7,7 +7,7 @@ import { injectIntl, FormattedMessage } from 'react-intl'; import { fetchPinnedAccounts, clearPinnedAccountsSuggestions, resetPinnedAccountsEditor } from 'flavours/glitch/actions/accounts'; import AccountContainer from './containers/account_container'; import SearchContainer from './containers/search_container'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import spring from 'react-motion/lib/spring'; const mapStateToProps = state => ({ diff --git a/app/javascript/flavours/glitch/features/status/components/action_bar.js b/app/javascript/flavours/glitch/features/status/components/action_bar.js index 6387911e97..9868621fe5 100644 --- a/app/javascript/flavours/glitch/features/status/components/action_bar.js +++ b/app/javascript/flavours/glitch/features/status/components/action_bar.js @@ -5,7 +5,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import DropdownMenuContainer from 'flavours/glitch/containers/dropdown_menu_container'; import { defineMessages, injectIntl } from 'react-intl'; import { me } from 'flavours/glitch/initial_state'; -import { accountAdminLink, statusAdminLink } from 'flavours/glitch/util/backend_links'; +import { accountAdminLink, statusAdminLink } from 'flavours/glitch/utils/backend_links'; import classNames from 'classnames'; import { PERMISSION_MANAGE_USERS } from 'flavours/glitch/permissions'; diff --git a/app/javascript/flavours/glitch/features/status/components/card.js b/app/javascript/flavours/glitch/features/status/components/card.js index 0149cd21e0..2d2e49eb8e 100644 --- a/app/javascript/flavours/glitch/features/status/components/card.js +++ b/app/javascript/flavours/glitch/features/status/components/card.js @@ -5,7 +5,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage } from 'react-intl'; import punycode from 'punycode'; import classnames from 'classnames'; -import { decode as decodeIDNA } from 'flavours/glitch/util/idna'; +import { decode as decodeIDNA } from 'flavours/glitch/utils/idna'; import Icon from 'flavours/glitch/components/icon'; import { useBlurhash } from 'flavours/glitch/initial_state'; import Blurhash from 'flavours/glitch/components/blurhash'; diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.js b/app/javascript/flavours/glitch/features/status/components/detailed_status.js index 91dc5ba208..ec03e6ba0c 100644 --- a/app/javascript/flavours/glitch/features/status/components/detailed_status.js +++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.js @@ -13,7 +13,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import Video from 'flavours/glitch/features/video'; import Audio from 'flavours/glitch/features/audio'; import VisibilityIcon from 'flavours/glitch/components/status_visibility_icon'; -import scheduleIdleTask from 'flavours/glitch/util/schedule_idle_task'; +import scheduleIdleTask from 'flavours/glitch/utils/schedule_idle_task'; import classNames from 'classnames'; import PollContainer from 'flavours/glitch/containers/poll_container'; import Icon from 'flavours/glitch/components/icon'; diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js index 4d8a8a361b..5ce2aab024 100644 --- a/app/javascript/flavours/glitch/features/status/index.js +++ b/app/javascript/flavours/glitch/features/status/index.js @@ -48,8 +48,8 @@ import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { HotKeys } from 'react-hotkeys'; import { boostModal, favouriteModal, deleteModal, title } from 'flavours/glitch/initial_state'; -import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from 'flavours/glitch/util/fullscreen'; -import { autoUnfoldCW } from 'flavours/glitch/util/content_warning'; +import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from 'flavours/glitch/utils/fullscreen'; +import { autoUnfoldCW } from 'flavours/glitch/utils/content_warning'; import { textForScreenReader, defaultMediaVisibility } from 'flavours/glitch/components/status'; import Icon from 'flavours/glitch/components/icon'; 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 9163969315..c97f984209 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/util/scroll'; -import { isMobile } from 'flavours/glitch/util/is_mobile'; +import { scrollTop } from 'flavours/glitch/utils/scroll'; +import { isMobile } from 'flavours/glitch/utils/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 eccaf6f6db..0196f691ad 100644 --- a/app/javascript/flavours/glitch/features/ui/components/columns_area.js +++ b/app/javascript/flavours/glitch/features/ui/components/columns_area.js @@ -26,13 +26,13 @@ import { BookmarkedStatuses, ListTimeline, Directory, -} from 'flavours/glitch/util/async-components'; +} from 'flavours/glitch/utils/async-components'; import Icon from 'flavours/glitch/components/icon'; import ComposePanel from './compose_panel'; import NavigationPanel from './navigation_panel'; import { supportsPassiveEvents } from 'detect-passive-events'; -import { scrollRight } from 'flavours/glitch/util/scroll'; +import { scrollRight } from 'flavours/glitch/utils/scroll'; const componentMap = { 'COMPOSE': Compose, diff --git a/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js b/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js index 8fd528da0c..4b1fb1d141 100644 --- a/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js @@ -4,7 +4,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { FormattedMessage } from 'react-intl'; import { closeModal } from 'flavours/glitch/actions/modal'; -import emojify from 'flavours/glitch/util/emoji'; +import emojify from 'flavours/glitch/utils/emoji'; import escapeTextContentForBrowser from 'escape-html'; import InlineAccount from 'flavours/glitch/components/inline_account'; import IconButton from 'flavours/glitch/components/icon_button'; diff --git a/app/javascript/flavours/glitch/features/ui/components/deprecated_settings_modal.js b/app/javascript/flavours/glitch/features/ui/components/deprecated_settings_modal.js index 9cb5a30b91..68f04cb21c 100644 --- a/app/javascript/flavours/glitch/features/ui/components/deprecated_settings_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/deprecated_settings_modal.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { preferenceLink } from 'flavours/glitch/util/backend_links'; +import { preferenceLink } from 'flavours/glitch/utils/backend_links'; import Button from 'flavours/glitch/components/button'; import Icon from 'flavours/glitch/components/icon'; import illustration from 'flavours/glitch/images/logo_warn_glitch.svg'; diff --git a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js index 2e36681db1..c31a4822d0 100644 --- a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js @@ -15,14 +15,14 @@ import Textarea from 'react-textarea-autosize'; import UploadProgress from 'flavours/glitch/features/compose/components/upload_progress'; import CharacterCounter from 'flavours/glitch/features/compose/components/character_counter'; import { length } from 'stringz'; -import { Tesseract as fetchTesseract } from 'flavours/glitch/util/async-components'; +import { Tesseract as fetchTesseract } from 'flavours/glitch/utils/async-components'; import GIFV from 'flavours/glitch/components/gifv'; import { me } from 'flavours/glitch/initial_state'; // eslint-disable-next-line import/no-extraneous-dependencies import tesseractCorePath from 'tesseract.js-core/tesseract-core.wasm.js'; // eslint-disable-next-line import/extensions import tesseractWorkerPath from 'tesseract.js/dist/worker.min.js'; -import { assetHost } from 'flavours/glitch/util/config'; +import { assetHost } from 'flavours/glitch/utils/config'; const messages = defineMessages({ close: { id: 'lightbox.close', defaultMessage: 'Close' }, diff --git a/app/javascript/flavours/glitch/features/ui/components/link_footer.js b/app/javascript/flavours/glitch/features/ui/components/link_footer.js index a92bc8855d..39576f17b4 100644 --- a/app/javascript/flavours/glitch/features/ui/components/link_footer.js +++ b/app/javascript/flavours/glitch/features/ui/components/link_footer.js @@ -4,8 +4,8 @@ import PropTypes from 'prop-types'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { limitedFederationMode, version, repository, source_url, profile_directory as profileDirectory } from 'flavours/glitch/initial_state'; -import { signOutLink, securityLink, privacyPolicyLink } from 'flavours/glitch/util/backend_links'; -import { logOut } from 'flavours/glitch/util/log_out'; +import { signOutLink, securityLink, privacyPolicyLink } from 'flavours/glitch/utils/backend_links'; +import { logOut } from 'flavours/glitch/utils/log_out'; import { openModal } from 'flavours/glitch/actions/modal'; import { PERMISSION_INVITE_USERS } from 'flavours/glitch/permissions'; diff --git a/app/javascript/flavours/glitch/features/ui/components/modal_root.js b/app/javascript/flavours/glitch/features/ui/components/modal_root.js index 92768caebd..dc612aea27 100644 --- a/app/javascript/flavours/glitch/features/ui/components/modal_root.js +++ b/app/javascript/flavours/glitch/features/ui/components/modal_root.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { getScrollbarWidth } from 'flavours/glitch/util/scrollbar'; +import { getScrollbarWidth } from 'flavours/glitch/utils/scrollbar'; import Base from 'flavours/glitch/components/modal_root'; import BundleContainer from '../containers/bundle_container'; import BundleModalError from './bundle_modal_error'; @@ -29,7 +29,7 @@ import { PinnedAccountsEditor, CompareHistoryModal, FilterModal, -} from 'flavours/glitch/util/async-components'; +} from 'flavours/glitch/utils/async-components'; const MODAL_COMPONENTS = { 'MEDIA': () => Promise.resolve({ default: MediaModal }), diff --git a/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js b/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js index a3bcb3aac0..57fbfb285a 100644 --- a/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js +++ b/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js @@ -4,7 +4,7 @@ import { NavLink, Link } from 'react-router-dom'; import { FormattedMessage } from 'react-intl'; import Icon from 'flavours/glitch/components/icon'; import { showTrends } from 'flavours/glitch/initial_state'; -import { preferencesLink, relationshipsLink } from 'flavours/glitch/util/backend_links'; +import { preferencesLink, relationshipsLink } from 'flavours/glitch/utils/backend_links'; import NotificationsCounterIcon from './notifications_counter_icon'; import FollowRequestsNavLink from './follow_requests_nav_link'; import ListPanel from './list_panel'; 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 0a7078a9c6..cc4b702939 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/util/is_mobile'; +import { isUserTouching } from 'flavours/glitch/utils/is_mobile'; import Icon from 'flavours/glitch/components/icon'; import NotificationsCounterIcon from './notifications_counter_icon'; diff --git a/app/javascript/flavours/glitch/features/ui/components/upload_area.js b/app/javascript/flavours/glitch/features/ui/components/upload_area.js index 11a10baf1d..0f8f4535c0 100644 --- a/app/javascript/flavours/glitch/features/ui/components/upload_area.js +++ b/app/javascript/flavours/glitch/features/ui/components/upload_area.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import Motion from 'flavours/glitch/util/optional_motion'; +import Motion from 'flavours/glitch/utils/optional_motion'; import spring from 'react-motion/lib/spring'; import { FormattedMessage } from 'react-intl'; diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index 7eec201788..f8e868790d 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/util/is_mobile'; +import { layoutFromWindow } from 'flavours/glitch/utils/is_mobile'; import { debounce } from 'lodash'; import { uploadCompose, resetCompose, changeComposeSpoilerness } from 'flavours/glitch/actions/compose'; import { expandHomeTimeline } from 'flavours/glitch/actions/timelines'; @@ -14,7 +14,7 @@ import { fetchServer } from 'flavours/glitch/actions/server'; import { clearHeight } from 'flavours/glitch/actions/height_cache'; import { changeLayout } from 'flavours/glitch/actions/app'; import { synchronouslySubmitMarkers, submitMarkers, fetchMarkers } from 'flavours/glitch/actions/markers'; -import { WrappedSwitch, WrappedRoute } from 'flavours/glitch/util/react_router_helpers'; +import { WrappedSwitch, WrappedRoute } from 'flavours/glitch/utils/react_router_helpers'; import UploadArea from './components/upload_area'; import PermaLink from 'flavours/glitch/components/permalink'; import ColumnsAreaContainer from './containers/columns_area_container'; @@ -52,7 +52,7 @@ import { Directory, Explore, FollowRecommendations, -} from 'flavours/glitch/util/async-components'; +} from 'flavours/glitch/utils/async-components'; import { HotKeys } from 'react-hotkeys'; import { me, title } from 'flavours/glitch/initial_state'; import { closeOnboarding, INTRODUCTION_VERSION } from 'flavours/glitch/actions/onboarding'; diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js index 2964580c6a..0a37cff144 100644 --- a/app/javascript/flavours/glitch/features/video/index.js +++ b/app/javascript/flavours/glitch/features/video/index.js @@ -4,7 +4,7 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { is } from 'immutable'; import { throttle, debounce } from 'lodash'; import classNames from 'classnames'; -import { isFullscreen, requestFullscreen, exitFullscreen } from 'flavours/glitch/util/fullscreen'; +import { isFullscreen, requestFullscreen, exitFullscreen } from 'flavours/glitch/utils/fullscreen'; import { displayMedia, useBlurhash } from 'flavours/glitch/initial_state'; import Icon from 'flavours/glitch/components/icon'; import Blurhash from 'flavours/glitch/components/blurhash'; diff --git a/app/javascript/flavours/glitch/packs/about.js b/app/javascript/flavours/glitch/packs/about.js index 2e2cce501c..87c8220ffa 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/util/load_polyfills'; +import loadPolyfills from 'flavours/glitch/utils/load_polyfills'; function loaded() { const TimelineContainer = require('flavours/glitch/containers/timeline_container').default; @@ -14,7 +14,7 @@ function loaded() { } function main() { - const ready = require('flavours/glitch/util/ready').default; + const ready = require('flavours/glitch/utils/ready').default; ready(loaded); } diff --git a/app/javascript/flavours/glitch/packs/admin.js b/app/javascript/flavours/glitch/packs/admin.js index 4c09ddb05c..a866da742e 100644 --- a/app/javascript/flavours/glitch/packs/admin.js +++ b/app/javascript/flavours/glitch/packs/admin.js @@ -1,5 +1,5 @@ import 'packs/public-path'; -import ready from 'flavours/glitch/util/ready'; +import ready from 'flavours/glitch/utils/ready'; ready(() => { const React = require('react'); diff --git a/app/javascript/flavours/glitch/packs/error.js b/app/javascript/flavours/glitch/packs/error.js index 9f692ad379..424029cae8 100644 --- a/app/javascript/flavours/glitch/packs/error.js +++ b/app/javascript/flavours/glitch/packs/error.js @@ -1,5 +1,5 @@ import 'packs/public-path'; -import ready from 'flavours/glitch/util/ready'; +import ready from 'flavours/glitch/utils/ready'; ready(() => { const image = document.querySelector('img'); diff --git a/app/javascript/flavours/glitch/packs/home.js b/app/javascript/flavours/glitch/packs/home.js index 7c87c515c5..0311df9b2f 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/util/load_polyfills'; +import loadPolyfills from 'flavours/glitch/utils/load_polyfills'; loadPolyfills().then(async () => { - const { default: main } = await import('flavours/glitch/util/main'); + const { default: main } = await import('flavours/glitch/utils/main'); return main(); }).catch(e => { diff --git a/app/javascript/flavours/glitch/packs/public.js b/app/javascript/flavours/glitch/packs/public.js index 84ec9fce74..bf1c5816be 100644 --- a/app/javascript/flavours/glitch/packs/public.js +++ b/app/javascript/flavours/glitch/packs/public.js @@ -1,13 +1,13 @@ import 'packs/public-path'; -import loadPolyfills from 'flavours/glitch/util/load_polyfills'; -import ready from 'flavours/glitch/util/ready'; -import loadKeyboardExtensions from 'flavours/glitch/util/load_keyboard_extensions'; +import loadPolyfills from 'flavours/glitch/utils/load_polyfills'; +import ready from 'flavours/glitch/utils/ready'; +import loadKeyboardExtensions from 'flavours/glitch/utils/load_keyboard_extensions'; function main() { const IntlMessageFormat = require('intl-messageformat').default; const { timeAgoString } = require('flavours/glitch/components/relative_timestamp'); const { delegate } = require('@rails/ujs'); - const emojify = require('flavours/glitch/util/emoji').default; + const emojify = require('flavours/glitch/utils/emoji').default; const { getLocale } = require('locales'); const { messages } = getLocale(); const React = require('react'); diff --git a/app/javascript/flavours/glitch/packs/settings.js b/app/javascript/flavours/glitch/packs/settings.js index de88d4f523..944e74d0a6 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/util/load_polyfills'; -import ready from 'flavours/glitch/util/ready'; -import loadKeyboardExtensions from 'flavours/glitch/util/load_keyboard_extensions'; +import loadPolyfills from 'flavours/glitch/utils/load_polyfills'; +import ready from 'flavours/glitch/utils/ready'; +import loadKeyboardExtensions from 'flavours/glitch/utils/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 f4a97e2015..08fc699bb1 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/util/load_polyfills'; +import loadPolyfills from 'flavours/glitch/utils/load_polyfills'; function loaded() { const ComposeContainer = require('flavours/glitch/containers/compose_container').default; @@ -14,7 +14,7 @@ function loaded() { } function main() { - const ready = require('flavours/glitch/util/ready').default; + const ready = require('flavours/glitch/utils/ready').default; ready(loaded); } diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 4e8a161763..d0bc460023 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -53,12 +53,12 @@ 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/util/uuid'; -import { privacyPreference } from 'flavours/glitch/util/privacy_preference'; +import uuid from 'flavours/glitch/utils/uuid'; +import { privacyPreference } from 'flavours/glitch/utils/privacy_preference'; import { me, defaultContentType } from 'flavours/glitch/initial_state'; -import { overwrite } from 'flavours/glitch/util/js_helpers'; -import { unescapeHTML } from 'flavours/glitch/util/html'; -import { recoverHashtags } from 'flavours/glitch/util/hashtag'; +import { overwrite } from 'flavours/glitch/utils/js_helpers'; +import { unescapeHTML } from 'flavours/glitch/utils/html'; +import { recoverHashtags } from 'flavours/glitch/utils/hashtag'; const totalElefriends = 3; diff --git a/app/javascript/flavours/glitch/reducers/contexts.js b/app/javascript/flavours/glitch/reducers/contexts.js index 73b25fe3f9..5dec090da5 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/util/compare_id'; +import compareId from 'flavours/glitch/utils/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 fba0308bc4..4e8db82a93 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/util/compare_id'; +import compareId from 'flavours/glitch/utils/compare_id'; const initialState = ImmutableMap({ items: ImmutableList(), diff --git a/app/javascript/flavours/glitch/reducers/custom_emojis.js b/app/javascript/flavours/glitch/reducers/custom_emojis.js index 90e3040a43..0f6796e720 100644 --- a/app/javascript/flavours/glitch/reducers/custom_emojis.js +++ b/app/javascript/flavours/glitch/reducers/custom_emojis.js @@ -1,7 +1,7 @@ import { List as ImmutableList, fromJS as ConvertToImmutable } from 'immutable'; import { CUSTOM_EMOJIS_FETCH_SUCCESS } from 'flavours/glitch/actions/custom_emojis'; -import { search as emojiSearch } from 'flavours/glitch/util/emoji/emoji_mart_search_light'; -import { buildCustomEmojis } from 'flavours/glitch/util/emoji'; +import { search as emojiSearch } from 'flavours/glitch/utils/emoji/emoji_mart_search_light'; +import { buildCustomEmojis } from 'flavours/glitch/utils/emoji'; const initialState = ImmutableList([]); diff --git a/app/javascript/flavours/glitch/reducers/meta.js b/app/javascript/flavours/glitch/reducers/meta.js index 0364ec2890..7af7e95148 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/util/is_mobile'; +import { layoutFromWindow } from 'flavours/glitch/utils/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 51d7886d7a..d2eda9ab80 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/util/compare_id'; +import compareId from 'flavours/glitch/utils/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 1d99441a19..90e50479f1 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/util/uuid'; +import uuid from 'flavours/glitch/utils/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 afd9d12cb9..2586c837b1 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/util/compare_id'; +import compareId from 'flavours/glitch/utils/compare_id'; const initialState = ImmutableMap(); diff --git a/app/javascript/flavours/glitch/selectors/index.js b/app/javascript/flavours/glitch/selectors/index.js index c960ceb71f..8e6e40d246 100644 --- a/app/javascript/flavours/glitch/selectors/index.js +++ b/app/javascript/flavours/glitch/selectors/index.js @@ -1,7 +1,7 @@ import escapeTextContentForBrowser from 'escape-html'; import { createSelector } from 'reselect'; import { List as ImmutableList } from 'immutable'; -import { toServerSideType } from 'flavours/glitch/util/filters'; +import { toServerSideType } from 'flavours/glitch/utils/filters'; import { me } from 'flavours/glitch/initial_state'; const getAccountBase = (state, id) => state.getIn(['accounts', id], null); diff --git a/app/javascript/flavours/glitch/util/async-components.js b/app/javascript/flavours/glitch/utils/async-components.js similarity index 99% rename from app/javascript/flavours/glitch/util/async-components.js rename to app/javascript/flavours/glitch/utils/async-components.js index 1ecba2bcbb..325efe74c9 100644 --- a/app/javascript/flavours/glitch/util/async-components.js +++ b/app/javascript/flavours/glitch/utils/async-components.js @@ -1,5 +1,5 @@ export function EmojiPicker () { - return import(/* webpackChunkName: "flavours/glitch/async/emoji_picker" */'flavours/glitch/util/emoji/emoji_picker'); + return import(/* webpackChunkName: "flavours/glitch/async/emoji_picker" */'flavours/glitch/utils/emoji/emoji_picker'); } export function Compose () { diff --git a/app/javascript/flavours/glitch/util/backend_links.js b/app/javascript/flavours/glitch/utils/backend_links.js similarity index 100% rename from app/javascript/flavours/glitch/util/backend_links.js rename to app/javascript/flavours/glitch/utils/backend_links.js diff --git a/app/javascript/flavours/glitch/util/base64.js b/app/javascript/flavours/glitch/utils/base64.js similarity index 100% rename from app/javascript/flavours/glitch/util/base64.js rename to app/javascript/flavours/glitch/utils/base64.js diff --git a/app/javascript/flavours/glitch/util/base_polyfills.js b/app/javascript/flavours/glitch/utils/base_polyfills.js similarity index 100% rename from app/javascript/flavours/glitch/util/base_polyfills.js rename to app/javascript/flavours/glitch/utils/base_polyfills.js diff --git a/app/javascript/flavours/glitch/util/compare_id.js b/app/javascript/flavours/glitch/utils/compare_id.js similarity index 100% rename from app/javascript/flavours/glitch/util/compare_id.js rename to app/javascript/flavours/glitch/utils/compare_id.js diff --git a/app/javascript/flavours/glitch/util/config.js b/app/javascript/flavours/glitch/utils/config.js similarity index 100% rename from app/javascript/flavours/glitch/util/config.js rename to app/javascript/flavours/glitch/utils/config.js diff --git a/app/javascript/flavours/glitch/util/content_warning.js b/app/javascript/flavours/glitch/utils/content_warning.js similarity index 100% rename from app/javascript/flavours/glitch/util/content_warning.js rename to app/javascript/flavours/glitch/utils/content_warning.js diff --git a/app/javascript/flavours/glitch/util/counter.js b/app/javascript/flavours/glitch/utils/counter.js similarity index 100% rename from app/javascript/flavours/glitch/util/counter.js rename to app/javascript/flavours/glitch/utils/counter.js diff --git a/app/javascript/flavours/glitch/util/dom_helpers.js b/app/javascript/flavours/glitch/utils/dom_helpers.js similarity index 100% rename from app/javascript/flavours/glitch/util/dom_helpers.js rename to app/javascript/flavours/glitch/utils/dom_helpers.js diff --git a/app/javascript/flavours/glitch/util/emoji/emoji_compressed.js b/app/javascript/flavours/glitch/utils/emoji/emoji_compressed.js similarity index 100% rename from app/javascript/flavours/glitch/util/emoji/emoji_compressed.js rename to app/javascript/flavours/glitch/utils/emoji/emoji_compressed.js diff --git a/app/javascript/flavours/glitch/util/emoji/emoji_map.json b/app/javascript/flavours/glitch/utils/emoji/emoji_map.json similarity index 100% rename from app/javascript/flavours/glitch/util/emoji/emoji_map.json rename to app/javascript/flavours/glitch/utils/emoji/emoji_map.json diff --git a/app/javascript/flavours/glitch/util/emoji/emoji_mart_data_light.js b/app/javascript/flavours/glitch/utils/emoji/emoji_mart_data_light.js similarity index 100% rename from app/javascript/flavours/glitch/util/emoji/emoji_mart_data_light.js rename to app/javascript/flavours/glitch/utils/emoji/emoji_mart_data_light.js diff --git a/app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js b/app/javascript/flavours/glitch/utils/emoji/emoji_mart_search_light.js similarity index 100% rename from app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js rename to app/javascript/flavours/glitch/utils/emoji/emoji_mart_search_light.js diff --git a/app/javascript/flavours/glitch/util/emoji/emoji_picker.js b/app/javascript/flavours/glitch/utils/emoji/emoji_picker.js similarity index 100% rename from app/javascript/flavours/glitch/util/emoji/emoji_picker.js rename to app/javascript/flavours/glitch/utils/emoji/emoji_picker.js diff --git a/app/javascript/flavours/glitch/util/emoji/emoji_unicode_mapping_light.js b/app/javascript/flavours/glitch/utils/emoji/emoji_unicode_mapping_light.js similarity index 100% rename from app/javascript/flavours/glitch/util/emoji/emoji_unicode_mapping_light.js rename to app/javascript/flavours/glitch/utils/emoji/emoji_unicode_mapping_light.js diff --git a/app/javascript/flavours/glitch/util/emoji/emoji_utils.js b/app/javascript/flavours/glitch/utils/emoji/emoji_utils.js similarity index 100% rename from app/javascript/flavours/glitch/util/emoji/emoji_utils.js rename to app/javascript/flavours/glitch/utils/emoji/emoji_utils.js diff --git a/app/javascript/flavours/glitch/util/emoji/index.js b/app/javascript/flavours/glitch/utils/emoji/index.js similarity index 98% rename from app/javascript/flavours/glitch/util/emoji/index.js rename to app/javascript/flavours/glitch/utils/emoji/index.js index be8f4d069b..c4e2c26f28 100644 --- a/app/javascript/flavours/glitch/util/emoji/index.js +++ b/app/javascript/flavours/glitch/utils/emoji/index.js @@ -1,6 +1,6 @@ import { autoPlayGif, useSystemEmojiFont } from 'flavours/glitch/initial_state'; import unicodeMapping from './emoji_unicode_mapping_light'; -import { assetHost } from 'flavours/glitch/util/config'; +import { assetHost } from 'flavours/glitch/utils/config'; import Trie from 'substring-trie'; const trie = new Trie(Object.keys(unicodeMapping)); diff --git a/app/javascript/flavours/glitch/util/emoji/unicode_to_filename.js b/app/javascript/flavours/glitch/utils/emoji/unicode_to_filename.js similarity index 100% rename from app/javascript/flavours/glitch/util/emoji/unicode_to_filename.js rename to app/javascript/flavours/glitch/utils/emoji/unicode_to_filename.js diff --git a/app/javascript/flavours/glitch/util/emoji/unicode_to_unified_name.js b/app/javascript/flavours/glitch/utils/emoji/unicode_to_unified_name.js similarity index 100% rename from app/javascript/flavours/glitch/util/emoji/unicode_to_unified_name.js rename to app/javascript/flavours/glitch/utils/emoji/unicode_to_unified_name.js diff --git a/app/javascript/flavours/glitch/util/extra_polyfills.js b/app/javascript/flavours/glitch/utils/extra_polyfills.js similarity index 100% rename from app/javascript/flavours/glitch/util/extra_polyfills.js rename to app/javascript/flavours/glitch/utils/extra_polyfills.js diff --git a/app/javascript/flavours/glitch/util/filters.js b/app/javascript/flavours/glitch/utils/filters.js similarity index 100% rename from app/javascript/flavours/glitch/util/filters.js rename to app/javascript/flavours/glitch/utils/filters.js diff --git a/app/javascript/flavours/glitch/util/fullscreen.js b/app/javascript/flavours/glitch/utils/fullscreen.js similarity index 100% rename from app/javascript/flavours/glitch/util/fullscreen.js rename to app/javascript/flavours/glitch/utils/fullscreen.js diff --git a/app/javascript/flavours/glitch/util/get_rect_from_entry.js b/app/javascript/flavours/glitch/utils/get_rect_from_entry.js similarity index 100% rename from app/javascript/flavours/glitch/util/get_rect_from_entry.js rename to app/javascript/flavours/glitch/utils/get_rect_from_entry.js diff --git a/app/javascript/flavours/glitch/util/hashtag.js b/app/javascript/flavours/glitch/utils/hashtag.js similarity index 100% rename from app/javascript/flavours/glitch/util/hashtag.js rename to app/javascript/flavours/glitch/utils/hashtag.js diff --git a/app/javascript/flavours/glitch/util/html.js b/app/javascript/flavours/glitch/utils/html.js similarity index 100% rename from app/javascript/flavours/glitch/util/html.js rename to app/javascript/flavours/glitch/utils/html.js diff --git a/app/javascript/flavours/glitch/util/icons.js b/app/javascript/flavours/glitch/utils/icons.js similarity index 100% rename from app/javascript/flavours/glitch/util/icons.js rename to app/javascript/flavours/glitch/utils/icons.js diff --git a/app/javascript/flavours/glitch/util/idna.js b/app/javascript/flavours/glitch/utils/idna.js similarity index 100% rename from app/javascript/flavours/glitch/util/idna.js rename to app/javascript/flavours/glitch/utils/idna.js diff --git a/app/javascript/flavours/glitch/util/intersection_observer_wrapper.js b/app/javascript/flavours/glitch/utils/intersection_observer_wrapper.js similarity index 100% rename from app/javascript/flavours/glitch/util/intersection_observer_wrapper.js rename to app/javascript/flavours/glitch/utils/intersection_observer_wrapper.js diff --git a/app/javascript/flavours/glitch/util/is_mobile.js b/app/javascript/flavours/glitch/utils/is_mobile.js similarity index 100% rename from app/javascript/flavours/glitch/util/is_mobile.js rename to app/javascript/flavours/glitch/utils/is_mobile.js diff --git a/app/javascript/flavours/glitch/util/js_helpers.js b/app/javascript/flavours/glitch/utils/js_helpers.js similarity index 100% rename from app/javascript/flavours/glitch/util/js_helpers.js rename to app/javascript/flavours/glitch/utils/js_helpers.js diff --git a/app/javascript/flavours/glitch/util/load_keyboard_extensions.js b/app/javascript/flavours/glitch/utils/load_keyboard_extensions.js similarity index 100% rename from app/javascript/flavours/glitch/util/load_keyboard_extensions.js rename to app/javascript/flavours/glitch/utils/load_keyboard_extensions.js diff --git a/app/javascript/flavours/glitch/util/load_polyfills.js b/app/javascript/flavours/glitch/utils/load_polyfills.js similarity index 100% rename from app/javascript/flavours/glitch/util/load_polyfills.js rename to app/javascript/flavours/glitch/utils/load_polyfills.js diff --git a/app/javascript/flavours/glitch/util/log_out.js b/app/javascript/flavours/glitch/utils/log_out.js similarity index 93% rename from app/javascript/flavours/glitch/util/log_out.js rename to app/javascript/flavours/glitch/utils/log_out.js index 42dcee03ec..f820411500 100644 --- a/app/javascript/flavours/glitch/util/log_out.js +++ b/app/javascript/flavours/glitch/utils/log_out.js @@ -1,5 +1,5 @@ import Rails from '@rails/ujs'; -import { signOutLink } from 'flavours/glitch/util/backend_links'; +import { signOutLink } from 'flavours/glitch/utils/backend_links'; export const logOut = () => { const form = document.createElement('form'); diff --git a/app/javascript/flavours/glitch/util/main.js b/app/javascript/flavours/glitch/utils/main.js similarity index 93% rename from app/javascript/flavours/glitch/util/main.js rename to app/javascript/flavours/glitch/utils/main.js index b4e6bc1512..0601e7a76d 100644 --- a/app/javascript/flavours/glitch/util/main.js +++ b/app/javascript/flavours/glitch/utils/main.js @@ -2,9 +2,9 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { setupBrowserNotifications } from 'flavours/glitch/actions/notifications'; import Mastodon, { store } from 'flavours/glitch/containers/mastodon'; -import ready from 'flavours/glitch/util/ready'; +import ready from 'flavours/glitch/utils/ready'; -const perf = require('flavours/glitch/util/performance'); +const perf = require('flavours/glitch/utils/performance'); /** * @returns {Promise} diff --git a/app/javascript/flavours/glitch/util/notifications.js b/app/javascript/flavours/glitch/utils/notifications.js similarity index 100% rename from app/javascript/flavours/glitch/util/notifications.js rename to app/javascript/flavours/glitch/utils/notifications.js diff --git a/app/javascript/flavours/glitch/util/numbers.js b/app/javascript/flavours/glitch/utils/numbers.js similarity index 100% rename from app/javascript/flavours/glitch/util/numbers.js rename to app/javascript/flavours/glitch/utils/numbers.js diff --git a/app/javascript/flavours/glitch/util/optional_motion.js b/app/javascript/flavours/glitch/utils/optional_motion.js similarity index 100% rename from app/javascript/flavours/glitch/util/optional_motion.js rename to app/javascript/flavours/glitch/utils/optional_motion.js diff --git a/app/javascript/flavours/glitch/util/performance.js b/app/javascript/flavours/glitch/utils/performance.js similarity index 100% rename from app/javascript/flavours/glitch/util/performance.js rename to app/javascript/flavours/glitch/utils/performance.js diff --git a/app/javascript/flavours/glitch/util/privacy_preference.js b/app/javascript/flavours/glitch/utils/privacy_preference.js similarity index 100% rename from app/javascript/flavours/glitch/util/privacy_preference.js rename to app/javascript/flavours/glitch/utils/privacy_preference.js diff --git a/app/javascript/flavours/glitch/util/react_helpers.js b/app/javascript/flavours/glitch/utils/react_helpers.js similarity index 100% rename from app/javascript/flavours/glitch/util/react_helpers.js rename to app/javascript/flavours/glitch/utils/react_helpers.js diff --git a/app/javascript/flavours/glitch/util/react_router_helpers.js b/app/javascript/flavours/glitch/utils/react_router_helpers.js similarity index 100% rename from app/javascript/flavours/glitch/util/react_router_helpers.js rename to app/javascript/flavours/glitch/utils/react_router_helpers.js diff --git a/app/javascript/flavours/glitch/util/ready.js b/app/javascript/flavours/glitch/utils/ready.js similarity index 100% rename from app/javascript/flavours/glitch/util/ready.js rename to app/javascript/flavours/glitch/utils/ready.js diff --git a/app/javascript/flavours/glitch/util/reduced_motion.js b/app/javascript/flavours/glitch/utils/reduced_motion.js similarity index 100% rename from app/javascript/flavours/glitch/util/reduced_motion.js rename to app/javascript/flavours/glitch/utils/reduced_motion.js diff --git a/app/javascript/flavours/glitch/util/redux_helpers.js b/app/javascript/flavours/glitch/utils/redux_helpers.js similarity index 100% rename from app/javascript/flavours/glitch/util/redux_helpers.js rename to app/javascript/flavours/glitch/utils/redux_helpers.js diff --git a/app/javascript/flavours/glitch/util/resize_image.js b/app/javascript/flavours/glitch/utils/resize_image.js similarity index 100% rename from app/javascript/flavours/glitch/util/resize_image.js rename to app/javascript/flavours/glitch/utils/resize_image.js diff --git a/app/javascript/flavours/glitch/util/schedule_idle_task.js b/app/javascript/flavours/glitch/utils/schedule_idle_task.js similarity index 100% rename from app/javascript/flavours/glitch/util/schedule_idle_task.js rename to app/javascript/flavours/glitch/utils/schedule_idle_task.js diff --git a/app/javascript/flavours/glitch/util/scroll.js b/app/javascript/flavours/glitch/utils/scroll.js similarity index 100% rename from app/javascript/flavours/glitch/util/scroll.js rename to app/javascript/flavours/glitch/utils/scroll.js diff --git a/app/javascript/flavours/glitch/util/scrollbar.js b/app/javascript/flavours/glitch/utils/scrollbar.js similarity index 100% rename from app/javascript/flavours/glitch/util/scrollbar.js rename to app/javascript/flavours/glitch/utils/scrollbar.js diff --git a/app/javascript/flavours/glitch/util/settings.js b/app/javascript/flavours/glitch/utils/settings.js similarity index 100% rename from app/javascript/flavours/glitch/util/settings.js rename to app/javascript/flavours/glitch/utils/settings.js diff --git a/app/javascript/flavours/glitch/util/stream.js b/app/javascript/flavours/glitch/utils/stream.js similarity index 100% rename from app/javascript/flavours/glitch/util/stream.js rename to app/javascript/flavours/glitch/utils/stream.js diff --git a/app/javascript/flavours/glitch/util/url_regex.js b/app/javascript/flavours/glitch/utils/url_regex.js similarity index 100% rename from app/javascript/flavours/glitch/util/url_regex.js rename to app/javascript/flavours/glitch/utils/url_regex.js diff --git a/app/javascript/flavours/glitch/util/uuid.js b/app/javascript/flavours/glitch/utils/uuid.js similarity index 100% rename from app/javascript/flavours/glitch/util/uuid.js rename to app/javascript/flavours/glitch/utils/uuid.js