Rename files (11): utils
This commit is contained in:
parent
fe34af29d3
commit
637d78db01
43 changed files with 32 additions and 32 deletions
|
@ -10,7 +10,7 @@ import { tagHistory } from 'soapbox/settings';
|
|||
import { isLoggedIn } from 'soapbox/utils/auth';
|
||||
import { getFeatures, parseVersion } from 'soapbox/utils/features';
|
||||
import { formatBytes, getVideoDuration } from 'soapbox/utils/media';
|
||||
import resizeImage from 'soapbox/utils/resize_image';
|
||||
import resizeImage from 'soapbox/utils/resize-image';
|
||||
|
||||
import { showAlert, showAlertForError } from './alerts';
|
||||
import { useEmoji } from './emojis';
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { Map as ImmutableMap, Set as ImmutableSet } from 'immutable';
|
||||
|
||||
import ConfigDB from 'soapbox/utils/config_db';
|
||||
import ConfigDB from 'soapbox/utils/config-db';
|
||||
|
||||
import { fetchConfig, updateConfig } from './admin';
|
||||
|
||||
import type { AppDispatch, RootState } from 'soapbox/store';
|
||||
import type { Policy } from 'soapbox/utils/config_db';
|
||||
import type { Policy } from 'soapbox/utils/config-db';
|
||||
|
||||
const simplePolicyMerge = (simplePolicy: Policy, host: string, restrictions: ImmutableMap<string, any>) => {
|
||||
return simplePolicy.map((hosts, key) => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as React from 'react';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
|
||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import HoverRefWrapper from 'soapbox/components/hover-ref-wrapper';
|
||||
import VerificationBadge from 'soapbox/components/verification-badge';
|
||||
import ActionButton from 'soapbox/features/ui/components/action-button';
|
||||
import { useAppSelector, useOnScreen } from 'soapbox/hooks';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react';
|
||||
|
||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import HoverRefWrapper from 'soapbox/components/hover-ref-wrapper';
|
||||
import { useSoapboxConfig } from 'soapbox/hooks';
|
||||
|
||||
import { getAcct } from '../utils/accounts';
|
||||
|
|
|
@ -8,7 +8,7 @@ import { openModal } from 'soapbox/actions/modals';
|
|||
import EmojiSelector from 'soapbox/components/ui/emoji-selector/emoji-selector';
|
||||
import { useAppSelector, useOwnAccount, useSoapboxConfig } from 'soapbox/hooks';
|
||||
import { isUserTouching } from 'soapbox/is_mobile';
|
||||
import { getReactForStatus } from 'soapbox/utils/emoji_reacts';
|
||||
import { getReactForStatus } from 'soapbox/utils/emoji-reacts';
|
||||
|
||||
interface IEmojiButtonWrapper {
|
||||
statusId: string,
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Helmet as ReactHelmet } from 'react-helmet';
|
|||
|
||||
import { useAppSelector, useSettings } from 'soapbox/hooks';
|
||||
import { RootState } from 'soapbox/store';
|
||||
import FaviconService from 'soapbox/utils/favicon_service';
|
||||
import FaviconService from 'soapbox/utils/favicon-service';
|
||||
|
||||
FaviconService.initFaviconService();
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { Attachment } from 'soapbox/types/entities';
|
|||
import { truncateFilename } from 'soapbox/utils/media';
|
||||
|
||||
import { isIOS } from '../is_mobile';
|
||||
import { isPanoramic, isPortrait, isNonConformingRatio, minimumAspectRatio, maximumAspectRatio } from '../utils/media_aspect_ratio';
|
||||
import { isPanoramic, isPortrait, isNonConformingRatio, minimumAspectRatio, maximumAspectRatio } from '../utils/media-aspect-ratio';
|
||||
|
||||
import type { Property } from 'csstype';
|
||||
import type { List as ImmutableList } from 'immutable';
|
||||
|
|
|
@ -17,7 +17,7 @@ import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
|
|||
import { makeGetAccount } from 'soapbox/selectors';
|
||||
import { isLocal } from 'soapbox/utils/accounts';
|
||||
|
||||
import { showProfileHoverCard } from './hover_ref_wrapper';
|
||||
import { showProfileHoverCard } from './hover-ref-wrapper';
|
||||
import { Card, CardBody, HStack, Icon, Stack, Text } from './ui';
|
||||
|
||||
import type { AppDispatch } from 'soapbox/store';
|
||||
|
|
|
@ -19,7 +19,7 @@ import StatusActionButton from 'soapbox/components/status-action-button';
|
|||
import DropdownMenuContainer from 'soapbox/containers/dropdown-menu-container';
|
||||
import { useAppDispatch, useAppSelector, useFeatures, useOwnAccount, useSettings, useSoapboxConfig } from 'soapbox/hooks';
|
||||
import { isLocal } from 'soapbox/utils/accounts';
|
||||
import { getReactForStatus, reduceEmoji } from 'soapbox/utils/emoji_reacts';
|
||||
import { getReactForStatus, reduceEmoji } from 'soapbox/utils/emoji-reacts';
|
||||
|
||||
import type { Menu } from 'soapbox/components/dropdown-menu';
|
||||
import type { Account, Status } from 'soapbox/types/entities';
|
||||
|
|
|
@ -6,7 +6,7 @@ import { useHistory } from 'react-router-dom';
|
|||
import Icon from 'soapbox/components/icon';
|
||||
import { useSoapboxConfig } from 'soapbox/hooks';
|
||||
import { addGreentext } from 'soapbox/utils/greentext';
|
||||
import { onlyEmoji as isOnlyEmoji } from 'soapbox/utils/rich_content';
|
||||
import { onlyEmoji as isOnlyEmoji } from 'soapbox/utils/rich-content';
|
||||
|
||||
import { isRtl } from '../rtl';
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ import { FormattedList, FormattedMessage } from 'react-intl';
|
|||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { openModal } from 'soapbox/actions/modals';
|
||||
import HoverRefWrapper from 'soapbox/components/hover-ref-wrapper';
|
||||
import HoverStatusWrapper from 'soapbox/components/hover-status-wrapper';
|
||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import { useAppDispatch } from 'soapbox/hooks';
|
||||
|
||||
import type { Account, Status } from 'soapbox/types/entities';
|
||||
|
|
|
@ -2,7 +2,7 @@ import classNames from 'clsx';
|
|||
import React from 'react';
|
||||
import { NavLink, useLocation } from 'react-router-dom';
|
||||
|
||||
import IconWithCounter from 'soapbox/components/icon_with_counter';
|
||||
import IconWithCounter from 'soapbox/components/icon-with-counter';
|
||||
import { Icon, Text } from 'soapbox/components/ui';
|
||||
|
||||
interface IThumbNavigationLink {
|
||||
|
|
|
@ -6,7 +6,7 @@ import { closeReports } from 'soapbox/actions/admin';
|
|||
import { deactivateUserModal, deleteUserModal } from 'soapbox/actions/moderation';
|
||||
import snackbar from 'soapbox/actions/snackbar';
|
||||
import Avatar from 'soapbox/components/avatar';
|
||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import HoverRefWrapper from 'soapbox/components/hover-ref-wrapper';
|
||||
import { Button, HStack } from 'soapbox/components/ui';
|
||||
import DropdownMenu from 'soapbox/containers/dropdown-menu-container';
|
||||
import Accordion from 'soapbox/features/ui/components/accordion';
|
||||
|
|
|
@ -19,7 +19,7 @@ import emojify from 'soapbox/features/emoji/emoji';
|
|||
import Bundle from 'soapbox/features/ui/components/bundle';
|
||||
import { MediaGallery } from 'soapbox/features/ui/util/async-components';
|
||||
import { useAppSelector, useAppDispatch, useRefEventHandler } from 'soapbox/hooks';
|
||||
import { onlyEmoji } from 'soapbox/utils/rich_content';
|
||||
import { onlyEmoji } from 'soapbox/utils/rich-content';
|
||||
|
||||
import type { Menu } from 'soapbox/components/dropdown-menu';
|
||||
import type { ChatMessage as ChatMessageEntity } from 'soapbox/types/entities';
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
toggleChat,
|
||||
} from 'soapbox/actions/chats';
|
||||
import Avatar from 'soapbox/components/avatar';
|
||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import HoverRefWrapper from 'soapbox/components/hover-ref-wrapper';
|
||||
import IconButton from 'soapbox/components/icon-button';
|
||||
import { HStack, Counter } from 'soapbox/components/ui';
|
||||
import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import { length } from 'stringz';
|
||||
|
||||
import ProgressCircle from 'soapbox/components/progress_circle';
|
||||
import ProgressCircle from 'soapbox/components/progress-circle';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'compose.character_counter.title', defaultMessage: 'Used {chars} out of {maxChars} characters' },
|
||||
|
|
|
@ -6,7 +6,7 @@ import { useLocation } from 'react-router-dom';
|
|||
|
||||
import { fetchDirectory, expandDirectory } from 'soapbox/actions/directory';
|
||||
import LoadMore from 'soapbox/components/load-more';
|
||||
import RadioButton from 'soapbox/components/radio_button';
|
||||
import RadioButton from 'soapbox/components/radio-button';
|
||||
import Column from 'soapbox/features/ui/components/column';
|
||||
import { useAppSelector } from 'soapbox/hooks';
|
||||
import { getFeatures } from 'soapbox/utils/features';
|
||||
|
|
|
@ -21,7 +21,7 @@ import {
|
|||
import Streamfield, { StreamfieldComponent } from 'soapbox/components/ui/streamfield/streamfield';
|
||||
import { useAppSelector, useAppDispatch, useOwnAccount, useFeatures } from 'soapbox/hooks';
|
||||
import { normalizeAccount } from 'soapbox/normalizers';
|
||||
import resizeImage from 'soapbox/utils/resize_image';
|
||||
import resizeImage from 'soapbox/utils/resize-image';
|
||||
|
||||
import ProfilePreview from './components/profile-preview';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import { patchMe } from 'soapbox/actions/me';
|
|||
import snackbar from 'soapbox/actions/snackbar';
|
||||
import { Avatar, Button, Card, CardBody, Icon, Spinner, Stack, Text } from 'soapbox/components/ui';
|
||||
import { useOwnAccount } from 'soapbox/hooks';
|
||||
import resizeImage from 'soapbox/utils/resize_image';
|
||||
import resizeImage from 'soapbox/utils/resize-image';
|
||||
|
||||
import type { AxiosError } from 'axios';
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import snackbar from 'soapbox/actions/snackbar';
|
|||
import StillImage from 'soapbox/components/still-image';
|
||||
import { Avatar, Button, Card, CardBody, Icon, Spinner, Stack, Text } from 'soapbox/components/ui';
|
||||
import { useOwnAccount } from 'soapbox/hooks';
|
||||
import resizeImage from 'soapbox/utils/resize_image';
|
||||
import resizeImage from 'soapbox/utils/resize-image';
|
||||
|
||||
import type { AxiosError } from 'axios';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import { useDispatch } from 'react-redux';
|
|||
import { openModal } from 'soapbox/actions/modals';
|
||||
import { HStack, IconButton, Text, Emoji } from 'soapbox/components/ui';
|
||||
import { useAppSelector, useSoapboxConfig, useFeatures } from 'soapbox/hooks';
|
||||
import { reduceEmoji } from 'soapbox/utils/emoji_reacts';
|
||||
import { reduceEmoji } from 'soapbox/utils/emoji-reacts';
|
||||
|
||||
import type { Status } from 'soapbox/types/entities';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import { Link } from 'react-router-dom';
|
|||
|
||||
import { fetchAccountFamiliarFollowers } from 'soapbox/actions/familiar_followers';
|
||||
import { openModal } from 'soapbox/actions/modals';
|
||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import HoverRefWrapper from 'soapbox/components/hover-ref-wrapper';
|
||||
import { Text } from 'soapbox/components/ui';
|
||||
import VerificationBadge from 'soapbox/components/verification-badge';
|
||||
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
||||
|
|
|
@ -7,7 +7,7 @@ import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
|||
import Blurhash from 'soapbox/components/blurhash';
|
||||
import Icon from 'soapbox/components/icon';
|
||||
import { useSettings } from 'soapbox/hooks';
|
||||
import { isPanoramic, isPortrait, minimumAspectRatio, maximumAspectRatio } from 'soapbox/utils/media_aspect_ratio';
|
||||
import { isPanoramic, isPortrait, minimumAspectRatio, maximumAspectRatio } from 'soapbox/utils/media-aspect-ratio';
|
||||
|
||||
import { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen';
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import { normalizeId } from 'soapbox/utils/normalizers';
|
|||
|
||||
import type { AnyAction } from 'redux';
|
||||
import type { APIEntity } from 'soapbox/types/entities';
|
||||
import type { Config } from 'soapbox/utils/config_db';
|
||||
import type { Config } from 'soapbox/utils/config-db';
|
||||
|
||||
const ReducerRecord = ImmutableRecord({
|
||||
reports: ImmutableMap<string, ReducerAdminReport>(),
|
||||
|
|
|
@ -4,7 +4,7 @@ import { ADMIN_CONFIG_UPDATE_REQUEST, ADMIN_CONFIG_UPDATE_SUCCESS } from 'soapbo
|
|||
import { PLEROMA_PRELOAD_IMPORT } from 'soapbox/actions/preload';
|
||||
import { normalizeInstance } from 'soapbox/normalizers/instance';
|
||||
import KVStore from 'soapbox/storage/kv-store';
|
||||
import { ConfigDB } from 'soapbox/utils/config_db';
|
||||
import { ConfigDB } from 'soapbox/utils/config-db';
|
||||
|
||||
import {
|
||||
rememberInstance,
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Map as ImmutableMap, fromJS } from 'immutable';
|
|||
|
||||
import { PLEROMA_PRELOAD_IMPORT } from 'soapbox/actions/preload';
|
||||
import KVStore from 'soapbox/storage/kv-store';
|
||||
import { ConfigDB } from 'soapbox/utils/config_db';
|
||||
import { ConfigDB } from 'soapbox/utils/config-db';
|
||||
|
||||
import { ADMIN_CONFIG_UPDATE_SUCCESS } from '../actions/admin';
|
||||
import {
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
|
|||
|
||||
import emojify from 'soapbox/features/emoji/emoji';
|
||||
import { normalizeStatus } from 'soapbox/normalizers';
|
||||
import { simulateEmojiReact, simulateUnEmojiReact } from 'soapbox/utils/emoji_reacts';
|
||||
import { simulateEmojiReact, simulateUnEmojiReact } from 'soapbox/utils/emoji-reacts';
|
||||
import { stripCompatibilityFeatures, unescapeHTML } from 'soapbox/utils/html';
|
||||
import { makeEmojiMap, normalizeId } from 'soapbox/utils/normalizers';
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { createSelector } from 'reselect';
|
|||
import { getSettings } from 'soapbox/actions/settings';
|
||||
import { getDomain } from 'soapbox/utils/accounts';
|
||||
import { validId } from 'soapbox/utils/auth';
|
||||
import ConfigDB from 'soapbox/utils/config_db';
|
||||
import ConfigDB from 'soapbox/utils/config-db';
|
||||
import { shouldFilter } from 'soapbox/utils/timelines';
|
||||
|
||||
import type { ReducerChat } from 'soapbox/reducers/chats';
|
||||
|
|
|
@ -2,7 +2,7 @@ import { List as ImmutableList, fromJS } from 'immutable';
|
|||
|
||||
import config_db from 'soapbox/__fixtures__/config_db.json';
|
||||
|
||||
import { ConfigDB } from '../config_db';
|
||||
import { ConfigDB } from '../config-db';
|
||||
|
||||
test('find', () => {
|
||||
const configs = fromJS(config_db).get('configs');
|
|
@ -11,7 +11,7 @@ import {
|
|||
getReactForStatus,
|
||||
simulateEmojiReact,
|
||||
simulateUnEmojiReact,
|
||||
} from '../emoji_reacts';
|
||||
} from '../emoji-reacts';
|
||||
|
||||
const ALLOWED_EMOJI = ImmutableList([
|
||||
'👍',
|
|
@ -1,4 +1,4 @@
|
|||
import { processHtml } from './tiny_post_html_processor';
|
||||
import { processHtml } from './tiny-post-html-processor';
|
||||
|
||||
export const addGreentext = (html: string): string => {
|
||||
// Copied from Pleroma FE
|
||||
|
|
Loading…
Reference in a new issue