From 01b6c83c369061c2175d50dfb3ae1db502862664 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Tue, 16 Jan 2024 11:27:26 +0100 Subject: [PATCH] Add a new `@/` alias for the root frontend directory and use it where possible (#28753) --- .../mastodon/components/attachment_list.jsx | 2 +- app/javascript/mastodon/components/badge.jsx | 6 ++--- .../components/column_back_button.tsx | 2 +- .../mastodon/components/column_header.jsx | 12 +++++----- .../mastodon/components/copy_icon_button.jsx | 2 +- .../components/dismissable_banner.tsx | 2 +- app/javascript/mastodon/components/domain.tsx | 2 +- .../mastodon/components/dropdown_menu.jsx | 2 +- .../components/edited_timestamp/index.jsx | 2 +- app/javascript/mastodon/components/icon.tsx | 2 +- .../mastodon/components/load_gap.tsx | 2 +- app/javascript/mastodon/components/logo.tsx | 2 +- .../mastodon/components/media_gallery.jsx | 2 +- .../picture_in_picture_placeholder.jsx | 2 +- app/javascript/mastodon/components/poll.jsx | 2 +- .../components/regeneration_indicator.jsx | 2 +- app/javascript/mastodon/components/status.jsx | 8 +++---- .../mastodon/components/status_action_bar.jsx | 22 +++++++++---------- .../mastodon/components/status_content.jsx | 2 +- .../mastodon/components/verified_badge.tsx | 2 +- .../mastodon/components/visibility_icon.tsx | 8 +++---- .../mastodon/features/about/index.jsx | 4 ++-- .../components/follow_request_note.jsx | 4 ++-- .../features/account/components/header.jsx | 12 +++++----- .../account_gallery/components/media_item.jsx | 6 ++--- .../mastodon/features/audio/index.jsx | 12 +++++----- .../mastodon/features/blocks/index.jsx | 2 +- .../features/bookmarked_statuses/index.jsx | 2 +- .../features/community_timeline/index.jsx | 2 +- .../compose/components/action_bar.jsx | 2 +- .../compose/components/compose_form.jsx | 2 +- .../compose/components/poll_button.jsx | 2 +- .../features/compose/components/poll_form.jsx | 4 ++-- .../compose/components/privacy_dropdown.jsx | 8 +++---- .../compose/components/reply_indicator.jsx | 2 +- .../features/compose/components/search.jsx | 6 ++--- .../compose/components/search_results.jsx | 8 +++---- .../features/compose/components/upload.jsx | 6 ++--- .../compose/components/upload_button.jsx | 2 +- .../compose/components/upload_progress.jsx | 2 +- .../mastodon/features/compose/index.jsx | 14 ++++++------ .../components/conversation.jsx | 4 ++-- .../features/direct_timeline/index.jsx | 2 +- .../mastodon/features/directory/index.jsx | 2 +- .../mastodon/features/domain_blocks/index.jsx | 2 +- .../mastodon/features/explore/index.jsx | 4 ++-- .../mastodon/features/explore/results.jsx | 6 ++--- .../features/favourited_statuses/index.jsx | 2 +- .../mastodon/features/favourites/index.jsx | 2 +- .../features/filters/select_filter.jsx | 2 +- .../mastodon/features/firehose/index.jsx | 2 +- .../components/account_authorize.jsx | 4 ++-- .../features/follow_requests/index.jsx | 2 +- .../mastodon/features/followed_tags/index.jsx | 2 +- .../components/announcements.jsx | 8 +++---- .../features/getting_started/index.jsx | 22 +++++++++---------- .../features/hashtag_timeline/index.jsx | 2 +- .../components/explore_prompt.tsx | 2 +- .../mastodon/features/home_timeline/index.jsx | 4 ++-- .../features/interaction_modal/index.jsx | 8 +++---- .../features/keyboard_shortcuts/index.jsx | 2 +- .../features/list_adder/components/list.jsx | 6 ++--- .../list_editor/components/account.jsx | 4 ++-- .../list_editor/components/edit_list_form.jsx | 2 +- .../list_editor/components/search.jsx | 4 ++-- .../mastodon/features/list_timeline/index.jsx | 6 ++--- .../mastodon/features/lists/index.jsx | 2 +- .../mastodon/features/mutes/index.jsx | 2 +- .../components/clear_column_button.jsx | 2 +- .../notifications/components/filter_bar.jsx | 12 +++++----- .../components/follow_request.jsx | 4 ++-- .../notifications/components/notification.jsx | 16 +++++++------- .../notifications_permission_banner.jsx | 4 ++-- .../mastodon/features/notifications/index.jsx | 4 ++-- .../features/onboarding/components/step.jsx | 4 ++-- .../mastodon/features/onboarding/index.jsx | 12 +++++----- .../mastodon/features/onboarding/profile.jsx | 4 ++-- .../mastodon/features/onboarding/share.jsx | 4 ++-- .../picture_in_picture/components/footer.jsx | 10 ++++----- .../picture_in_picture/components/header.jsx | 2 +- .../features/pinned_statuses/index.jsx | 2 +- .../features/public_timeline/index.jsx | 2 +- .../mastodon/features/reblogs/index.jsx | 2 +- .../features/report/components/option.jsx | 2 +- .../features/status/components/action_bar.jsx | 20 ++++++++--------- .../features/status/components/card.jsx | 6 ++--- .../status/components/detailed_status.jsx | 6 ++--- .../mastodon/features/status/index.jsx | 4 ++-- .../subscribed_languages_modal/index.jsx | 2 +- .../features/ui/components/boost_modal.jsx | 2 +- .../ui/components/bundle_modal_error.jsx | 2 +- .../ui/components/compare_history_modal.jsx | 2 +- .../features/ui/components/embed_modal.jsx | 2 +- .../features/ui/components/filter_modal.jsx | 2 +- .../ui/components/focal_point_modal.jsx | 2 +- .../follow_requests_column_link.jsx | 2 +- .../features/ui/components/header.jsx | 2 +- .../features/ui/components/image_modal.jsx | 2 +- .../features/ui/components/list_panel.jsx | 2 +- .../features/ui/components/media_modal.jsx | 6 ++--- .../ui/components/navigation_panel.jsx | 20 ++++++++--------- .../components/notifications_counter_icon.js | 2 +- .../features/ui/components/report_modal.jsx | 2 +- .../features/ui/components/zoomable_image.jsx | 4 ++-- .../mastodon/features/video/index.jsx | 16 +++++++------- config/webpack/shared.js | 3 +++ lib/tasks/icons.rake | 2 +- tsconfig.json | 3 ++- 108 files changed, 253 insertions(+), 249 deletions(-) diff --git a/app/javascript/mastodon/components/attachment_list.jsx b/app/javascript/mastodon/components/attachment_list.jsx index 59d31a303..c5ac04675 100644 --- a/app/javascript/mastodon/components/attachment_list.jsx +++ b/app/javascript/mastodon/components/attachment_list.jsx @@ -7,7 +7,7 @@ import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import LinkIcon from 'mastodon/../material-icons/400-24px/link.svg?react'; +import LinkIcon from '@/material-icons/400-24px/link.svg?react'; import { Icon } from 'mastodon/components/icon'; const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; diff --git a/app/javascript/mastodon/components/badge.jsx b/app/javascript/mastodon/components/badge.jsx index bac809656..646655c24 100644 --- a/app/javascript/mastodon/components/badge.jsx +++ b/app/javascript/mastodon/components/badge.jsx @@ -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 }) => ( diff --git a/app/javascript/mastodon/components/column_back_button.tsx b/app/javascript/mastodon/components/column_back_button.tsx index f803f8628..af38c1e11 100644 --- a/app/javascript/mastodon/components/column_back_button.tsx +++ b/app/javascript/mastodon/components/column_back_button.tsx @@ -2,7 +2,7 @@ import { useCallback } from 'react'; import { FormattedMessage } from 'react-intl'; -import ArrowBackIcon from 'mastodon/../material-icons/400-24px/arrow_back.svg?react'; +import ArrowBackIcon from '@/material-icons/400-24px/arrow_back.svg?react'; import { Icon } from 'mastodon/components/icon'; import { ButtonInTabsBar } from 'mastodon/features/ui/util/columns_context'; diff --git a/app/javascript/mastodon/components/column_header.jsx b/app/javascript/mastodon/components/column_header.jsx index 3e53902de..901888e75 100644 --- a/app/javascript/mastodon/components/column_header.jsx +++ b/app/javascript/mastodon/components/column_header.jsx @@ -6,12 +6,12 @@ import { FormattedMessage, injectIntl, defineMessages } from 'react-intl'; import classNames from 'classnames'; import { withRouter } from 'react-router-dom'; -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 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 'mastodon/components/icon'; import { ButtonInTabsBar, useColumnsContext } from 'mastodon/features/ui/util/columns_context'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; diff --git a/app/javascript/mastodon/components/copy_icon_button.jsx b/app/javascript/mastodon/components/copy_icon_button.jsx index c5216e8f8..0c3c6c290 100644 --- a/app/javascript/mastodon/components/copy_icon_button.jsx +++ b/app/javascript/mastodon/components/copy_icon_button.jsx @@ -7,7 +7,7 @@ import classNames from 'classnames'; import { useDispatch } from 'react-redux'; -import ContentCopyIcon from 'mastodon/../material-icons/400-24px/content_copy.svg?react'; +import ContentCopyIcon from '@/material-icons/400-24px/content_copy.svg?react'; import { showAlert } from 'mastodon/actions/alerts'; import { IconButton } from 'mastodon/components/icon_button'; diff --git a/app/javascript/mastodon/components/dismissable_banner.tsx b/app/javascript/mastodon/components/dismissable_banner.tsx index d3bc28b9b..bc40e46f8 100644 --- a/app/javascript/mastodon/components/dismissable_banner.tsx +++ b/app/javascript/mastodon/components/dismissable_banner.tsx @@ -8,7 +8,7 @@ import { useCallback, useState, useEffect } from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { changeSetting } from 'mastodon/actions/settings'; import { bannerSettings } from 'mastodon/settings'; import { useAppSelector, useAppDispatch } from 'mastodon/store'; diff --git a/app/javascript/mastodon/components/domain.tsx b/app/javascript/mastodon/components/domain.tsx index 637c286ce..ed5e8e7e4 100644 --- a/app/javascript/mastodon/components/domain.tsx +++ b/app/javascript/mastodon/components/domain.tsx @@ -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'; diff --git a/app/javascript/mastodon/components/dropdown_menu.jsx b/app/javascript/mastodon/components/dropdown_menu.jsx index a8fcfd109..04c8bb098 100644 --- a/app/javascript/mastodon/components/dropdown_menu.jsx +++ b/app/javascript/mastodon/components/dropdown_menu.jsx @@ -9,7 +9,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { supportsPassiveEvents } from 'detect-passive-events'; import Overlay from 'react-overlays/Overlay'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { CircularProgress } from 'mastodon/components/circular_progress'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; diff --git a/app/javascript/mastodon/components/edited_timestamp/index.jsx b/app/javascript/mastodon/components/edited_timestamp/index.jsx index 7497ab992..4ca00f8dd 100644 --- a/app/javascript/mastodon/components/edited_timestamp/index.jsx +++ b/app/javascript/mastodon/components/edited_timestamp/index.jsx @@ -5,7 +5,7 @@ import { FormattedMessage, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; -import ArrowDropDownIcon from 'mastodon/../material-icons/400-24px/arrow_drop_down.svg?react'; +import ArrowDropDownIcon from '@/material-icons/400-24px/arrow_drop_down.svg?react'; import { openModal } from 'mastodon/actions/modal'; import { Icon } from 'mastodon/components/icon'; import InlineAccount from 'mastodon/components/inline_account'; diff --git a/app/javascript/mastodon/components/icon.tsx b/app/javascript/mastodon/components/icon.tsx index 948492d91..f388380c4 100644 --- a/app/javascript/mastodon/components/icon.tsx +++ b/app/javascript/mastodon/components/icon.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; -import CheckBoxOutlineBlankIcon from 'mastodon/../material-icons/400-24px/check_box_outline_blank.svg?react'; +import CheckBoxOutlineBlankIcon from '@/material-icons/400-24px/check_box_outline_blank.svg?react'; import { isProduction } from 'mastodon/utils/environment'; interface SVGPropsWithTitle extends React.SVGProps { diff --git a/app/javascript/mastodon/components/load_gap.tsx b/app/javascript/mastodon/components/load_gap.tsx index 2a233b6a1..1d4193a35 100644 --- a/app/javascript/mastodon/components/load_gap.tsx +++ b/app/javascript/mastodon/components/load_gap.tsx @@ -2,7 +2,7 @@ import { useCallback } from 'react'; import { useIntl, defineMessages } from 'react-intl'; -import MoreHorizIcon from 'mastodon/../material-icons/400-24px/more_horiz.svg?react'; +import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react'; import { Icon } from 'mastodon/components/icon'; const messages = defineMessages({ diff --git a/app/javascript/mastodon/components/logo.tsx b/app/javascript/mastodon/components/logo.tsx index 928aa29a7..b7f8bd669 100644 --- a/app/javascript/mastodon/components/logo.tsx +++ b/app/javascript/mastodon/components/logo.tsx @@ -1,4 +1,4 @@ -import logo from 'mastodon/../images/logo.svg'; +import logo from '@/images/logo.svg'; export const WordmarkLogo: React.FC = () => ( diff --git a/app/javascript/mastodon/components/media_gallery.jsx b/app/javascript/mastodon/components/media_gallery.jsx index c387bb869..e5200371a 100644 --- a/app/javascript/mastodon/components/media_gallery.jsx +++ b/app/javascript/mastodon/components/media_gallery.jsx @@ -10,7 +10,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; -import VisibilityOffIcon from 'mastodon/../material-icons/400-24px/visibility_off.svg?react'; +import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react'; import { Blurhash } from 'mastodon/components/blurhash'; import { autoPlayGif, displayMedia, useBlurhash } from '../initial_state'; diff --git a/app/javascript/mastodon/components/picture_in_picture_placeholder.jsx b/app/javascript/mastodon/components/picture_in_picture_placeholder.jsx index e8cfe6cb3..50f91a927 100644 --- a/app/javascript/mastodon/components/picture_in_picture_placeholder.jsx +++ b/app/javascript/mastodon/components/picture_in_picture_placeholder.jsx @@ -5,7 +5,7 @@ import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; -import CancelPresentationIcon from 'mastodon/../material-icons/400-24px/cancel_presentation.svg?react'; +import CancelPresentationIcon from '@/material-icons/400-24px/cancel_presentation.svg?react'; import { removePictureInPicture } from 'mastodon/actions/picture_in_picture'; import { Icon } from 'mastodon/components/icon'; diff --git a/app/javascript/mastodon/components/poll.jsx b/app/javascript/mastodon/components/poll.jsx index f85c47bb4..c7036d111 100644 --- a/app/javascript/mastodon/components/poll.jsx +++ b/app/javascript/mastodon/components/poll.jsx @@ -10,7 +10,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import escapeTextContentForBrowser from 'escape-html'; import spring from 'react-motion/lib/spring'; -import CheckIcon from 'mastodon/../material-icons/400-24px/check.svg?react'; +import CheckIcon from '@/material-icons/400-24px/check.svg?react'; import { Icon } from 'mastodon/components/icon'; import emojify from 'mastodon/features/emoji/emoji'; import Motion from 'mastodon/features/ui/util/optional_motion'; diff --git a/app/javascript/mastodon/components/regeneration_indicator.jsx b/app/javascript/mastodon/components/regeneration_indicator.jsx index 052e25f25..d42a7d7c7 100644 --- a/app/javascript/mastodon/components/regeneration_indicator.jsx +++ b/app/javascript/mastodon/components/regeneration_indicator.jsx @@ -1,6 +1,6 @@ import { FormattedMessage } from 'react-intl'; -import illustration from 'mastodon/../images/elephant_ui_working.svg'; +import illustration from '@/images/elephant_ui_working.svg'; const RegenerationIndicator = () => (
diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index 224c8bade..ff4fe9252 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -9,10 +9,10 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { HotKeys } from 'react-hotkeys'; -import AlternateEmailIcon from 'mastodon/../material-icons/400-24px/alternate_email.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 ReplyIcon from 'mastodon/../material-icons/400-24px/reply.svg?react'; +import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react'; +import PushPinIcon from '@/material-icons/400-24px/push_pin.svg?react'; +import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react'; +import ReplyIcon from '@/material-icons/400-24px/reply.svg?react'; import { Icon } from 'mastodon/components/icon'; import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder'; import { withOptionalRouter, WithOptionalRouterPropTypes } from 'mastodon/utils/react_router'; diff --git a/app/javascript/mastodon/components/status_action_bar.jsx b/app/javascript/mastodon/components/status_action_bar.jsx index e1e016464..bfe77a490 100644 --- a/app/javascript/mastodon/components/status_action_bar.jsx +++ b/app/javascript/mastodon/components/status_action_bar.jsx @@ -9,17 +9,17 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import BookmarkIcon from 'mastodon/../material-icons/400-24px/bookmark-fill.svg'; -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?react'; -import RepeatPrivateIcon from 'mastodon/../svg-icons/repeat_private.svg?react'; +import BookmarkIcon from '@/material-icons/400-24px/bookmark-fill.svg'; +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?react'; +import RepeatPrivateIcon from '@/svg-icons/repeat_private.svg?react'; import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; diff --git a/app/javascript/mastodon/components/status_content.jsx b/app/javascript/mastodon/components/status_content.jsx index 6f28f6d6d..4a7ba941e 100644 --- a/app/javascript/mastodon/components/status_content.jsx +++ b/app/javascript/mastodon/components/status_content.jsx @@ -9,7 +9,7 @@ import { Link, withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; -import ChevronRightIcon from 'mastodon/../material-icons/400-24px/chevron_right.svg?react'; +import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react'; import { Icon } from 'mastodon/components/icon'; import PollContainer from 'mastodon/containers/poll_container'; import { autoPlayGif, languages as preloadedLanguages } from 'mastodon/initial_state'; diff --git a/app/javascript/mastodon/components/verified_badge.tsx b/app/javascript/mastodon/components/verified_badge.tsx index 4209f6831..626cc500d 100644 --- a/app/javascript/mastodon/components/verified_badge.tsx +++ b/app/javascript/mastodon/components/verified_badge.tsx @@ -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'; diff --git a/app/javascript/mastodon/components/visibility_icon.tsx b/app/javascript/mastodon/components/visibility_icon.tsx index 1a7526142..d6ad4095e 100644 --- a/app/javascript/mastodon/components/visibility_icon.tsx +++ b/app/javascript/mastodon/components/visibility_icon.tsx @@ -1,9 +1,9 @@ import { defineMessages, useIntl } from 'react-intl'; -import AlternateEmailIcon from 'mastodon/../material-icons/400-24px/alternate_email.svg?react'; -import LockIcon from 'mastodon/../material-icons/400-24px/lock.svg?react'; -import LockOpenIcon from 'mastodon/../material-icons/400-24px/lock_open.svg?react'; -import PublicIcon from 'mastodon/../material-icons/400-24px/public.svg?react'; +import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react'; +import LockIcon from '@/material-icons/400-24px/lock.svg?react'; +import LockOpenIcon from '@/material-icons/400-24px/lock_open.svg?react'; +import PublicIcon from '@/material-icons/400-24px/public.svg?react'; import { Icon } from './icon'; diff --git a/app/javascript/mastodon/features/about/index.jsx b/app/javascript/mastodon/features/about/index.jsx index bffac6357..3287631ed 100644 --- a/app/javascript/mastodon/features/about/index.jsx +++ b/app/javascript/mastodon/features/about/index.jsx @@ -10,8 +10,8 @@ import { List as ImmutableList } from 'immutable'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; -import ChevronRightIcon from 'mastodon/../material-icons/400-24px/chevron_right.svg?react'; -import ExpandMoreIcon from 'mastodon/../material-icons/400-24px/expand_more.svg?react'; +import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react'; +import ExpandMoreIcon from '@/material-icons/400-24px/expand_more.svg?react'; import { fetchServer, fetchExtendedDescription, fetchDomainBlocks } from 'mastodon/actions/server'; import Column from 'mastodon/components/column'; import { Icon } from 'mastodon/components/icon'; diff --git a/app/javascript/mastodon/features/account/components/follow_request_note.jsx b/app/javascript/mastodon/features/account/components/follow_request_note.jsx index a8b61f9ea..d57fd030b 100644 --- a/app/javascript/mastodon/features/account/components/follow_request_note.jsx +++ b/app/javascript/mastodon/features/account/components/follow_request_note.jsx @@ -3,8 +3,8 @@ import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import CheckIcon from 'mastodon/../material-icons/400-24px/check.svg?react'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CheckIcon from '@/material-icons/400-24px/check.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { Icon } from 'mastodon/components/icon'; export default class FollowRequestNote extends ImmutablePureComponent { diff --git a/app/javascript/mastodon/features/account/components/header.jsx b/app/javascript/mastodon/features/account/components/header.jsx index 6f58ae35f..233d208c6 100644 --- a/app/javascript/mastodon/features/account/components/header.jsx +++ b/app/javascript/mastodon/features/account/components/header.jsx @@ -9,12 +9,12 @@ import { NavLink, withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import CheckIcon from 'mastodon/../material-icons/400-24px/check.svg?react'; -import LockIcon from 'mastodon/../material-icons/400-24px/lock.svg?react'; -import MoreHorizIcon from 'mastodon/../material-icons/400-24px/more_horiz.svg?react'; -import NotificationsIcon from 'mastodon/../material-icons/400-24px/notifications.svg?react'; -import NotificationsActiveIcon from 'mastodon/../material-icons/400-24px/notifications_active-fill.svg?react'; -import ShareIcon from 'mastodon/../material-icons/400-24px/share.svg?react'; +import CheckIcon from '@/material-icons/400-24px/check.svg?react'; +import LockIcon from '@/material-icons/400-24px/lock.svg?react'; +import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react'; +import NotificationsIcon from '@/material-icons/400-24px/notifications.svg?react'; +import NotificationsActiveIcon from '@/material-icons/400-24px/notifications_active-fill.svg?react'; +import ShareIcon from '@/material-icons/400-24px/share.svg?react'; import { Avatar } from 'mastodon/components/avatar'; import { Badge, AutomatedBadge, GroupBadge } from 'mastodon/components/badge'; import { Button } from 'mastodon/components/button'; diff --git a/app/javascript/mastodon/features/account_gallery/components/media_item.jsx b/app/javascript/mastodon/features/account_gallery/components/media_item.jsx index a35092893..087e77575 100644 --- a/app/javascript/mastodon/features/account_gallery/components/media_item.jsx +++ b/app/javascript/mastodon/features/account_gallery/components/media_item.jsx @@ -5,9 +5,9 @@ import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import AudiotrackIcon from 'mastodon/../material-icons/400-24px/music_note.svg?react'; -import PlayArrowIcon from 'mastodon/../material-icons/400-24px/play_arrow.svg?react'; -import VisibilityOffIcon from 'mastodon/../material-icons/400-24px/visibility_off.svg?react'; +import AudiotrackIcon from '@/material-icons/400-24px/music_note.svg?react'; +import PlayArrowIcon from '@/material-icons/400-24px/play_arrow.svg?react'; +import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react'; import { Blurhash } from 'mastodon/components/blurhash'; import { Icon } from 'mastodon/components/icon'; import { autoPlayGif, displayMedia, useBlurhash } from 'mastodon/initial_state'; diff --git a/app/javascript/mastodon/features/audio/index.jsx b/app/javascript/mastodon/features/audio/index.jsx index 9008e0538..fdc1b0be0 100644 --- a/app/javascript/mastodon/features/audio/index.jsx +++ b/app/javascript/mastodon/features/audio/index.jsx @@ -9,12 +9,12 @@ import { is } from 'immutable'; import { throttle, debounce } from 'lodash'; -import DownloadIcon from 'mastodon/../material-icons/400-24px/download.svg?react'; -import PauseIcon from 'mastodon/../material-icons/400-24px/pause.svg?react'; -import PlayArrowIcon from 'mastodon/../material-icons/400-24px/play_arrow-fill.svg?react'; -import VisibilityOffIcon from 'mastodon/../material-icons/400-24px/visibility_off.svg?react'; -import VolumeOffIcon from 'mastodon/../material-icons/400-24px/volume_off-fill.svg?react'; -import VolumeUpIcon from 'mastodon/../material-icons/400-24px/volume_up-fill.svg?react'; +import DownloadIcon from '@/material-icons/400-24px/download.svg?react'; +import PauseIcon from '@/material-icons/400-24px/pause.svg?react'; +import PlayArrowIcon from '@/material-icons/400-24px/play_arrow-fill.svg?react'; +import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react'; +import VolumeOffIcon from '@/material-icons/400-24px/volume_off-fill.svg?react'; +import VolumeUpIcon from '@/material-icons/400-24px/volume_up-fill.svg?react'; import { Icon } from 'mastodon/components/icon'; import { formatTime, getPointerPosition, fileNameFromURL } from 'mastodon/features/video'; diff --git a/app/javascript/mastodon/features/blocks/index.jsx b/app/javascript/mastodon/features/blocks/index.jsx index 656784664..1a631d3d0 100644 --- a/app/javascript/mastodon/features/blocks/index.jsx +++ b/app/javascript/mastodon/features/blocks/index.jsx @@ -8,7 +8,7 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import BlockIcon from 'mastodon/../material-icons/400-24px/block-fill.svg?react'; +import BlockIcon from '@/material-icons/400-24px/block-fill.svg?react'; import { fetchBlocks, expandBlocks } from '../../actions/blocks'; import { LoadingIndicator } from '../../components/loading_indicator'; diff --git a/app/javascript/mastodon/features/bookmarked_statuses/index.jsx b/app/javascript/mastodon/features/bookmarked_statuses/index.jsx index 15db94595..5494ad44b 100644 --- a/app/javascript/mastodon/features/bookmarked_statuses/index.jsx +++ b/app/javascript/mastodon/features/bookmarked_statuses/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import BookmarksIcon from 'mastodon/../material-icons/400-24px/bookmarks-fill.svg?react'; +import BookmarksIcon from '@/material-icons/400-24px/bookmarks-fill.svg?react'; import { fetchBookmarkedStatuses, expandBookmarkedStatuses } from 'mastodon/actions/bookmarks'; import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns'; import ColumnHeader from 'mastodon/components/column_header'; diff --git a/app/javascript/mastodon/features/community_timeline/index.jsx b/app/javascript/mastodon/features/community_timeline/index.jsx index 5bf66c2a3..0aa1f9aa2 100644 --- a/app/javascript/mastodon/features/community_timeline/index.jsx +++ b/app/javascript/mastodon/features/community_timeline/index.jsx @@ -7,7 +7,7 @@ import { Helmet } from 'react-helmet'; import { connect } from 'react-redux'; -import PeopleIcon from 'mastodon/../material-icons/400-24px/group.svg?react'; +import PeopleIcon from '@/material-icons/400-24px/group.svg?react'; import { DismissableBanner } from 'mastodon/components/dismissable_banner'; import { domain } from 'mastodon/initial_state'; diff --git a/app/javascript/mastodon/features/compose/components/action_bar.jsx b/app/javascript/mastodon/features/compose/components/action_bar.jsx index bacafaf1e..411ad77c7 100644 --- a/app/javascript/mastodon/features/compose/components/action_bar.jsx +++ b/app/javascript/mastodon/features/compose/components/action_bar.jsx @@ -5,7 +5,7 @@ import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import MenuIcon from 'mastodon/../material-icons/400-24px/menu.svg?react'; +import MenuIcon from '@/material-icons/400-24px/menu.svg?react'; import DropdownMenuContainer from '../../../containers/dropdown_menu_container'; diff --git a/app/javascript/mastodon/features/compose/components/compose_form.jsx b/app/javascript/mastodon/features/compose/components/compose_form.jsx index a099707df..fd66874e7 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.jsx +++ b/app/javascript/mastodon/features/compose/components/compose_form.jsx @@ -10,7 +10,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { length } from 'stringz'; -import LockIcon from 'mastodon/../material-icons/400-24px/lock.svg?react'; +import LockIcon from '@/material-icons/400-24px/lock.svg?react'; import { Icon } from 'mastodon/components/icon'; import { WithOptionalRouterPropTypes, withOptionalRouter } from 'mastodon/utils/react_router'; diff --git a/app/javascript/mastodon/features/compose/components/poll_button.jsx b/app/javascript/mastodon/features/compose/components/poll_button.jsx index e6ecba1a0..4900d3811 100644 --- a/app/javascript/mastodon/features/compose/components/poll_button.jsx +++ b/app/javascript/mastodon/features/compose/components/poll_button.jsx @@ -3,7 +3,7 @@ import { PureComponent } from 'react'; import { defineMessages, injectIntl } from 'react-intl'; -import InsertChartIcon from 'mastodon/../material-icons/400-24px/insert_chart.svg?react'; +import InsertChartIcon from '@/material-icons/400-24px/insert_chart.svg?react'; import { IconButton } from '../../../components/icon_button'; diff --git a/app/javascript/mastodon/features/compose/components/poll_form.jsx b/app/javascript/mastodon/features/compose/components/poll_form.jsx index 1815e22e6..929b2be57 100644 --- a/app/javascript/mastodon/features/compose/components/poll_form.jsx +++ b/app/javascript/mastodon/features/compose/components/poll_form.jsx @@ -8,8 +8,8 @@ import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import AddIcon from 'mastodon/../material-icons/400-24px/add.svg?react'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import AddIcon from '@/material-icons/400-24px/add.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import AutosuggestInput from 'mastodon/components/autosuggest_input'; import { Icon } from 'mastodon/components/icon'; import { IconButton } from 'mastodon/components/icon_button'; diff --git a/app/javascript/mastodon/features/compose/components/privacy_dropdown.jsx b/app/javascript/mastodon/features/compose/components/privacy_dropdown.jsx index 67298c8c4..c3446b8d6 100644 --- a/app/javascript/mastodon/features/compose/components/privacy_dropdown.jsx +++ b/app/javascript/mastodon/features/compose/components/privacy_dropdown.jsx @@ -9,10 +9,10 @@ import classNames from 'classnames'; import { supportsPassiveEvents } from 'detect-passive-events'; import Overlay from 'react-overlays/Overlay'; -import AlternateEmailIcon from 'mastodon/../material-icons/400-24px/alternate_email.svg?react'; -import LockIcon from 'mastodon/../material-icons/400-24px/lock.svg?react'; -import LockOpenIcon from 'mastodon/../material-icons/400-24px/lock_open.svg?react'; -import PublicIcon from 'mastodon/../material-icons/400-24px/public.svg?react'; +import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react'; +import LockIcon from '@/material-icons/400-24px/lock.svg?react'; +import LockOpenIcon from '@/material-icons/400-24px/lock_open.svg?react'; +import PublicIcon from '@/material-icons/400-24px/public.svg?react'; import { Icon } from 'mastodon/components/icon'; import { IconButton } from '../../../components/icon_button'; diff --git a/app/javascript/mastodon/features/compose/components/reply_indicator.jsx b/app/javascript/mastodon/features/compose/components/reply_indicator.jsx index f16a37347..8051e01db 100644 --- a/app/javascript/mastodon/features/compose/components/reply_indicator.jsx +++ b/app/javascript/mastodon/features/compose/components/reply_indicator.jsx @@ -5,7 +5,7 @@ import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import AttachmentList from 'mastodon/components/attachment_list'; import { WithOptionalRouterPropTypes, withOptionalRouter } from 'mastodon/utils/react_router'; diff --git a/app/javascript/mastodon/features/compose/components/search.jsx b/app/javascript/mastodon/features/compose/components/search.jsx index 844958bab..0bcc41b92 100644 --- a/app/javascript/mastodon/features/compose/components/search.jsx +++ b/app/javascript/mastodon/features/compose/components/search.jsx @@ -8,9 +8,9 @@ import { withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import CancelIcon from 'mastodon/../material-icons/400-24px/cancel-fill.svg?react'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; -import SearchIcon from 'mastodon/../material-icons/400-24px/search.svg?react'; +import CancelIcon from '@/material-icons/400-24px/cancel-fill.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; +import SearchIcon from '@/material-icons/400-24px/search.svg?react'; import { Icon } from 'mastodon/components/icon'; import { domain, searchEnabled } from 'mastodon/initial_state'; import { HASHTAG_REGEX } from 'mastodon/utils/hashtags'; diff --git a/app/javascript/mastodon/features/compose/components/search_results.jsx b/app/javascript/mastodon/features/compose/components/search_results.jsx index 8a63a01c8..694deea04 100644 --- a/app/javascript/mastodon/features/compose/components/search_results.jsx +++ b/app/javascript/mastodon/features/compose/components/search_results.jsx @@ -5,10 +5,10 @@ import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import FindInPageIcon from 'mastodon/../material-icons/400-24px/find_in_page.svg?react'; -import PeopleIcon from 'mastodon/../material-icons/400-24px/group.svg?react'; -import SearchIcon from 'mastodon/../material-icons/400-24px/search.svg?react'; -import TagIcon from 'mastodon/../material-icons/400-24px/tag.svg?react'; +import FindInPageIcon from '@/material-icons/400-24px/find_in_page.svg?react'; +import PeopleIcon from '@/material-icons/400-24px/group.svg?react'; +import SearchIcon from '@/material-icons/400-24px/search.svg?react'; +import TagIcon from '@/material-icons/400-24px/tag.svg?react'; import { Icon } from 'mastodon/components/icon'; import { LoadMore } from 'mastodon/components/load_more'; import { SearchSection } from 'mastodon/features/explore/components/search_section'; diff --git a/app/javascript/mastodon/features/compose/components/upload.jsx b/app/javascript/mastodon/features/compose/components/upload.jsx index cb31145e8..76d394af7 100644 --- a/app/javascript/mastodon/features/compose/components/upload.jsx +++ b/app/javascript/mastodon/features/compose/components/upload.jsx @@ -7,9 +7,9 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import spring from 'react-motion/lib/spring'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; -import EditIcon from 'mastodon/../material-icons/400-24px/edit.svg?react'; -import InfoIcon from 'mastodon/../material-icons/400-24px/info.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; +import EditIcon from '@/material-icons/400-24px/edit.svg?react'; +import InfoIcon from '@/material-icons/400-24px/info.svg?react'; import { Icon } from 'mastodon/components/icon'; import Motion from '../../ui/util/optional_motion'; diff --git a/app/javascript/mastodon/features/compose/components/upload_button.jsx b/app/javascript/mastodon/features/compose/components/upload_button.jsx index 090af86b2..923d6a3c4 100644 --- a/app/javascript/mastodon/features/compose/components/upload_button.jsx +++ b/app/javascript/mastodon/features/compose/components/upload_button.jsx @@ -6,7 +6,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import AddPhotoAlternateIcon from 'mastodon/../material-icons/400-24px/add_photo_alternate.svg?react'; +import AddPhotoAlternateIcon from '@/material-icons/400-24px/add_photo_alternate.svg?react'; import { IconButton } from '../../../components/icon_button'; diff --git a/app/javascript/mastodon/features/compose/components/upload_progress.jsx b/app/javascript/mastodon/features/compose/components/upload_progress.jsx index 8ed09b36b..e4973b24f 100644 --- a/app/javascript/mastodon/features/compose/components/upload_progress.jsx +++ b/app/javascript/mastodon/features/compose/components/upload_progress.jsx @@ -5,7 +5,7 @@ import { FormattedMessage } from 'react-intl'; import spring from 'react-motion/lib/spring'; -import UploadFileIcon from 'mastodon/../material-icons/400-24px/upload_file.svg?react'; +import UploadFileIcon from '@/material-icons/400-24px/upload_file.svg?react'; import { Icon } from 'mastodon/components/icon'; import Motion from '../../ui/util/optional_motion'; diff --git a/app/javascript/mastodon/features/compose/index.jsx b/app/javascript/mastodon/features/compose/index.jsx index a19ae71e8..ea3a14950 100644 --- a/app/javascript/mastodon/features/compose/index.jsx +++ b/app/javascript/mastodon/features/compose/index.jsx @@ -11,13 +11,13 @@ import { connect } from 'react-redux'; import spring from 'react-motion/lib/spring'; -import PeopleIcon from 'mastodon/../material-icons/400-24px/group.svg?react'; -import HomeIcon from 'mastodon/../material-icons/400-24px/home-fill.svg?react'; -import LogoutIcon from 'mastodon/../material-icons/400-24px/logout.svg?react'; -import MenuIcon from 'mastodon/../material-icons/400-24px/menu.svg?react'; -import NotificationsIcon from 'mastodon/../material-icons/400-24px/notifications-fill.svg?react'; -import PublicIcon from 'mastodon/../material-icons/400-24px/public.svg?react'; -import SettingsIcon from 'mastodon/../material-icons/400-24px/settings-fill.svg?react'; +import PeopleIcon from '@/material-icons/400-24px/group.svg?react'; +import HomeIcon from '@/material-icons/400-24px/home-fill.svg?react'; +import LogoutIcon from '@/material-icons/400-24px/logout.svg?react'; +import MenuIcon from '@/material-icons/400-24px/menu.svg?react'; +import NotificationsIcon from '@/material-icons/400-24px/notifications-fill.svg?react'; +import PublicIcon from '@/material-icons/400-24px/public.svg?react'; +import SettingsIcon from '@/material-icons/400-24px/settings-fill.svg?react'; import { openModal } from 'mastodon/actions/modal'; import Column from 'mastodon/components/column'; import { Icon } from 'mastodon/components/icon'; diff --git a/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx b/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx index 9ae95dabe..274cfa69f 100644 --- a/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx +++ b/app/javascript/mastodon/features/direct_timeline/components/conversation.jsx @@ -10,8 +10,8 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { HotKeys } from 'react-hotkeys'; -import MoreHorizIcon from 'mastodon/../material-icons/400-24px/more_horiz.svg?react'; -import ReplyIcon from 'mastodon/../material-icons/400-24px/reply.svg?react'; +import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react'; +import ReplyIcon from '@/material-icons/400-24px/reply.svg?react'; import AttachmentList from 'mastodon/components/attachment_list'; import AvatarComposite from 'mastodon/components/avatar_composite'; import { IconButton } from 'mastodon/components/icon_button'; diff --git a/app/javascript/mastodon/features/direct_timeline/index.jsx b/app/javascript/mastodon/features/direct_timeline/index.jsx index effc9f29d..af29d7a5b 100644 --- a/app/javascript/mastodon/features/direct_timeline/index.jsx +++ b/app/javascript/mastodon/features/direct_timeline/index.jsx @@ -7,7 +7,7 @@ import { Helmet } from 'react-helmet'; import { connect } from 'react-redux'; -import AlternateEmailIcon from 'mastodon/../material-icons/400-24px/alternate_email.svg?react'; +import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react'; import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns'; import { mountConversations, unmountConversations, expandConversations } from 'mastodon/actions/conversations'; import { connectDirectStream } from 'mastodon/actions/streaming'; diff --git a/app/javascript/mastodon/features/directory/index.jsx b/app/javascript/mastodon/features/directory/index.jsx index 32d79f23f..0d3408146 100644 --- a/app/javascript/mastodon/features/directory/index.jsx +++ b/app/javascript/mastodon/features/directory/index.jsx @@ -9,7 +9,7 @@ import { List as ImmutableList } from 'immutable'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; -import PeopleIcon from 'mastodon/../material-icons/400-24px/group.svg?react'; +import PeopleIcon from '@/material-icons/400-24px/group.svg?react'; import { addColumn, removeColumn, moveColumn, changeColumnParams } from 'mastodon/actions/columns'; import { fetchDirectory, expandDirectory } from 'mastodon/actions/directory'; import Column from 'mastodon/components/column'; diff --git a/app/javascript/mastodon/features/domain_blocks/index.jsx b/app/javascript/mastodon/features/domain_blocks/index.jsx index 5c9b70f02..964eada9c 100644 --- a/app/javascript/mastodon/features/domain_blocks/index.jsx +++ b/app/javascript/mastodon/features/domain_blocks/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import BlockIcon from 'mastodon/../material-icons/400-24px/block-fill.svg?react'; +import BlockIcon from '@/material-icons/400-24px/block-fill.svg?react'; import { fetchDomainBlocks, expandDomainBlocks } from '../../actions/domain_blocks'; import { LoadingIndicator } from '../../components/loading_indicator'; diff --git a/app/javascript/mastodon/features/explore/index.jsx b/app/javascript/mastodon/features/explore/index.jsx index 96a39f6b3..8ebaccd01 100644 --- a/app/javascript/mastodon/features/explore/index.jsx +++ b/app/javascript/mastodon/features/explore/index.jsx @@ -8,8 +8,8 @@ import { NavLink, Switch, Route } from 'react-router-dom'; import { connect } from 'react-redux'; -import SearchIcon from 'mastodon/../material-icons/400-24px/search.svg?react'; -import TagIcon from 'mastodon/../material-icons/400-24px/tag.svg?react'; +import SearchIcon from '@/material-icons/400-24px/search.svg?react'; +import TagIcon from '@/material-icons/400-24px/tag.svg?react'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; import Search from 'mastodon/features/compose/containers/search_container'; diff --git a/app/javascript/mastodon/features/explore/results.jsx b/app/javascript/mastodon/features/explore/results.jsx index 891bddf73..355c0f1c4 100644 --- a/app/javascript/mastodon/features/explore/results.jsx +++ b/app/javascript/mastodon/features/explore/results.jsx @@ -9,9 +9,9 @@ import { List as ImmutableList } from 'immutable'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; -import FindInPageIcon from 'mastodon/../material-icons/400-24px/find_in_page.svg?react'; -import PeopleIcon from 'mastodon/../material-icons/400-24px/group.svg?react'; -import TagIcon from 'mastodon/../material-icons/400-24px/tag.svg?react'; +import FindInPageIcon from '@/material-icons/400-24px/find_in_page.svg?react'; +import PeopleIcon from '@/material-icons/400-24px/group.svg?react'; +import TagIcon from '@/material-icons/400-24px/tag.svg?react'; import { submitSearch, expandSearch } from 'mastodon/actions/search'; import { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag'; import { Icon } from 'mastodon/components/icon'; diff --git a/app/javascript/mastodon/features/favourited_statuses/index.jsx b/app/javascript/mastodon/features/favourited_statuses/index.jsx index 29fc6925d..8e65ff5b6 100644 --- a/app/javascript/mastodon/features/favourited_statuses/index.jsx +++ b/app/javascript/mastodon/features/favourited_statuses/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import StarIcon from 'mastodon/../material-icons/400-24px/star-fill.svg?react'; +import StarIcon from '@/material-icons/400-24px/star-fill.svg?react'; import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns'; import { fetchFavouritedStatuses, expandFavouritedStatuses } from 'mastodon/actions/favourites'; import ColumnHeader from 'mastodon/components/column_header'; diff --git a/app/javascript/mastodon/features/favourites/index.jsx b/app/javascript/mastodon/features/favourites/index.jsx index ffab6f02c..27ca16940 100644 --- a/app/javascript/mastodon/features/favourites/index.jsx +++ b/app/javascript/mastodon/features/favourites/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import RefreshIcon from 'mastodon/../material-icons/400-24px/refresh.svg?react'; +import RefreshIcon from '@/material-icons/400-24px/refresh.svg?react'; import { fetchFavourites, expandFavourites } from 'mastodon/actions/interactions'; import ColumnHeader from 'mastodon/components/column_header'; import { Icon } from 'mastodon/components/icon'; diff --git a/app/javascript/mastodon/features/filters/select_filter.jsx b/app/javascript/mastodon/features/filters/select_filter.jsx index 9bf0c3c8e..5b2eb6495 100644 --- a/app/javascript/mastodon/features/filters/select_filter.jsx +++ b/app/javascript/mastodon/features/filters/select_filter.jsx @@ -7,7 +7,7 @@ import { connect } from 'react-redux'; import fuzzysort from 'fuzzysort'; -import AddIcon from 'mastodon/../material-icons/400-24px/add.svg?react'; +import AddIcon from '@/material-icons/400-24px/add.svg?react'; import { Icon } from 'mastodon/components/icon'; import { toServerSideType } from 'mastodon/utils/filters'; import { loupeIcon, deleteIcon } from 'mastodon/utils/icons'; diff --git a/app/javascript/mastodon/features/firehose/index.jsx b/app/javascript/mastodon/features/firehose/index.jsx index 22c11a182..6355efbfe 100644 --- a/app/javascript/mastodon/features/firehose/index.jsx +++ b/app/javascript/mastodon/features/firehose/index.jsx @@ -6,7 +6,7 @@ import { useIntl, defineMessages, FormattedMessage } from 'react-intl'; import { Helmet } from 'react-helmet'; import { NavLink } from 'react-router-dom'; -import PublicIcon from 'mastodon/../material-icons/400-24px/public.svg?react'; +import PublicIcon from '@/material-icons/400-24px/public.svg?react'; import { addColumn } from 'mastodon/actions/columns'; import { changeSetting } from 'mastodon/actions/settings'; import { connectPublicStream, connectCommunityStream } from 'mastodon/actions/streaming'; diff --git a/app/javascript/mastodon/features/follow_requests/components/account_authorize.jsx b/app/javascript/mastodon/features/follow_requests/components/account_authorize.jsx index 1f40e0599..dd308c87c 100644 --- a/app/javascript/mastodon/features/follow_requests/components/account_authorize.jsx +++ b/app/javascript/mastodon/features/follow_requests/components/account_authorize.jsx @@ -7,8 +7,8 @@ import { Link } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import CheckIcon from 'mastodon/../material-icons/400-24px/check.svg?react'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CheckIcon from '@/material-icons/400-24px/check.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { Avatar } from '../../../components/avatar'; import { DisplayName } from '../../../components/display_name'; diff --git a/app/javascript/mastodon/features/follow_requests/index.jsx b/app/javascript/mastodon/features/follow_requests/index.jsx index 683c7b407..7d651f2ca 100644 --- a/app/javascript/mastodon/features/follow_requests/index.jsx +++ b/app/javascript/mastodon/features/follow_requests/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import PersonAddIcon from 'mastodon/../material-icons/400-24px/person_add.svg?react'; +import PersonAddIcon from '@/material-icons/400-24px/person_add.svg?react'; import { fetchFollowRequests, expandFollowRequests } from '../../actions/accounts'; import ScrollableList from '../../components/scrollable_list'; diff --git a/app/javascript/mastodon/features/followed_tags/index.jsx b/app/javascript/mastodon/features/followed_tags/index.jsx index de3d7670e..21248e6de 100644 --- a/app/javascript/mastodon/features/followed_tags/index.jsx +++ b/app/javascript/mastodon/features/followed_tags/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import TagIcon from 'mastodon/../material-icons/400-24px/tag.svg?react'; +import TagIcon from '@/material-icons/400-24px/tag.svg?react'; import { expandFollowedHashtags, fetchFollowedHashtags } from 'mastodon/actions/tags'; import ColumnHeader from 'mastodon/components/column_header'; import { Hashtag } from 'mastodon/components/hashtag'; diff --git a/app/javascript/mastodon/features/getting_started/components/announcements.jsx b/app/javascript/mastodon/features/getting_started/components/announcements.jsx index 6b752df1b..ea36cefd7 100644 --- a/app/javascript/mastodon/features/getting_started/components/announcements.jsx +++ b/app/javascript/mastodon/features/getting_started/components/announcements.jsx @@ -13,10 +13,10 @@ import TransitionMotion from 'react-motion/lib/TransitionMotion'; import spring from 'react-motion/lib/spring'; import ReactSwipeableViews from 'react-swipeable-views'; -import elephantUIPlane from 'mastodon/../images/elephant_ui_plane.svg'; -import AddIcon from 'mastodon/../material-icons/400-24px/add.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 elephantUIPlane from '@/images/elephant_ui_plane.svg'; +import AddIcon from '@/material-icons/400-24px/add.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 { AnimatedNumber } from 'mastodon/components/animated_number'; import { Icon } from 'mastodon/components/icon'; import { IconButton } from 'mastodon/components/icon_button'; diff --git a/app/javascript/mastodon/features/getting_started/index.jsx b/app/javascript/mastodon/features/getting_started/index.jsx index 68ea20138..53bb22ddb 100644 --- a/app/javascript/mastodon/features/getting_started/index.jsx +++ b/app/javascript/mastodon/features/getting_started/index.jsx @@ -9,17 +9,17 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import AlternateEmailIcon from 'mastodon/../material-icons/400-24px/alternate_email.svg?react'; -import BookmarksIcon from 'mastodon/../material-icons/400-24px/bookmarks-fill.svg?react'; -import PeopleIcon from 'mastodon/../material-icons/400-24px/group.svg?react'; -import HomeIcon from 'mastodon/../material-icons/400-24px/home-fill.svg?react'; -import ListAltIcon from 'mastodon/../material-icons/400-24px/list_alt.svg?react'; -import MenuIcon from 'mastodon/../material-icons/400-24px/menu.svg?react'; -import PersonAddIcon from 'mastodon/../material-icons/400-24px/person_add.svg?react'; -import PublicIcon from 'mastodon/../material-icons/400-24px/public.svg?react'; -import SettingsIcon from 'mastodon/../material-icons/400-24px/settings-fill.svg?react'; -import StarIcon from 'mastodon/../material-icons/400-24px/star.svg?react'; -import TagIcon from 'mastodon/../material-icons/400-24px/tag.svg?react'; +import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react'; +import BookmarksIcon from '@/material-icons/400-24px/bookmarks-fill.svg?react'; +import PeopleIcon from '@/material-icons/400-24px/group.svg?react'; +import HomeIcon from '@/material-icons/400-24px/home-fill.svg?react'; +import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react'; +import MenuIcon from '@/material-icons/400-24px/menu.svg?react'; +import PersonAddIcon from '@/material-icons/400-24px/person_add.svg?react'; +import PublicIcon from '@/material-icons/400-24px/public.svg?react'; +import SettingsIcon from '@/material-icons/400-24px/settings-fill.svg?react'; +import StarIcon from '@/material-icons/400-24px/star.svg?react'; +import TagIcon from '@/material-icons/400-24px/tag.svg?react'; import { fetchFollowRequests } from 'mastodon/actions/accounts'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; diff --git a/app/javascript/mastodon/features/hashtag_timeline/index.jsx b/app/javascript/mastodon/features/hashtag_timeline/index.jsx index 35ed4dc60..f431a7e9b 100644 --- a/app/javascript/mastodon/features/hashtag_timeline/index.jsx +++ b/app/javascript/mastodon/features/hashtag_timeline/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; import { isEqual } from 'lodash'; -import TagIcon from 'mastodon/../material-icons/400-24px/tag.svg?react'; +import TagIcon from '@/material-icons/400-24px/tag.svg?react'; import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns'; import { connectHashtagStream } from 'mastodon/actions/streaming'; import { fetchHashtag, followHashtag, unfollowHashtag } from 'mastodon/actions/tags'; diff --git a/app/javascript/mastodon/features/home_timeline/components/explore_prompt.tsx b/app/javascript/mastodon/features/home_timeline/components/explore_prompt.tsx index 9eeec00e3..960d30e2c 100644 --- a/app/javascript/mastodon/features/home_timeline/components/explore_prompt.tsx +++ b/app/javascript/mastodon/features/home_timeline/components/explore_prompt.tsx @@ -2,7 +2,7 @@ import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; -import background from 'mastodon/../images/friends-cropped.png'; +import background from '@/images/friends-cropped.png'; import { DismissableBanner } from 'mastodon/components/dismissable_banner'; export const ExplorePrompt = () => ( diff --git a/app/javascript/mastodon/features/home_timeline/index.jsx b/app/javascript/mastodon/features/home_timeline/index.jsx index 1f93278c0..069f52b0b 100644 --- a/app/javascript/mastodon/features/home_timeline/index.jsx +++ b/app/javascript/mastodon/features/home_timeline/index.jsx @@ -10,8 +10,8 @@ import { createSelector } from '@reduxjs/toolkit'; import { List as ImmutableList } from 'immutable'; import { connect } from 'react-redux'; -import CampaignIcon from 'mastodon/../material-icons/400-24px/campaign.svg?react'; -import HomeIcon from 'mastodon/../material-icons/400-24px/home-fill.svg?react'; +import CampaignIcon from '@/material-icons/400-24px/campaign.svg?react'; +import HomeIcon from '@/material-icons/400-24px/home-fill.svg?react'; import { fetchAnnouncements, toggleShowAnnouncements } from 'mastodon/actions/announcements'; import { IconWithBadge } from 'mastodon/components/icon_with_badge'; import { NotSignedInIndicator } from 'mastodon/components/not_signed_in_indicator'; diff --git a/app/javascript/mastodon/features/interaction_modal/index.jsx b/app/javascript/mastodon/features/interaction_modal/index.jsx index 1d503b734..07f1e6fe5 100644 --- a/app/javascript/mastodon/features/interaction_modal/index.jsx +++ b/app/javascript/mastodon/features/interaction_modal/index.jsx @@ -9,10 +9,10 @@ import { connect } from 'react-redux'; import { throttle, escapeRegExp } from 'lodash'; -import PersonAddIcon from 'mastodon/../material-icons/400-24px/person_add.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 StarIcon from 'mastodon/../material-icons/400-24px/star.svg?react'; +import PersonAddIcon from '@/material-icons/400-24px/person_add.svg?react'; +import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react'; +import ReplyIcon from '@/material-icons/400-24px/reply.svg?react'; +import StarIcon from '@/material-icons/400-24px/star.svg?react'; import { openModal, closeModal } from 'mastodon/actions/modal'; import api from 'mastodon/api'; import { Button } from 'mastodon/components/button'; diff --git a/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx b/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx index 6d1df6dd0..622ca525c 100644 --- a/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx +++ b/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx @@ -6,7 +6,7 @@ import { Helmet } from 'react-helmet'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import InfoIcon from 'mastodon/../material-icons/400-24px/info.svg?react'; +import InfoIcon from '@/material-icons/400-24px/info.svg?react'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; diff --git a/app/javascript/mastodon/features/list_adder/components/list.jsx b/app/javascript/mastodon/features/list_adder/components/list.jsx index 54ac940da..a7cfd60bf 100644 --- a/app/javascript/mastodon/features/list_adder/components/list.jsx +++ b/app/javascript/mastodon/features/list_adder/components/list.jsx @@ -6,9 +6,9 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import AddIcon from 'mastodon/../material-icons/400-24px/add.svg?react'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; -import ListAltIcon from 'mastodon/../material-icons/400-24px/list_alt.svg?react'; +import AddIcon from '@/material-icons/400-24px/add.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; +import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react'; import { Icon } from 'mastodon/components/icon'; import { removeFromListAdder, addToListAdder } from '../../../actions/lists'; diff --git a/app/javascript/mastodon/features/list_editor/components/account.jsx b/app/javascript/mastodon/features/list_editor/components/account.jsx index f406f24fa..77d32af80 100644 --- a/app/javascript/mastodon/features/list_editor/components/account.jsx +++ b/app/javascript/mastodon/features/list_editor/components/account.jsx @@ -6,8 +6,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import AddIcon from 'mastodon/../material-icons/400-24px/add.svg?react'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import AddIcon from '@/material-icons/400-24px/add.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { removeFromListEditor, addToListEditor } from '../../../actions/lists'; import { Avatar } from '../../../components/avatar'; diff --git a/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx b/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx index ad29d08a9..89f596636 100644 --- a/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx +++ b/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx @@ -5,7 +5,7 @@ import { defineMessages, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; -import CheckIcon from 'mastodon/../material-icons/400-24px/check.svg?react'; +import CheckIcon from '@/material-icons/400-24px/check.svg?react'; import { changeListEditorTitle, submitListEditor } from '../../../actions/lists'; import { IconButton } from '../../../components/icon_button'; diff --git a/app/javascript/mastodon/features/list_editor/components/search.jsx b/app/javascript/mastodon/features/list_editor/components/search.jsx index 4c4138c75..097d4f3f4 100644 --- a/app/javascript/mastodon/features/list_editor/components/search.jsx +++ b/app/javascript/mastodon/features/list_editor/components/search.jsx @@ -7,8 +7,8 @@ import classNames from 'classnames'; import { connect } from 'react-redux'; -import CancelIcon from 'mastodon/../material-icons/400-24px/cancel.svg?react'; -import SearchIcon from 'mastodon/../material-icons/400-24px/search.svg?react'; +import CancelIcon from '@/material-icons/400-24px/cancel.svg?react'; +import SearchIcon from '@/material-icons/400-24px/search.svg?react'; import { Icon } from 'mastodon/components/icon'; import { fetchListSuggestions, clearListSuggestions, changeListSuggestions } from '../../../actions/lists'; diff --git a/app/javascript/mastodon/features/list_timeline/index.jsx b/app/javascript/mastodon/features/list_timeline/index.jsx index aa87adf52..24bf122fa 100644 --- a/app/javascript/mastodon/features/list_timeline/index.jsx +++ b/app/javascript/mastodon/features/list_timeline/index.jsx @@ -11,9 +11,9 @@ import { connect } from 'react-redux'; import Toggle from 'react-toggle'; -import DeleteIcon from 'mastodon/../material-icons/400-24px/delete.svg?react'; -import EditIcon from 'mastodon/../material-icons/400-24px/edit.svg?react'; -import ListAltIcon from 'mastodon/../material-icons/400-24px/list_alt.svg?react'; +import DeleteIcon from '@/material-icons/400-24px/delete.svg?react'; +import EditIcon from '@/material-icons/400-24px/edit.svg?react'; +import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react'; import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns'; import { fetchList, deleteList, updateList } from 'mastodon/actions/lists'; import { openModal } from 'mastodon/actions/modal'; diff --git a/app/javascript/mastodon/features/lists/index.jsx b/app/javascript/mastodon/features/lists/index.jsx index b20bbc6b7..a7648f55b 100644 --- a/app/javascript/mastodon/features/lists/index.jsx +++ b/app/javascript/mastodon/features/lists/index.jsx @@ -9,7 +9,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import ListAltIcon from 'mastodon/../material-icons/400-24px/list_alt.svg?react'; +import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react'; import { fetchLists } from 'mastodon/actions/lists'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; diff --git a/app/javascript/mastodon/features/mutes/index.jsx b/app/javascript/mastodon/features/mutes/index.jsx index 316eaba22..3b50244ea 100644 --- a/app/javascript/mastodon/features/mutes/index.jsx +++ b/app/javascript/mastodon/features/mutes/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import VolumeOffIcon from 'mastodon/../material-icons/400-24px/volume_off.svg?react'; +import VolumeOffIcon from '@/material-icons/400-24px/volume_off.svg?react'; import { fetchMutes, expandMutes } from '../../actions/mutes'; import { LoadingIndicator } from '../../components/loading_indicator'; diff --git a/app/javascript/mastodon/features/notifications/components/clear_column_button.jsx b/app/javascript/mastodon/features/notifications/components/clear_column_button.jsx index ac7860efd..73eaecba5 100644 --- a/app/javascript/mastodon/features/notifications/components/clear_column_button.jsx +++ b/app/javascript/mastodon/features/notifications/components/clear_column_button.jsx @@ -3,7 +3,7 @@ import { PureComponent } from 'react'; import { FormattedMessage } from 'react-intl'; -import DeleteForeverIcon from 'mastodon/../material-icons/400-24px/delete_forever.svg?react'; +import DeleteForeverIcon from '@/material-icons/400-24px/delete_forever.svg?react'; import { Icon } from 'mastodon/components/icon'; export default class ClearColumnButton extends PureComponent { diff --git a/app/javascript/mastodon/features/notifications/components/filter_bar.jsx b/app/javascript/mastodon/features/notifications/components/filter_bar.jsx index f5651a7d4..c288c2c0d 100644 --- a/app/javascript/mastodon/features/notifications/components/filter_bar.jsx +++ b/app/javascript/mastodon/features/notifications/components/filter_bar.jsx @@ -3,12 +3,12 @@ import { PureComponent } from 'react'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -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 PersonAddIcon from 'mastodon/../material-icons/400-24px/person_add.svg?react'; -import RepeatIcon from 'mastodon/../material-icons/400-24px/repeat.svg?react'; -import ReplyAllIcon from 'mastodon/../material-icons/400-24px/reply_all.svg?react'; -import StarIcon from 'mastodon/../material-icons/400-24px/star.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 PersonAddIcon from '@/material-icons/400-24px/person_add.svg?react'; +import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react'; +import ReplyAllIcon from '@/material-icons/400-24px/reply_all.svg?react'; +import StarIcon from '@/material-icons/400-24px/star.svg?react'; import { Icon } from 'mastodon/components/icon'; const tooltips = defineMessages({ diff --git a/app/javascript/mastodon/features/notifications/components/follow_request.jsx b/app/javascript/mastodon/features/notifications/components/follow_request.jsx index c6a039adb..4024455cb 100644 --- a/app/javascript/mastodon/features/notifications/components/follow_request.jsx +++ b/app/javascript/mastodon/features/notifications/components/follow_request.jsx @@ -7,8 +7,8 @@ import { Link } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import CheckIcon from 'mastodon/../material-icons/400-24px/check.svg?react'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CheckIcon from '@/material-icons/400-24px/check.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { Avatar } from 'mastodon/components/avatar'; import { DisplayName } from 'mastodon/components/display_name'; import { IconButton } from 'mastodon/components/icon_button'; diff --git a/app/javascript/mastodon/features/notifications/components/notification.jsx b/app/javascript/mastodon/features/notifications/components/notification.jsx index 35b31fcd4..d7101f838 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.jsx +++ b/app/javascript/mastodon/features/notifications/components/notification.jsx @@ -10,14 +10,14 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { HotKeys } from 'react-hotkeys'; -import EditIcon from 'mastodon/../material-icons/400-24px/edit.svg?react'; -import FlagIcon from 'mastodon/../material-icons/400-24px/flag-fill.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 PersonIcon from 'mastodon/../material-icons/400-24px/person-fill.svg?react'; -import PersonAddIcon from 'mastodon/../material-icons/400-24px/person_add-fill.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'; +import EditIcon from '@/material-icons/400-24px/edit.svg?react'; +import FlagIcon from '@/material-icons/400-24px/flag-fill.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 PersonIcon from '@/material-icons/400-24px/person-fill.svg?react'; +import PersonAddIcon from '@/material-icons/400-24px/person_add-fill.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 'mastodon/components/icon'; import AccountContainer from 'mastodon/containers/account_container'; import StatusContainer from 'mastodon/containers/status_container'; diff --git a/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx b/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx index a577abd86..1cdf5b5df 100644 --- a/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx +++ b/app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx @@ -5,8 +5,8 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; -import TuneIcon from 'mastodon/../material-icons/400-24px/tune.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; +import TuneIcon from '@/material-icons/400-24px/tune.svg?react'; import { requestBrowserPermission } from 'mastodon/actions/notifications'; import { changeSetting } from 'mastodon/actions/settings'; import { Button } from 'mastodon/components/button'; diff --git a/app/javascript/mastodon/features/notifications/index.jsx b/app/javascript/mastodon/features/notifications/index.jsx index 0751f1620..30c63ed32 100644 --- a/app/javascript/mastodon/features/notifications/index.jsx +++ b/app/javascript/mastodon/features/notifications/index.jsx @@ -12,8 +12,8 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import DoneAllIcon from 'mastodon/../material-icons/400-24px/done_all.svg?react'; -import NotificationsIcon from 'mastodon/../material-icons/400-24px/notifications-fill.svg?react'; +import DoneAllIcon from '@/material-icons/400-24px/done_all.svg?react'; +import NotificationsIcon from '@/material-icons/400-24px/notifications-fill.svg?react'; import { compareId } from 'mastodon/compare_id'; import { Icon } from 'mastodon/components/icon'; import { NotSignedInIndicator } from 'mastodon/components/not_signed_in_indicator'; diff --git a/app/javascript/mastodon/features/onboarding/components/step.jsx b/app/javascript/mastodon/features/onboarding/components/step.jsx index 46c9b1645..a2a1653b8 100644 --- a/app/javascript/mastodon/features/onboarding/components/step.jsx +++ b/app/javascript/mastodon/features/onboarding/components/step.jsx @@ -2,8 +2,8 @@ import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; -import ArrowRightAltIcon from 'mastodon/../material-icons/400-24px/arrow_right_alt.svg?react'; -import CheckIcon from 'mastodon/../material-icons/400-24px/done.svg?react'; +import ArrowRightAltIcon from '@/material-icons/400-24px/arrow_right_alt.svg?react'; +import CheckIcon from '@/material-icons/400-24px/done.svg?react'; import { Icon } from 'mastodon/components/icon'; export const Step = ({ label, description, icon, iconComponent, completed, onClick, href, to }) => { diff --git a/app/javascript/mastodon/features/onboarding/index.jsx b/app/javascript/mastodon/features/onboarding/index.jsx index 9271468da..5900b9ec7 100644 --- a/app/javascript/mastodon/features/onboarding/index.jsx +++ b/app/javascript/mastodon/features/onboarding/index.jsx @@ -8,12 +8,12 @@ import { Link, Switch, Route, useHistory } from 'react-router-dom'; import { useDispatch } from 'react-redux'; -import illustration from 'mastodon/../images/elephant_ui_conversation.svg'; -import AccountCircleIcon from 'mastodon/../material-icons/400-24px/account_circle.svg?react'; -import ArrowRightAltIcon from 'mastodon/../material-icons/400-24px/arrow_right_alt.svg?react'; -import ContentCopyIcon from 'mastodon/../material-icons/400-24px/content_copy.svg?react'; -import EditNoteIcon from 'mastodon/../material-icons/400-24px/edit_note.svg?react'; -import PersonAddIcon from 'mastodon/../material-icons/400-24px/person_add.svg?react'; +import illustration from '@/images/elephant_ui_conversation.svg'; +import AccountCircleIcon from '@/material-icons/400-24px/account_circle.svg?react'; +import ArrowRightAltIcon from '@/material-icons/400-24px/arrow_right_alt.svg?react'; +import ContentCopyIcon from '@/material-icons/400-24px/content_copy.svg?react'; +import EditNoteIcon from '@/material-icons/400-24px/edit_note.svg?react'; +import PersonAddIcon from '@/material-icons/400-24px/person_add.svg?react'; import { focusCompose } from 'mastodon/actions/compose'; import { Icon } from 'mastodon/components/icon'; import Column from 'mastodon/features/ui/components/column'; diff --git a/app/javascript/mastodon/features/onboarding/profile.jsx b/app/javascript/mastodon/features/onboarding/profile.jsx index 5217b42ad..14250ae39 100644 --- a/app/javascript/mastodon/features/onboarding/profile.jsx +++ b/app/javascript/mastodon/features/onboarding/profile.jsx @@ -10,8 +10,8 @@ import { useDispatch } from 'react-redux'; import Toggle from 'react-toggle'; -import AddPhotoAlternateIcon from 'mastodon/../material-icons/400-24px/add_photo_alternate.svg?react'; -import EditIcon from 'mastodon/../material-icons/400-24px/edit.svg?react'; +import AddPhotoAlternateIcon from '@/material-icons/400-24px/add_photo_alternate.svg?react'; +import EditIcon from '@/material-icons/400-24px/edit.svg?react'; import { updateAccount } from 'mastodon/actions/accounts'; import { Button } from 'mastodon/components/button'; import { ColumnBackButton } from 'mastodon/components/column_back_button'; diff --git a/app/javascript/mastodon/features/onboarding/share.jsx b/app/javascript/mastodon/features/onboarding/share.jsx index cde63d0b3..32a86ab6c 100644 --- a/app/javascript/mastodon/features/onboarding/share.jsx +++ b/app/javascript/mastodon/features/onboarding/share.jsx @@ -9,8 +9,8 @@ import { Link } from 'react-router-dom'; import SwipeableViews from 'react-swipeable-views'; -import ArrowRightAltIcon from 'mastodon/../material-icons/400-24px/arrow_right_alt.svg?react'; -import ContentCopyIcon from 'mastodon/../material-icons/400-24px/content_copy.svg?react'; +import ArrowRightAltIcon from '@/material-icons/400-24px/arrow_right_alt.svg?react'; +import ContentCopyIcon from '@/material-icons/400-24px/content_copy.svg?react'; import { ColumnBackButton } from 'mastodon/components/column_back_button'; import { Icon } from 'mastodon/components/icon'; import { me, domain } from 'mastodon/initial_state'; diff --git a/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx index d60cd5e1e..8dfbf54cb 100644 --- a/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx +++ b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx @@ -9,11 +9,11 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import OpenInNewIcon from 'mastodon/../material-icons/400-24px/open_in_new.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.svg?react'; +import OpenInNewIcon from '@/material-icons/400-24px/open_in_new.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.svg?react'; import { initBoostModal } from 'mastodon/actions/boosts'; import { replyCompose } from 'mastodon/actions/compose'; import { reblog, favourite, unreblog, unfavourite } from 'mastodon/actions/interactions'; diff --git a/app/javascript/mastodon/features/picture_in_picture/components/header.jsx b/app/javascript/mastodon/features/picture_in_picture/components/header.jsx index 12a5566d3..31073d738 100644 --- a/app/javascript/mastodon/features/picture_in_picture/components/header.jsx +++ b/app/javascript/mastodon/features/picture_in_picture/components/header.jsx @@ -8,7 +8,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { Avatar } from 'mastodon/components/avatar'; import { DisplayName } from 'mastodon/components/display_name'; import { IconButton } from 'mastodon/components/icon_button'; diff --git a/app/javascript/mastodon/features/pinned_statuses/index.jsx b/app/javascript/mastodon/features/pinned_statuses/index.jsx index 3d6dc753e..921e9a607 100644 --- a/app/javascript/mastodon/features/pinned_statuses/index.jsx +++ b/app/javascript/mastodon/features/pinned_statuses/index.jsx @@ -8,7 +8,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import PushPinIcon from 'mastodon/../material-icons/400-24px/push_pin.svg?react'; +import PushPinIcon from '@/material-icons/400-24px/push_pin.svg?react'; import { getStatusList } from 'mastodon/selectors'; import { fetchPinnedStatuses } from '../../actions/pin_statuses'; diff --git a/app/javascript/mastodon/features/public_timeline/index.jsx b/app/javascript/mastodon/features/public_timeline/index.jsx index 302a2956e..3601dfeae 100644 --- a/app/javascript/mastodon/features/public_timeline/index.jsx +++ b/app/javascript/mastodon/features/public_timeline/index.jsx @@ -7,7 +7,7 @@ import { Helmet } from 'react-helmet'; import { connect } from 'react-redux'; -import PublicIcon from 'mastodon/../material-icons/400-24px/public.svg?react'; +import PublicIcon from '@/material-icons/400-24px/public.svg?react'; import { DismissableBanner } from 'mastodon/components/dismissable_banner'; import { domain } from 'mastodon/initial_state'; diff --git a/app/javascript/mastodon/features/reblogs/index.jsx b/app/javascript/mastodon/features/reblogs/index.jsx index 0d5183fb8..3d1fc94cb 100644 --- a/app/javascript/mastodon/features/reblogs/index.jsx +++ b/app/javascript/mastodon/features/reblogs/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; import { debounce } from 'lodash'; -import RefreshIcon from 'mastodon/../material-icons/400-24px/refresh.svg?react'; +import RefreshIcon from '@/material-icons/400-24px/refresh.svg?react'; import { Icon } from 'mastodon/components/icon'; import { fetchReblogs, expandReblogs } from '../../actions/interactions'; diff --git a/app/javascript/mastodon/features/report/components/option.jsx b/app/javascript/mastodon/features/report/components/option.jsx index d6949f0c5..7aa0dd137 100644 --- a/app/javascript/mastodon/features/report/components/option.jsx +++ b/app/javascript/mastodon/features/report/components/option.jsx @@ -3,7 +3,7 @@ import { PureComponent } from 'react'; import classNames from 'classnames'; -import CheckIcon from 'mastodon/../material-icons/400-24px/done.svg?react'; +import CheckIcon from '@/material-icons/400-24px/done.svg?react'; import { Icon } from 'mastodon/components/icon'; export default class Option extends PureComponent { diff --git a/app/javascript/mastodon/features/status/components/action_bar.jsx b/app/javascript/mastodon/features/status/components/action_bar.jsx index b76082455..4cb06aac2 100644 --- a/app/javascript/mastodon/features/status/components/action_bar.jsx +++ b/app/javascript/mastodon/features/status/components/action_bar.jsx @@ -9,16 +9,16 @@ import { withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; -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 RepeatDisabledIcon from 'mastodon/../svg-icons/repeat_disabled.svg?react'; -import RepeatPrivateIcon from 'mastodon/../svg-icons/repeat_private.svg?react'; +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 RepeatDisabledIcon from '@/svg-icons/repeat_disabled.svg?react'; +import RepeatPrivateIcon from '@/svg-icons/repeat_private.svg?react'; import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; diff --git a/app/javascript/mastodon/features/status/components/card.jsx b/app/javascript/mastodon/features/status/components/card.jsx index c211dc64c..f37b558c4 100644 --- a/app/javascript/mastodon/features/status/components/card.jsx +++ b/app/javascript/mastodon/features/status/components/card.jsx @@ -10,9 +10,9 @@ import classNames from 'classnames'; import Immutable from 'immutable'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import DescriptionIcon from 'mastodon/../material-icons/400-24px/description-fill.svg?react'; -import OpenInNewIcon from 'mastodon/../material-icons/400-24px/open_in_new.svg?react'; -import PlayArrowIcon from 'mastodon/../material-icons/400-24px/play_arrow-fill.svg?react'; +import DescriptionIcon from '@/material-icons/400-24px/description-fill.svg?react'; +import OpenInNewIcon from '@/material-icons/400-24px/open_in_new.svg?react'; +import PlayArrowIcon from '@/material-icons/400-24px/play_arrow-fill.svg?react'; import { Blurhash } from 'mastodon/components/blurhash'; import { Icon } from 'mastodon/components/icon'; import { RelativeTimestamp } from 'mastodon/components/relative_timestamp'; diff --git a/app/javascript/mastodon/features/status/components/detailed_status.jsx b/app/javascript/mastodon/features/status/components/detailed_status.jsx index 2ebafe7b4..437e9e86b 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.jsx +++ b/app/javascript/mastodon/features/status/components/detailed_status.jsx @@ -8,9 +8,9 @@ import { Link, withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import AlternateEmailIcon from 'mastodon/../material-icons/400-24px/alternate_email.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'; +import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react'; +import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react'; +import StarIcon from '@/material-icons/400-24px/star-fill.svg?react'; import { AnimatedNumber } from 'mastodon/components/animated_number'; import EditedTimestamp from 'mastodon/components/edited_timestamp'; import { getHashtagBarForStatus } from 'mastodon/components/hashtag_bar'; diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx index c8ccddddb..a3034bb57 100644 --- a/app/javascript/mastodon/features/status/index.jsx +++ b/app/javascript/mastodon/features/status/index.jsx @@ -14,8 +14,8 @@ import { connect } from 'react-redux'; import { HotKeys } from 'react-hotkeys'; -import VisibilityIcon from 'mastodon/../material-icons/400-24px/visibility.svg?react'; -import VisibilityOffIcon from 'mastodon/../material-icons/400-24px/visibility_off.svg?react'; +import VisibilityIcon from '@/material-icons/400-24px/visibility.svg?react'; +import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react'; import { Icon } from 'mastodon/components/icon'; import { LoadingIndicator } from 'mastodon/components/loading_indicator'; import ScrollContainer from 'mastodon/containers/scroll_container'; diff --git a/app/javascript/mastodon/features/subscribed_languages_modal/index.jsx b/app/javascript/mastodon/features/subscribed_languages_modal/index.jsx index 8c1a8f486..0531346f9 100644 --- a/app/javascript/mastodon/features/subscribed_languages_modal/index.jsx +++ b/app/javascript/mastodon/features/subscribed_languages_modal/index.jsx @@ -8,7 +8,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { followAccount } from 'mastodon/actions/accounts'; import { Button } from 'mastodon/components/button'; import { IconButton } from 'mastodon/components/icon_button'; diff --git a/app/javascript/mastodon/features/ui/components/boost_modal.jsx b/app/javascript/mastodon/features/ui/components/boost_modal.jsx index 7e9d8c981..3b3e1e3f9 100644 --- a/app/javascript/mastodon/features/ui/components/boost_modal.jsx +++ b/app/javascript/mastodon/features/ui/components/boost_modal.jsx @@ -9,7 +9,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import RepeatIcon from 'mastodon/../material-icons/400-24px/repeat.svg?react'; +import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react'; import { changeBoostPrivacy } from 'mastodon/actions/boosts'; import AttachmentList from 'mastodon/components/attachment_list'; import { Icon } from 'mastodon/components/icon'; diff --git a/app/javascript/mastodon/features/ui/components/bundle_modal_error.jsx b/app/javascript/mastodon/features/ui/components/bundle_modal_error.jsx index dd2a10608..d1c9e3688 100644 --- a/app/javascript/mastodon/features/ui/components/bundle_modal_error.jsx +++ b/app/javascript/mastodon/features/ui/components/bundle_modal_error.jsx @@ -3,7 +3,7 @@ import { PureComponent } from 'react'; import { defineMessages, injectIntl } from 'react-intl'; -import RefreshIcon from 'mastodon/../material-icons/400-24px/refresh.svg?react'; +import RefreshIcon from '@/material-icons/400-24px/refresh.svg?react'; import { IconButton } from '../../../components/icon_button'; diff --git a/app/javascript/mastodon/features/ui/components/compare_history_modal.jsx b/app/javascript/mastodon/features/ui/components/compare_history_modal.jsx index 1080c303c..4227c7413 100644 --- a/app/javascript/mastodon/features/ui/components/compare_history_modal.jsx +++ b/app/javascript/mastodon/features/ui/components/compare_history_modal.jsx @@ -8,7 +8,7 @@ import { connect } from 'react-redux'; import escapeTextContentForBrowser from 'escape-html'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { closeModal } from 'mastodon/actions/modal'; import { IconButton } from 'mastodon/components/icon_button'; import InlineAccount from 'mastodon/components/inline_account'; diff --git a/app/javascript/mastodon/features/ui/components/embed_modal.jsx b/app/javascript/mastodon/features/ui/components/embed_modal.jsx index 595e9771b..a4e5fc9df 100644 --- a/app/javascript/mastodon/features/ui/components/embed_modal.jsx +++ b/app/javascript/mastodon/features/ui/components/embed_modal.jsx @@ -4,7 +4,7 @@ import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import api from 'mastodon/api'; import { IconButton } from 'mastodon/components/icon_button'; diff --git a/app/javascript/mastodon/features/ui/components/filter_modal.jsx b/app/javascript/mastodon/features/ui/components/filter_modal.jsx index 25cda00be..477575bd7 100644 --- a/app/javascript/mastodon/features/ui/components/filter_modal.jsx +++ b/app/javascript/mastodon/features/ui/components/filter_modal.jsx @@ -5,7 +5,7 @@ import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { fetchFilters, createFilter, createFilterStatus } from 'mastodon/actions/filters'; import { fetchStatus } from 'mastodon/actions/statuses'; import { IconButton } from 'mastodon/components/icon_button'; diff --git a/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx b/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx index a3bb22bd9..25ad1e2e9 100644 --- a/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx +++ b/app/javascript/mastodon/features/ui/components/focal_point_modal.jsx @@ -16,7 +16,7 @@ import tesseractWorkerPath from 'tesseract.js/dist/worker.min.js'; // eslint-disable-next-line import/no-extraneous-dependencies import tesseractCorePath from 'tesseract.js-core/tesseract-core.wasm.js'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { Button } from 'mastodon/components/button'; import { GIFV } from 'mastodon/components/gifv'; import { IconButton } from 'mastodon/components/icon_button'; diff --git a/app/javascript/mastodon/features/ui/components/follow_requests_column_link.jsx b/app/javascript/mastodon/features/ui/components/follow_requests_column_link.jsx index 6df753b06..4aa009263 100644 --- a/app/javascript/mastodon/features/ui/components/follow_requests_column_link.jsx +++ b/app/javascript/mastodon/features/ui/components/follow_requests_column_link.jsx @@ -6,7 +6,7 @@ import { injectIntl, defineMessages } from 'react-intl'; import { List as ImmutableList } from 'immutable'; import { connect } from 'react-redux'; -import PersonAddIcon from 'mastodon/../material-icons/400-24px/person_add.svg?react'; +import PersonAddIcon from '@/material-icons/400-24px/person_add.svg?react'; import { fetchFollowRequests } from 'mastodon/actions/accounts'; import { IconWithBadge } from 'mastodon/components/icon_with_badge'; import ColumnLink from 'mastodon/features/ui/components/column_link'; diff --git a/app/javascript/mastodon/features/ui/components/header.jsx b/app/javascript/mastodon/features/ui/components/header.jsx index b4f388ba8..2f8636b12 100644 --- a/app/javascript/mastodon/features/ui/components/header.jsx +++ b/app/javascript/mastodon/features/ui/components/header.jsx @@ -7,7 +7,7 @@ import { Link, withRouter } from 'react-router-dom'; import { connect } from 'react-redux'; -import SearchIcon from 'mastodon/../material-icons/400-24px/search.svg?react'; +import SearchIcon from '@/material-icons/400-24px/search.svg?react'; import { openModal } from 'mastodon/actions/modal'; import { fetchServer } from 'mastodon/actions/server'; import { Avatar } from 'mastodon/components/avatar'; diff --git a/app/javascript/mastodon/features/ui/components/image_modal.jsx b/app/javascript/mastodon/features/ui/components/image_modal.jsx index 5a700dc1f..f08ce1534 100644 --- a/app/javascript/mastodon/features/ui/components/image_modal.jsx +++ b/app/javascript/mastodon/features/ui/components/image_modal.jsx @@ -5,7 +5,7 @@ import { defineMessages, injectIntl } from 'react-intl'; import classNames from 'classnames'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { IconButton } from 'mastodon/components/icon_button'; import ImageLoader from './image_loader'; diff --git a/app/javascript/mastodon/features/ui/components/list_panel.jsx b/app/javascript/mastodon/features/ui/components/list_panel.jsx index 634f13e61..fec21f14c 100644 --- a/app/javascript/mastodon/features/ui/components/list_panel.jsx +++ b/app/javascript/mastodon/features/ui/components/list_panel.jsx @@ -5,7 +5,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import ListAltIcon from 'mastodon/../material-icons/400-24px/list_alt.svg?react'; +import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react'; import { fetchLists } from 'mastodon/actions/lists'; import ColumnLink from './column_link'; diff --git a/app/javascript/mastodon/features/ui/components/media_modal.jsx b/app/javascript/mastodon/features/ui/components/media_modal.jsx index b5b5d8869..0f6e8a727 100644 --- a/app/javascript/mastodon/features/ui/components/media_modal.jsx +++ b/app/javascript/mastodon/features/ui/components/media_modal.jsx @@ -9,9 +9,9 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import ReactSwipeableViews from 'react-swipeable-views'; -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 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 { getAverageFromBlurhash } from 'mastodon/blurhash'; import { GIFV } from 'mastodon/components/gifv'; import { Icon } from 'mastodon/components/icon'; diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx index 72da652b3..d3f46c6d4 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx +++ b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx @@ -5,16 +5,16 @@ import { defineMessages, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; -import AlternateEmailIcon from 'mastodon/../material-icons/400-24px/alternate_email.svg?react'; -import BookmarksIcon from 'mastodon/../material-icons/400-24px/bookmarks-fill.svg?react'; -import HomeIcon from 'mastodon/../material-icons/400-24px/home-fill.svg?react'; -import ListAltIcon from 'mastodon/../material-icons/400-24px/list_alt.svg?react'; -import MoreHorizIcon from 'mastodon/../material-icons/400-24px/more_horiz.svg?react'; -import PublicIcon from 'mastodon/../material-icons/400-24px/public.svg?react'; -import SearchIcon from 'mastodon/../material-icons/400-24px/search.svg?react'; -import SettingsIcon from 'mastodon/../material-icons/400-24px/settings-fill.svg?react'; -import StarIcon from 'mastodon/../material-icons/400-24px/star-fill.svg?react'; -import TagIcon from 'mastodon/../material-icons/400-24px/tag.svg?react'; +import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react'; +import BookmarksIcon from '@/material-icons/400-24px/bookmarks-fill.svg?react'; +import HomeIcon from '@/material-icons/400-24px/home-fill.svg?react'; +import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react'; +import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react'; +import PublicIcon from '@/material-icons/400-24px/public.svg?react'; +import SearchIcon from '@/material-icons/400-24px/search.svg?react'; +import SettingsIcon from '@/material-icons/400-24px/settings-fill.svg?react'; +import StarIcon from '@/material-icons/400-24px/star-fill.svg?react'; +import TagIcon from '@/material-icons/400-24px/tag.svg?react'; import { WordmarkLogo } from 'mastodon/components/logo'; import { NavigationPortal } from 'mastodon/components/navigation_portal'; import { timelinePreview, trendsEnabled } from 'mastodon/initial_state'; diff --git a/app/javascript/mastodon/features/ui/components/notifications_counter_icon.js b/app/javascript/mastodon/features/ui/components/notifications_counter_icon.js index 34e868acc..7d59d616d 100644 --- a/app/javascript/mastodon/features/ui/components/notifications_counter_icon.js +++ b/app/javascript/mastodon/features/ui/components/notifications_counter_icon.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; -import NotificationsIcon from 'mastodon/../material-icons/400-24px/notifications-fill.svg?react'; +import NotificationsIcon from '@/material-icons/400-24px/notifications-fill.svg?react'; import { IconWithBadge } from 'mastodon/components/icon_with_badge'; diff --git a/app/javascript/mastodon/features/ui/components/report_modal.jsx b/app/javascript/mastodon/features/ui/components/report_modal.jsx index aae0e96ac..658436460 100644 --- a/app/javascript/mastodon/features/ui/components/report_modal.jsx +++ b/app/javascript/mastodon/features/ui/components/report_modal.jsx @@ -7,7 +7,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import CloseIcon from 'mastodon/../material-icons/400-24px/close.svg?react'; +import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { submitReport } from 'mastodon/actions/reports'; import { fetchServer } from 'mastodon/actions/server'; import { expandAccountTimeline } from 'mastodon/actions/timelines'; diff --git a/app/javascript/mastodon/features/ui/components/zoomable_image.jsx b/app/javascript/mastodon/features/ui/components/zoomable_image.jsx index e3fa7c3b8..272a3cff0 100644 --- a/app/javascript/mastodon/features/ui/components/zoomable_image.jsx +++ b/app/javascript/mastodon/features/ui/components/zoomable_image.jsx @@ -3,8 +3,8 @@ import { PureComponent } from 'react'; import { defineMessages, injectIntl } from 'react-intl'; -import FullscreenExitIcon from 'mastodon/../material-icons/400-24px/fullscreen_exit.svg?react'; -import RectangleIcon from 'mastodon/../material-icons/400-24px/rectangle.svg?react'; +import FullscreenExitIcon from '@/material-icons/400-24px/fullscreen_exit.svg?react'; +import RectangleIcon from '@/material-icons/400-24px/rectangle.svg?react'; import { IconButton } from 'mastodon/components/icon_button'; const messages = defineMessages({ diff --git a/app/javascript/mastodon/features/video/index.jsx b/app/javascript/mastodon/features/video/index.jsx index efcbbc174..89a8ba560 100644 --- a/app/javascript/mastodon/features/video/index.jsx +++ b/app/javascript/mastodon/features/video/index.jsx @@ -9,14 +9,14 @@ import { is } from 'immutable'; import { throttle } from 'lodash'; -import FullscreenIcon from 'mastodon/../material-icons/400-24px/fullscreen.svg?react'; -import FullscreenExitIcon from 'mastodon/../material-icons/400-24px/fullscreen_exit.svg?react'; -import PauseIcon from 'mastodon/../material-icons/400-24px/pause.svg?react'; -import PlayArrowIcon from 'mastodon/../material-icons/400-24px/play_arrow-fill.svg?react'; -import RectangleIcon from 'mastodon/../material-icons/400-24px/rectangle.svg?react'; -import VisibilityOffIcon from 'mastodon/../material-icons/400-24px/visibility_off.svg?react'; -import VolumeOffIcon from 'mastodon/../material-icons/400-24px/volume_off-fill.svg?react'; -import VolumeUpIcon from 'mastodon/../material-icons/400-24px/volume_up-fill.svg?react'; +import FullscreenIcon from '@/material-icons/400-24px/fullscreen.svg?react'; +import FullscreenExitIcon from '@/material-icons/400-24px/fullscreen_exit.svg?react'; +import PauseIcon from '@/material-icons/400-24px/pause.svg?react'; +import PlayArrowIcon from '@/material-icons/400-24px/play_arrow-fill.svg?react'; +import RectangleIcon from '@/material-icons/400-24px/rectangle.svg?react'; +import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react'; +import VolumeOffIcon from '@/material-icons/400-24px/volume_off-fill.svg?react'; +import VolumeUpIcon from '@/material-icons/400-24px/volume_up-fill.svg?react'; import { Blurhash } from 'mastodon/components/blurhash'; import { Icon } from 'mastodon/components/icon'; import { playerSettings } from 'mastodon/settings'; diff --git a/config/webpack/shared.js b/config/webpack/shared.js index 7c00d85d3..8e77a840a 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -96,6 +96,9 @@ module.exports = { resolve(settings.source_path), 'node_modules', ], + alias: { + "@": resolve(settings.source_path), + } }, resolveLoader: { diff --git a/lib/tasks/icons.rake b/lib/tasks/icons.rake index 3e3d0daac..374ea149f 100644 --- a/lib/tasks/icons.rake +++ b/lib/tasks/icons.rake @@ -22,7 +22,7 @@ def find_used_icons Dir[Rails.root.join('app', 'javascript', '**', '*.*s*')].map do |path| File.open(path, 'r') do |file| - pattern = %r{\Aimport .* from 'mastodon/../material-icons/(?[0-9]+)-(?[0-9]+)px/(?[^-]*)(?-fill)?.svg\?react';} + pattern = %r{\Aimport .* from '@/material-icons/(?[0-9]+)-(?[0-9]+)px/(?[^-]*)(?-fill)?.svg\?react';} file.each_line do |line| match = pattern.match(line) next if match.blank? diff --git a/tsconfig.json b/tsconfig.json index d1a77e549..a193ea35f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,8 @@ "tsBuildInfoFile": "tmp/cache/tsconfig.tsbuildinfo", "paths": { "mastodon": ["app/javascript/mastodon"], - "mastodon/*": ["app/javascript/mastodon/*"] + "mastodon/*": ["app/javascript/mastodon/*"], + "@/*": ["app/javascript/*"] } }, "include": [