mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 08:48:53 +00:00
[Glitch] Add a new @/ alias for the root frontend directory and use it where possible
Port 01b6c83c36 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -7,8 +7,8 @@ import classNames from 'classnames';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
|
||||
import LinkIcon from '@/material-icons/400-24px/link.svg?react';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import LinkIcon from 'mastodon/../material-icons/400-24px/link.svg?react';
|
||||
|
||||
|
||||
const filename = url => url.split('/').pop().split('#')[0].split('?')[0];
|
||||
|
||||
@@ -2,9 +2,9 @@ import PropTypes from 'prop-types';
|
||||
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import GroupsIcon from 'mastodon/../material-icons/400-24px/group.svg?react';
|
||||
import PersonIcon from 'mastodon/../material-icons/400-24px/person.svg?react';
|
||||
import SmartToyIcon from 'mastodon/../material-icons/400-24px/smart_toy.svg?react';
|
||||
import GroupsIcon from '@/material-icons/400-24px/group.svg?react';
|
||||
import PersonIcon from '@/material-icons/400-24px/person.svg?react';
|
||||
import SmartToyIcon from '@/material-icons/400-24px/smart_toy.svg?react';
|
||||
|
||||
|
||||
export const Badge = ({ icon, label, domain }) => (
|
||||
|
||||
@@ -2,9 +2,9 @@ import { useCallback } from 'react';
|
||||
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import ArrowBackIcon from '@/material-icons/400-24px/arrow_back.svg?react';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import { ButtonInTabsBar } from 'flavours/glitch/features/ui/util/columns_context';
|
||||
import ArrowBackIcon from 'mastodon/../material-icons/400-24px/arrow_back.svg?react';
|
||||
|
||||
import { useAppHistory } from './router';
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@ import { FormattedMessage, injectIntl, defineMessages } from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
|
||||
import AddIcon from '@/material-icons/400-24px/add.svg?react';
|
||||
import ArrowBackIcon from '@/material-icons/400-24px/arrow_back.svg?react';
|
||||
import ChevronLeftIcon from '@/material-icons/400-24px/chevron_left.svg?react';
|
||||
import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react';
|
||||
import CloseIcon from '@/material-icons/400-24px/close.svg?react';
|
||||
import TuneIcon from '@/material-icons/400-24px/tune.svg?react';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import { ButtonInTabsBar, useColumnsContext } from 'flavours/glitch/features/ui/util/columns_context';
|
||||
import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router';
|
||||
import AddIcon from 'mastodon/../material-icons/400-24px/add.svg?react';
|
||||
import ArrowBackIcon from 'mastodon/../material-icons/400-24px/arrow_back.svg?react';
|
||||
import ChevronLeftIcon from 'mastodon/../material-icons/400-24px/chevron_left.svg?react';
|
||||
import ChevronRightIcon from 'mastodon/../material-icons/400-24px/chevron_right.svg?react';
|
||||
import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react';
|
||||
import TuneIcon from 'mastodon/../material-icons/400-24px/tune.svg?react';
|
||||
|
||||
|
||||
import { useAppHistory } from './router';
|
||||
|
||||
@@ -8,10 +8,10 @@ import { useCallback, useState, useEffect } from 'react';
|
||||
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
|
||||
import CloseIcon from '@/material-icons/400-24px/close.svg?react';
|
||||
import { changeSetting } from 'flavours/glitch/actions/settings';
|
||||
import { bannerSettings } from 'flavours/glitch/settings';
|
||||
import { useAppSelector, useAppDispatch } from 'flavours/glitch/store';
|
||||
import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react';
|
||||
|
||||
import { IconButton } from './icon_button';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useCallback } from 'react';
|
||||
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
|
||||
import LockOpenIcon from 'mastodon/../material-icons/400-24px/lock_open.svg?react';
|
||||
import LockOpenIcon from '@/material-icons/400-24px/lock_open.svg?react';
|
||||
|
||||
import { IconButton } from './icon_button';
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { supportsPassiveEvents } from 'detect-passive-events';
|
||||
import Overlay from 'react-overlays/Overlay';
|
||||
|
||||
import CloseIcon from '@/material-icons/400-24px/close.svg?react';
|
||||
import { CircularProgress } from 'flavours/glitch/components/circular_progress';
|
||||
import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router';
|
||||
import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react';
|
||||
|
||||
import { IconButton } from './icon_button';
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ import { FormattedMessage, injectIntl } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
|
||||
import ArrowDropDownIcon from '@/material-icons/400-24px/arrow_drop_down.svg?react';
|
||||
import { openModal } from 'flavours/glitch/actions/modal';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import InlineAccount from 'flavours/glitch/components/inline_account';
|
||||
import { RelativeTimestamp } from 'flavours/glitch/components/relative_timestamp';
|
||||
import ArrowDropDownIcon from 'mastodon/../material-icons/400-24px/arrow_drop_down.svg?react';
|
||||
|
||||
import DropdownMenu from './containers/dropdown_menu_container';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import classNames from 'classnames';
|
||||
|
||||
import CheckBoxOutlineBlankIcon from '@/material-icons/400-24px/check_box_outline_blank.svg?react';
|
||||
import { isProduction } from 'flavours/glitch/utils/environment';
|
||||
import CheckBoxOutlineBlankIcon from 'mastodon/../material-icons/400-24px/check_box_outline_blank.svg?react';
|
||||
|
||||
interface SVGPropsWithTitle extends React.SVGProps<SVGSVGElement> {
|
||||
title?: string;
|
||||
|
||||
@@ -2,8 +2,8 @@ import { useCallback } from 'react';
|
||||
|
||||
import { useIntl, defineMessages } from 'react-intl';
|
||||
|
||||
import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import MoreHorizIcon from 'mastodon/../material-icons/400-24px/more_horiz.svg?react';
|
||||
|
||||
const messages = defineMessages({
|
||||
load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import logo from 'mastodon/../images/logo.svg';
|
||||
import logo from '@/images/logo.svg';
|
||||
|
||||
export const WordmarkLogo = () => (
|
||||
<svg viewBox='0 0 261 66' className='logo logo--wordmark' role='img'>
|
||||
|
||||
@@ -10,8 +10,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
||||
import { debounce } from 'lodash';
|
||||
|
||||
import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react';
|
||||
import { Blurhash } from 'flavours/glitch/components/blurhash';
|
||||
import VisibilityOffIcon from 'mastodon/../material-icons/400-24px/visibility_off.svg?react';
|
||||
|
||||
import { autoPlayGif, displayMedia, useBlurhash } from '../initial_state';
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ import classNames from 'classnames';
|
||||
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
|
||||
import DeleteIcon from '@/material-icons/400-24px/delete.svg?react';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import DeleteIcon from 'mastodon/../material-icons/400-24px/delete.svg?react';
|
||||
|
||||
|
||||
const messages = defineMessages({
|
||||
|
||||
@@ -6,9 +6,9 @@ import { FormattedMessage } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
|
||||
import CancelPresentationIcon from '@/material-icons/400-24px/cancel_presentation.svg?react';
|
||||
import { removePictureInPicture } from 'flavours/glitch/actions/picture_in_picture';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import CancelPresentationIcon from 'mastodon/../material-icons/400-24px/cancel_presentation.svg?react';
|
||||
|
||||
class PictureInPicturePlaceholder extends PureComponent {
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import escapeTextContentForBrowser from 'escape-html';
|
||||
import spring from 'react-motion/lib/spring';
|
||||
|
||||
import CheckIcon from '@/material-icons/400-24px/check.svg?react';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import emojify from 'flavours/glitch/features/emoji/emoji';
|
||||
import Motion from 'flavours/glitch/features/ui/util/optional_motion';
|
||||
import CheckIcon from 'mastodon/../material-icons/400-24px/check.svg?react';
|
||||
|
||||
import { RelativeTimestamp } from './relative_timestamp';
|
||||
|
||||
|
||||
@@ -8,20 +8,20 @@ import { withRouter } from 'react-router-dom';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
|
||||
import BookmarkIcon from '@/material-icons/400-24px/bookmark-fill.svg?react';
|
||||
import BookmarkBorderIcon from '@/material-icons/400-24px/bookmark.svg?react';
|
||||
import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react';
|
||||
import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react';
|
||||
import ReplyIcon from '@/material-icons/400-24px/reply.svg?react';
|
||||
import ReplyAllIcon from '@/material-icons/400-24px/reply_all.svg?react';
|
||||
import StarIcon from '@/material-icons/400-24px/star-fill.svg?react';
|
||||
import StarBorderIcon from '@/material-icons/400-24px/star.svg?react';
|
||||
import VisibilityIcon from '@/material-icons/400-24px/visibility.svg?react';
|
||||
import RepeatDisabledIcon from '@/svg-icons/repeat_disabled.svg';
|
||||
import RepeatPrivateIcon from '@/svg-icons/repeat_private.svg';
|
||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'flavours/glitch/permissions';
|
||||
import { accountAdminLink, statusAdminLink } from 'flavours/glitch/utils/backend_links';
|
||||
import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router';
|
||||
import BookmarkIcon from 'mastodon/../material-icons/400-24px/bookmark-fill.svg?react';
|
||||
import BookmarkBorderIcon from 'mastodon/../material-icons/400-24px/bookmark.svg?react';
|
||||
import MoreHorizIcon from 'mastodon/../material-icons/400-24px/more_horiz.svg?react';
|
||||
import RepeatIcon from 'mastodon/../material-icons/400-24px/repeat.svg?react';
|
||||
import ReplyIcon from 'mastodon/../material-icons/400-24px/reply.svg?react';
|
||||
import ReplyAllIcon from 'mastodon/../material-icons/400-24px/reply_all.svg?react';
|
||||
import StarIcon from 'mastodon/../material-icons/400-24px/star-fill.svg?react';
|
||||
import StarBorderIcon from 'mastodon/../material-icons/400-24px/star.svg?react';
|
||||
import VisibilityIcon from 'mastodon/../material-icons/400-24px/visibility.svg?react';
|
||||
import RepeatDisabledIcon from 'mastodon/../svg-icons/repeat_disabled.svg';
|
||||
import RepeatPrivateIcon from 'mastodon/../svg-icons/repeat_private.svg';
|
||||
|
||||
import DropdownMenuContainer from '../containers/dropdown_menu_container';
|
||||
import { me } from '../initial_state';
|
||||
|
||||
@@ -9,14 +9,14 @@ import { withRouter } from 'react-router-dom';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import ImageIcon from '@/material-icons/400-24px/image.svg?react';
|
||||
import InsertChartIcon from '@/material-icons/400-24px/insert_chart.svg?react';
|
||||
import LinkIcon from '@/material-icons/400-24px/link.svg?react';
|
||||
import MovieIcon from '@/material-icons/400-24px/movie.svg?react';
|
||||
import MusicNoteIcon from '@/material-icons/400-24px/music_note.svg?react';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import { autoPlayGif, languages as preloadedLanguages } from 'flavours/glitch/initial_state';
|
||||
import { decode as decodeIDNA } from 'flavours/glitch/utils/idna';
|
||||
import ImageIcon from 'mastodon/../material-icons/400-24px/image.svg?react';
|
||||
import InsertChartIcon from 'mastodon/../material-icons/400-24px/insert_chart.svg?react';
|
||||
import LinkIcon from 'mastodon/../material-icons/400-24px/link.svg?react';
|
||||
import MovieIcon from 'mastodon/../material-icons/400-24px/movie.svg?react';
|
||||
import MusicNoteIcon from 'mastodon/../material-icons/400-24px/music_note.svg?react';
|
||||
|
||||
|
||||
import { Permalink } from './permalink';
|
||||
|
||||
@@ -6,16 +6,16 @@ import { defineMessages, injectIntl } from 'react-intl';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
||||
import ExpandLessIcon from '@/material-icons/400-24px/expand_less.svg?react';
|
||||
import ForumIcon from '@/material-icons/400-24px/forum.svg?react';
|
||||
import HomeIcon from '@/material-icons/400-24px/home.svg?react';
|
||||
import ImageIcon from '@/material-icons/400-24px/image.svg?react';
|
||||
import InsertChartIcon from '@/material-icons/400-24px/insert_chart.svg?react';
|
||||
import LinkIcon from '@/material-icons/400-24px/link.svg?react';
|
||||
import MovieIcon from '@/material-icons/400-24px/movie.svg?react';
|
||||
import MusicNoteIcon from '@/material-icons/400-24px/music_note.svg?react';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import { languages } from 'flavours/glitch/initial_state';
|
||||
import ExpandLessIcon from 'mastodon/../material-icons/400-24px/expand_less.svg?react';
|
||||
import ForumIcon from 'mastodon/../material-icons/400-24px/forum.svg?react';
|
||||
import HomeIcon from 'mastodon/../material-icons/400-24px/home.svg?react';
|
||||
import ImageIcon from 'mastodon/../material-icons/400-24px/image.svg?react';
|
||||
import InsertChartIcon from 'mastodon/../material-icons/400-24px/insert_chart.svg?react';
|
||||
import LinkIcon from 'mastodon/../material-icons/400-24px/link.svg?react';
|
||||
import MovieIcon from 'mastodon/../material-icons/400-24px/movie.svg?react';
|
||||
import MusicNoteIcon from 'mastodon/../material-icons/400-24px/music_note.svg?react';
|
||||
|
||||
|
||||
import { IconButton } from './icon_button';
|
||||
|
||||
@@ -6,14 +6,14 @@ import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
||||
import EditIcon from '@/material-icons/400-24px/edit.svg?react';
|
||||
import HomeIcon from '@/material-icons/400-24px/home-fill.svg?react';
|
||||
import InsertChartIcon from '@/material-icons/400-24px/insert_chart.svg?react';
|
||||
import PushPinIcon from '@/material-icons/400-24px/push_pin.svg?react';
|
||||
import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react';
|
||||
import StarIcon from '@/material-icons/400-24px/star-fill.svg?react';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import { me } from 'flavours/glitch/initial_state';
|
||||
import EditIcon from 'mastodon/../material-icons/400-24px/edit.svg?react';
|
||||
import HomeIcon from 'mastodon/../material-icons/400-24px/home-fill.svg?react';
|
||||
import InsertChartIcon from 'mastodon/../material-icons/400-24px/insert_chart.svg?react';
|
||||
import PushPinIcon from 'mastodon/../material-icons/400-24px/push_pin.svg?react';
|
||||
import RepeatIcon from 'mastodon/../material-icons/400-24px/repeat.svg?react';
|
||||
import StarIcon from 'mastodon/../material-icons/400-24px/star-fill.svg?react';
|
||||
|
||||
|
||||
export default class StatusPrepend extends PureComponent {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import CheckIcon from 'mastodon/../material-icons/400-24px/check.svg?react';
|
||||
import CheckIcon from '@/material-icons/400-24px/check.svg?react';
|
||||
|
||||
import { Icon } from './icon';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
|
||||
import LockIcon from 'mastodon/../material-icons/400-24px/lock.svg?react';
|
||||
import LockOpenIcon from 'mastodon/../material-icons/400-24px/lock_open.svg?react';
|
||||
import MailIcon from 'mastodon/../material-icons/400-24px/mail.svg?react';
|
||||
import PublicIcon from 'mastodon/../material-icons/400-24px/public.svg?react';
|
||||
import LockIcon from '@/material-icons/400-24px/lock.svg?react';
|
||||
import LockOpenIcon from '@/material-icons/400-24px/lock_open.svg?react';
|
||||
import MailIcon from '@/material-icons/400-24px/mail.svg?react';
|
||||
import PublicIcon from '@/material-icons/400-24px/public.svg?react';
|
||||
|
||||
import { Icon } from './icon';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user