Browse Source

Move more modules from flavours/glitch/utils to flavours/glitch

closed-social-glitch-2
Claire 2 years ago
parent
commit
b75bf336bd
42 changed files with 36 additions and 36 deletions
  1. +1
    -1
      app/javascript/flavours/glitch/actions/compose.js
  2. +1
    -1
      app/javascript/flavours/glitch/actions/markers.js
  3. +1
    -1
      app/javascript/flavours/glitch/actions/notifications.js
  4. +1
    -1
      app/javascript/flavours/glitch/actions/push_notifications/registerer.js
  5. +1
    -1
      app/javascript/flavours/glitch/actions/streaming.js
  6. +1
    -1
      app/javascript/flavours/glitch/actions/timelines.js
  7. +1
    -1
      app/javascript/flavours/glitch/base_polyfills.js
  8. +0
    -0
      app/javascript/flavours/glitch/compare_id.js
  9. +1
    -1
      app/javascript/flavours/glitch/components/column.js
  10. +1
    -1
      app/javascript/flavours/glitch/components/media_gallery.js
  11. +1
    -1
      app/javascript/flavours/glitch/containers/dropdown_menu_container.js
  12. +0
    -0
      app/javascript/flavours/glitch/extra_polyfills.js
  13. +1
    -1
      app/javascript/flavours/glitch/features/account_gallery/components/media_item.js
  14. +1
    -1
      app/javascript/flavours/glitch/features/compose/components/compose_form.js
  15. +1
    -1
      app/javascript/flavours/glitch/features/compose/components/dropdown.js
  16. +1
    -1
      app/javascript/flavours/glitch/features/compose/components/upload.js
  17. +1
    -1
      app/javascript/flavours/glitch/features/notifications/index.js
  18. +2
    -2
      app/javascript/flavours/glitch/features/ui/components/column.js
  19. +1
    -1
      app/javascript/flavours/glitch/features/ui/components/columns_area.js
  20. +1
    -1
      app/javascript/flavours/glitch/features/ui/components/tabs_bar.js
  21. +1
    -1
      app/javascript/flavours/glitch/features/ui/index.js
  22. +0
    -0
      app/javascript/flavours/glitch/is_mobile.js
  23. +0
    -0
      app/javascript/flavours/glitch/load_keyboard_extensions.js
  24. +0
    -0
      app/javascript/flavours/glitch/load_polyfills.js
  25. +1
    -1
      app/javascript/flavours/glitch/main.js
  26. +1
    -1
      app/javascript/flavours/glitch/packs/about.js
  27. +2
    -2
      app/javascript/flavours/glitch/packs/home.js
  28. +2
    -2
      app/javascript/flavours/glitch/packs/public.js
  29. +2
    -2
      app/javascript/flavours/glitch/packs/settings.js
  30. +1
    -1
      app/javascript/flavours/glitch/packs/share.js
  31. +0
    -0
      app/javascript/flavours/glitch/performance.js
  32. +1
    -1
      app/javascript/flavours/glitch/reducers/compose.js
  33. +1
    -1
      app/javascript/flavours/glitch/reducers/contexts.js
  34. +1
    -1
      app/javascript/flavours/glitch/reducers/conversations.js
  35. +1
    -1
      app/javascript/flavours/glitch/reducers/meta.js
  36. +1
    -1
      app/javascript/flavours/glitch/reducers/notifications.js
  37. +1
    -1
      app/javascript/flavours/glitch/reducers/settings.js
  38. +1
    -1
      app/javascript/flavours/glitch/reducers/timelines.js
  39. +0
    -0
      app/javascript/flavours/glitch/scroll.js
  40. +0
    -0
      app/javascript/flavours/glitch/settings.js
  41. +0
    -0
      app/javascript/flavours/glitch/stream.js
  42. +0
    -0
      app/javascript/flavours/glitch/uuid.js

+ 1
- 1
app/javascript/flavours/glitch/actions/compose.js View File

@ -3,7 +3,7 @@ import { CancelToken, isCancel } from 'axios';
import { throttle } from 'lodash';
import { search as emojiSearch } from 'flavours/glitch/utils/emoji/emoji_mart_search_light';
import { useEmoji } from './emojis';
import { tagHistory } from 'flavours/glitch/utils/settings';
import { tagHistory } from '../settings';
import { recoverHashtags } from 'flavours/glitch/utils/hashtag';
import resizeImage from 'flavours/glitch/utils/resize_image';
import { importFetchedAccounts } from './importer';

+ 1
- 1
app/javascript/flavours/glitch/actions/markers.js View File

@ -1,6 +1,6 @@
import api from '../api';
import { debounce } from 'lodash';
import compareId from 'flavours/glitch/utils/compare_id';
import compareId from '../compare_id';
import { List as ImmutableList } from 'immutable';
export const MARKERS_FETCH_REQUEST = 'MARKERS_FETCH_REQUEST';

+ 1
- 1
app/javascript/flavours/glitch/actions/notifications.js View File

@ -13,7 +13,7 @@ import { defineMessages } from 'react-intl';
import { List as ImmutableList } from 'immutable';
import { unescapeHTML } from 'flavours/glitch/utils/html';
import { usePendingItems as preferPendingItems } from 'flavours/glitch/initial_state';
import compareId from 'flavours/glitch/utils/compare_id';
import compareId from 'flavours/glitch/compare_id';
import { requestNotificationPermission } from 'flavours/glitch/utils/notifications';
export const NOTIFICATIONS_UPDATE = 'NOTIFICATIONS_UPDATE';

+ 1
- 1
app/javascript/flavours/glitch/actions/push_notifications/registerer.js View File

@ -1,5 +1,5 @@
import api from '../../api';
import { pushNotificationsSetting } from 'flavours/glitch/utils/settings';
import { pushNotificationsSetting } from '../../settings';
import { setBrowserSupport, setSubscription, clearSubscription } from './setter';
// Taken from https://www.npmjs.com/package/web-push

+ 1
- 1
app/javascript/flavours/glitch/actions/streaming.js View File

@ -1,6 +1,6 @@
// @ts-check
import { connectStream } from 'flavours/glitch/utils/stream';
import { connectStream } from '../stream';
import {
updateTimeline,
deleteFromTimelines,

+ 1
- 1
app/javascript/flavours/glitch/actions/timelines.js View File

@ -2,7 +2,7 @@ import { importFetchedStatus, importFetchedStatuses } from './importer';
import { submitMarkers } from './markers';
import api, { getLinks } from 'flavours/glitch/api';
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import compareId from 'flavours/glitch/utils/compare_id';
import compareId from 'flavours/glitch/compare_id';
import { me, usePendingItems as preferPendingItems } from 'flavours/glitch/initial_state';
import { toServerSideType } from 'flavours/glitch/utils/filters';

app/javascript/flavours/glitch/utils/base_polyfills.js → app/javascript/flavours/glitch/base_polyfills.js View File

@ -5,7 +5,7 @@ import includes from 'array-includes';
import assign from 'object-assign';
import values from 'object.values';
import isNaN from 'is-nan';
import { decode as decodeBase64 } from './base64';
import { decode as decodeBase64 } from './utils/base64';
import promiseFinally from 'promise.prototype.finally';
if (!Array.prototype.includes) {

app/javascript/flavours/glitch/utils/compare_id.js → app/javascript/flavours/glitch/compare_id.js View File


+ 1
- 1
app/javascript/flavours/glitch/components/column.js View File

@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { supportsPassiveEvents } from 'detect-passive-events';
import { scrollTop } from 'flavours/glitch/utils/scroll';
import { scrollTop } from '../scroll';
export default class Column extends React.PureComponent {

+ 1
- 1
app/javascript/flavours/glitch/components/media_gallery.js View File

@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import { is } from 'immutable';
import IconButton from './icon_button';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { isIOS } from 'flavours/glitch/utils/is_mobile';
import { isIOS } from '../is_mobile';
import classNames from 'classnames';
import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state';
import { debounce } from 'lodash';

+ 1
- 1
app/javascript/flavours/glitch/containers/dropdown_menu_container.js View File

@ -2,7 +2,7 @@ import { openDropdownMenu, closeDropdownMenu } from 'flavours/glitch/actions/dro
import { openModal, closeModal } from 'flavours/glitch/actions/modal';
import { connect } from 'react-redux';
import DropdownMenu from 'flavours/glitch/components/dropdown_menu';
import { isUserTouching } from 'flavours/glitch/utils/is_mobile';
import { isUserTouching } from '../is_mobile';
const mapStateToProps = state => ({
dropdownPlacement: state.getIn(['dropdown_menu', 'placement']),

app/javascript/flavours/glitch/utils/extra_polyfills.js → app/javascript/flavours/glitch/extra_polyfills.js View File


+ 1
- 1
app/javascript/flavours/glitch/features/account_gallery/components/media_item.js View File

@ -2,7 +2,7 @@ import Blurhash from 'flavours/glitch/components/blurhash';
import classNames from 'classnames';
import Icon from 'flavours/glitch/components/icon';
import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state';
import { isIOS } from 'flavours/glitch/utils/is_mobile';
import { isIOS } from 'flavours/glitch/is_mobile';
import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';

+ 1
- 1
app/javascript/flavours/glitch/features/compose/components/compose_form.js View File

@ -9,7 +9,7 @@ import EmojiPicker from 'flavours/glitch/features/emoji_picker';
import PollFormContainer from '../containers/poll_form_container';
import UploadFormContainer from '../containers/upload_form_container';
import WarningContainer from '../containers/warning_container';
import { isMobile } from 'flavours/glitch/utils/is_mobile';
import { isMobile } from 'flavours/glitch/is_mobile';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { countableText } from '../util/counter';
import OptionsContainer from '../containers/options_container';

+ 1
- 1
app/javascript/flavours/glitch/features/compose/components/dropdown.js View File

@ -9,7 +9,7 @@ import IconButton from 'flavours/glitch/components/icon_button';
import DropdownMenu from './dropdown_menu';
// Utils.
import { isUserTouching } from 'flavours/glitch/utils/is_mobile';
import { isUserTouching } from 'flavours/glitch/is_mobile';
import { assignHandlers } from 'flavours/glitch/utils/react_helpers';
// The component.

+ 1
- 1
app/javascript/flavours/glitch/features/compose/components/upload.js View File

@ -6,7 +6,7 @@ import spring from 'react-motion/lib/spring';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
import Icon from 'flavours/glitch/components/icon';
import { isUserTouching } from 'flavours/glitch/utils/is_mobile';
import { isUserTouching } from 'flavours/glitch/is_mobile';
export default class Upload extends ImmutablePureComponent {

+ 1
- 1
app/javascript/flavours/glitch/features/notifications/index.js View File

@ -26,7 +26,7 @@ import { debounce } from 'lodash';
import ScrollableList from 'flavours/glitch/components/scrollable_list';
import LoadGap from 'flavours/glitch/components/load_gap';
import Icon from 'flavours/glitch/components/icon';
import compareId from 'flavours/glitch/utils/compare_id';
import compareId from 'flavours/glitch/compare_id';
import NotificationsPermissionBanner from './components/notifications_permission_banner';
import NotSignedInIndicator from 'flavours/glitch/components/not_signed_in_indicator';
import { Helmet } from 'react-helmet';

+ 2
- 2
app/javascript/flavours/glitch/features/ui/components/column.js View File

@ -2,8 +2,8 @@ import React from 'react';
import ColumnHeader from './column_header';
import PropTypes from 'prop-types';
import { debounce } from 'lodash';
import { scrollTop } from 'flavours/glitch/utils/scroll';
import { isMobile } from 'flavours/glitch/utils/is_mobile';
import { scrollTop } from 'flavours/glitch/scroll';
import { isMobile } from 'flavours/glitch/is_mobile';
export default class Column extends React.PureComponent {

+ 1
- 1
app/javascript/flavours/glitch/features/ui/components/columns_area.js View File

@ -32,7 +32,7 @@ import ComposePanel from './compose_panel';
import NavigationPanel from './navigation_panel';
import { supportsPassiveEvents } from 'detect-passive-events';
import { scrollRight } from 'flavours/glitch/utils/scroll';
import { scrollRight } from 'flavours/glitch/scroll';
const componentMap = {
'COMPOSE': Compose,

+ 1
- 1
app/javascript/flavours/glitch/features/ui/components/tabs_bar.js View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { NavLink, withRouter } from 'react-router-dom';
import { FormattedMessage, injectIntl } from 'react-intl';
import { debounce } from 'lodash';
import { isUserTouching } from 'flavours/glitch/utils/is_mobile';
import { isUserTouching } from 'flavours/glitch/is_mobile';
import Icon from 'flavours/glitch/components/icon';
import NotificationsCounterIcon from './notifications_counter_icon';

+ 1
- 1
app/javascript/flavours/glitch/features/ui/index.js View File

@ -5,7 +5,7 @@ import LoadingBarContainer from './containers/loading_bar_container';
import ModalContainer from './containers/modal_container';
import { connect } from 'react-redux';
import { Redirect, withRouter } from 'react-router-dom';
import { layoutFromWindow } from 'flavours/glitch/utils/is_mobile';
import { layoutFromWindow } from 'flavours/glitch/is_mobile';
import { debounce } from 'lodash';
import { uploadCompose, resetCompose, changeComposeSpoilerness } from 'flavours/glitch/actions/compose';
import { expandHomeTimeline } from 'flavours/glitch/actions/timelines';

app/javascript/flavours/glitch/utils/is_mobile.js → app/javascript/flavours/glitch/is_mobile.js View File


app/javascript/flavours/glitch/utils/load_keyboard_extensions.js → app/javascript/flavours/glitch/load_keyboard_extensions.js View File


app/javascript/flavours/glitch/utils/load_polyfills.js → app/javascript/flavours/glitch/load_polyfills.js View File


app/javascript/flavours/glitch/utils/main.js → app/javascript/flavours/glitch/main.js View File

@ -4,7 +4,7 @@ import { setupBrowserNotifications } from 'flavours/glitch/actions/notifications
import Mastodon, { store } from 'flavours/glitch/containers/mastodon';
import ready from 'flavours/glitch/ready';
const perf = require('flavours/glitch/utils/performance');
const perf = require('flavours/glitch/performance');
/**
* @returns {Promise<void>}

+ 1
- 1
app/javascript/flavours/glitch/packs/about.js View File

@ -1,5 +1,5 @@
import 'packs/public-path';
import loadPolyfills from 'flavours/glitch/utils/load_polyfills';
import loadPolyfills from 'flavours/glitch/load_polyfills';
function loaded() {
const TimelineContainer = require('flavours/glitch/containers/timeline_container').default;

+ 2
- 2
app/javascript/flavours/glitch/packs/home.js View File

@ -1,8 +1,8 @@
import 'packs/public-path';
import loadPolyfills from 'flavours/glitch/utils/load_polyfills';
import loadPolyfills from 'flavours/glitch/load_polyfills';
loadPolyfills().then(async () => {
const { default: main } = await import('flavours/glitch/utils/main');
const { default: main } = await import('flavours/glitch/main');
return main();
}).catch(e => {

+ 2
- 2
app/javascript/flavours/glitch/packs/public.js View File

@ -1,7 +1,7 @@
import 'packs/public-path';
import loadPolyfills from 'flavours/glitch/utils/load_polyfills';
import loadPolyfills from 'flavours/glitch/load_polyfills';
import ready from 'flavours/glitch/ready';
import loadKeyboardExtensions from 'flavours/glitch/utils/load_keyboard_extensions';
import loadKeyboardExtensions from 'flavours/glitch/load_keyboard_extensions';
function main() {
const IntlMessageFormat = require('intl-messageformat').default;

+ 2
- 2
app/javascript/flavours/glitch/packs/settings.js View File

@ -1,7 +1,7 @@
import 'packs/public-path';
import loadPolyfills from 'flavours/glitch/utils/load_polyfills';
import loadPolyfills from 'flavours/glitch/load_polyfills';
import ready from 'flavours/glitch/ready';
import loadKeyboardExtensions from 'flavours/glitch/utils/load_keyboard_extensions';
import loadKeyboardExtensions from 'flavours/glitch/load_keyboard_extensions';
import 'cocoon-js-vanilla';
function main() {

+ 1
- 1
app/javascript/flavours/glitch/packs/share.js View File

@ -1,5 +1,5 @@
import 'packs/public-path';
import loadPolyfills from 'flavours/glitch/utils/load_polyfills';
import loadPolyfills from 'flavours/glitch/load_polyfills';
function loaded() {
const ComposeContainer = require('flavours/glitch/containers/compose_container').default;

app/javascript/flavours/glitch/utils/performance.js → app/javascript/flavours/glitch/performance.js View File


+ 1
- 1
app/javascript/flavours/glitch/reducers/compose.js View File

@ -53,7 +53,7 @@ import { TIMELINE_DELETE } from 'flavours/glitch/actions/timelines';
import { STORE_HYDRATE } from 'flavours/glitch/actions/store';
import { REDRAFT } from 'flavours/glitch/actions/statuses';
import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
import uuid from 'flavours/glitch/utils/uuid';
import uuid from '../uuid';
import { privacyPreference } from 'flavours/glitch/utils/privacy_preference';
import { me, defaultContentType } from 'flavours/glitch/initial_state';
import { overwrite } from 'flavours/glitch/utils/js_helpers';

+ 1
- 1
app/javascript/flavours/glitch/reducers/contexts.js View File

@ -5,7 +5,7 @@ import {
import { CONTEXT_FETCH_SUCCESS } from 'flavours/glitch/actions/statuses';
import { TIMELINE_DELETE, TIMELINE_UPDATE } from 'flavours/glitch/actions/timelines';
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import compareId from 'flavours/glitch/utils/compare_id';
import compareId from '../compare_id';
const initialState = ImmutableMap({
inReplyTos: ImmutableMap(),

+ 1
- 1
app/javascript/flavours/glitch/reducers/conversations.js View File

@ -11,7 +11,7 @@ import {
} from '../actions/conversations';
import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'flavours/glitch/actions/accounts';
import { DOMAIN_BLOCK_SUCCESS } from 'flavours/glitch/actions/domain_blocks';
import compareId from 'flavours/glitch/utils/compare_id';
import compareId from '../compare_id';
const initialState = ImmutableMap({
items: ImmutableList(),

+ 1
- 1
app/javascript/flavours/glitch/reducers/meta.js View File

@ -1,7 +1,7 @@
import { STORE_HYDRATE } from 'flavours/glitch/actions/store';
import { APP_LAYOUT_CHANGE } from 'flavours/glitch/actions/app';
import { Map as ImmutableMap } from 'immutable';
import { layoutFromWindow } from 'flavours/glitch/utils/is_mobile';
import { layoutFromWindow } from 'flavours/glitch/is_mobile';
const initialState = ImmutableMap({
streaming_api_base_url: null,

+ 1
- 1
app/javascript/flavours/glitch/reducers/notifications.js View File

@ -32,7 +32,7 @@ import {
import { DOMAIN_BLOCK_SUCCESS } from 'flavours/glitch/actions/domain_blocks';
import { TIMELINE_DELETE, TIMELINE_DISCONNECT } from 'flavours/glitch/actions/timelines';
import { fromJS, Map as ImmutableMap, List as ImmutableList } from 'immutable';
import compareId from 'flavours/glitch/utils/compare_id';
import compareId from '../compare_id';
const initialState = ImmutableMap({
pendingItems: ImmutableList(),

+ 1
- 1
app/javascript/flavours/glitch/reducers/settings.js View File

@ -6,7 +6,7 @@ import { EMOJI_USE } from 'flavours/glitch/actions/emojis';
import { LANGUAGE_USE } from 'flavours/glitch/actions/languages';
import { LIST_DELETE_SUCCESS, LIST_FETCH_FAIL } from '../actions/lists';
import { Map as ImmutableMap, fromJS } from 'immutable';
import uuid from 'flavours/glitch/utils/uuid';
import uuid from '../uuid';
const initialState = ImmutableMap({
saved: true,

+ 1
- 1
app/javascript/flavours/glitch/reducers/timelines.js View File

@ -17,7 +17,7 @@ import {
ACCOUNT_UNFOLLOW_SUCCESS,
} from 'flavours/glitch/actions/accounts';
import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
import compareId from 'flavours/glitch/utils/compare_id';
import compareId from '../compare_id';
const initialState = ImmutableMap();

app/javascript/flavours/glitch/utils/scroll.js → app/javascript/flavours/glitch/scroll.js View File


app/javascript/flavours/glitch/utils/settings.js → app/javascript/flavours/glitch/settings.js View File


app/javascript/flavours/glitch/utils/stream.js → app/javascript/flavours/glitch/stream.js View File


app/javascript/flavours/glitch/utils/uuid.js → app/javascript/flavours/glitch/uuid.js View File


Loading…
Cancel
Save