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 59d31a3038..c5ac046751 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 bac8096566..646655c249 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 f803f86289..af38c1e110 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 3e53902de6..901888e750 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 c5216e8f80..0c3c6c290b 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 d3bc28b9b9..bc40e46f8d 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 637c286ce4..ed5e8e7e4c 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 a8fcfd1097..04c8bb0980 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 7497ab9922..4ca00f8dda 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 948492d91c..f388380c44 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 2a233b6a1c..1d4193a359 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 928aa29a7c..b7f8bd6695 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 c387bb8698..e5200371ae 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 e8cfe6cb32..50f91a9275 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 f85c47bb40..c7036d111b 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 052e25f25f..d42a7d7c72 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 224c8baded..ff4fe92525 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 e1e0164642..bfe77a4900 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 6f28f6d6d5..4a7ba941eb 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 4209f68319..626cc500d6 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 1a75261427..d6ad4095eb 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 bffac6357a..3287631ed1 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 a8b61f9eaf..d57fd030b2 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 6f58ae35f1..233d208c64 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 a35092893d..087e775753 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 9008e05383..fdc1b0be0f 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 656784664f..1a631d3d07 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 15db945956..5494ad44b0 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 5bf66c2a34..0aa1f9aa23 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 bacafaf1e1..411ad77c79 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 a099707dfb..fd66874e71 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 e6ecba1a07..4900d38119 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 1815e22e6f..929b2be57a 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 67298c8c43..c3446b8d60 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 f16a37347c..8051e01db4 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 844958bab6..0bcc41b929 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 8a63a01c89..694deea04e 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 cb31145e8d..76d394af7a 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 090af86b27..923d6a3c47 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 8ed09b36ba..e4973b24fd 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 a19ae71e8e..ea3a149501 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 9ae95dabe9..274cfa69f5 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 effc9f29db..af29d7a5b8 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 32d79f23fc..0d3408146e 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 5c9b70f02b..964eada9c1 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 96a39f6b35..8ebaccd013 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 891bddf737..355c0f1c4c 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 29fc6925d6..8e65ff5b68 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 ffab6f02c9..27ca169409 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 9bf0c3c8e5..5b2eb64952 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 22c11a182f..6355efbfe0 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 1f40e05992..dd308c87cb 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 683c7b4070..7d651f2ca6 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 de3d7670ec..21248e6de9 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 6b752df1bd..ea36cefd7d 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 68ea201387..53bb22ddb2 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 35ed4dc609..f431a7e9b7 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 9eeec00e34..960d30e2ca 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 1f93278c06..069f52b0be 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 1d503b7343..07f1e6fe5a 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 6d1df6dd0d..622ca525c1 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 54ac940da4..a7cfd60bf3 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 f406f24fa7..77d32af80a 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 ad29d08a93..89f596636e 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 4c4138c751..097d4f3f41 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 aa87adf52a..24bf122fac 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 b20bbc6b78..a7648f55b2 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 316eaba220..3b50244ea4 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 ac7860efd4..73eaecba59 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 f5651a7d44..c288c2c0de 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 c6a039adb5..4024455cbd 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 35b31fcd47..d7101f8384 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 a577abd864..1cdf5b5dfe 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 0751f1620c..30c63ed32a 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 46c9b1645d..a2a1653b8a 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 9271468da0..5900b9ec76 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 5217b42ad5..14250ae39b 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 cde63d0b34..32a86ab6cc 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 d60cd5e1ef..8dfbf54cb6 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 12a5566d39..31073d7387 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 3d6dc753e3..921e9a6072 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 302a2956ed..3601dfeae8 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 0d5183fb88..3d1fc94cb7 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 d6949f0c51..7aa0dd1379 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 b760824558..4cb06aac2c 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 c211dc64c8..f37b558c4c 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 2ebafe7b48..437e9e86bf 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 c8ccddddbe..a3034bb570 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 8c1a8f486c..0531346f91 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 7e9d8c9819..3b3e1e3f97 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 dd2a10608d..d1c9e36883 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 1080c303c5..4227c74131 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 595e9771b5..a4e5fc9dfb 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 25cda00bea..477575bd7b 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 a3bb22bd99..25ad1e2e9f 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 6df753b069..4aa0092631 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 b4f388ba84..2f8636b12a 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 5a700dc1f7..f08ce15342 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 634f13e611..fec21f14ca 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 b5b5d88693..0f6e8a727b 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 72da652b3d..d3f46c6d46 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 34e868acc8..7d59d616d8 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 aae0e96ac4..6584364609 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 e3fa7c3b8a..272a3cff00 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 efcbbc174e..89a8ba560a 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 7c00d85d36..8e77a840a5 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 3e3d0daac5..374ea149fe 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 d1a77e5493..a193ea35f2 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": [