From 41a08c613bfe139b947dcb07e262111e077298fe Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Wed, 16 Nov 2022 09:04:40 -0500 Subject: [PATCH] Organize modals into modals/ subfolder --- .../{ => modals}/account-note-modal.tsx | 0 .../components/{ => modals}/actions-modal.tsx | 2 +- .../{ => modals}/birthdays-modal.tsx | 0 .../components/{ => modals}/boost-modal.tsx | 0 .../{ => modals}/compare-history-modal.tsx | 0 .../{ => modals}/component-modal.tsx | 0 .../components/{ => modals}/compose-modal.tsx | 2 +- .../{ => modals}/confirmation-modal.tsx | 0 .../{ => modals}/crypto-donate-modal.tsx | 2 +- .../{ => modals}/edit-federation-modal.tsx | 0 .../components/{ => modals}/embed-modal.tsx | 0 .../{ => modals}/familiar-followers-modal.tsx | 0 .../components/{ => modals}/hotkeys-modal.tsx | 0 .../components/{ => modals}/media-modal.tsx | 2 +- .../{ => modals}/mentions-modal.tsx | 0 .../missing-description-modal.tsx | 0 .../ui/components/{ => modals}/mute-modal.tsx | 0 .../{ => modals}/reactions-modal.tsx | 0 .../components/{ => modals}/reblogs-modal.tsx | 0 .../{ => modals}/reply-mentions-modal.tsx | 2 +- .../{ => modals}/unauthorized-modal.tsx | 0 .../components/{ => modals}/video-modal.tsx | 0 .../features/ui/util/async-components.ts | 44 +++++++++---------- 23 files changed, 27 insertions(+), 27 deletions(-) rename app/soapbox/features/ui/components/{ => modals}/account-note-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/actions-modal.tsx (98%) rename app/soapbox/features/ui/components/{ => modals}/birthdays-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/boost-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/compare-history-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/component-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/compose-modal.tsx (97%) rename app/soapbox/features/ui/components/{ => modals}/confirmation-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/crypto-donate-modal.tsx (85%) rename app/soapbox/features/ui/components/{ => modals}/edit-federation-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/embed-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/familiar-followers-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/hotkeys-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/media-modal.tsx (99%) rename app/soapbox/features/ui/components/{ => modals}/mentions-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/missing-description-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/mute-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/reactions-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/reblogs-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/reply-mentions-modal.tsx (96%) rename app/soapbox/features/ui/components/{ => modals}/unauthorized-modal.tsx (100%) rename app/soapbox/features/ui/components/{ => modals}/video-modal.tsx (100%) diff --git a/app/soapbox/features/ui/components/account-note-modal.tsx b/app/soapbox/features/ui/components/modals/account-note-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/account-note-modal.tsx rename to app/soapbox/features/ui/components/modals/account-note-modal.tsx diff --git a/app/soapbox/features/ui/components/actions-modal.tsx b/app/soapbox/features/ui/components/modals/actions-modal.tsx similarity index 98% rename from app/soapbox/features/ui/components/actions-modal.tsx rename to app/soapbox/features/ui/components/modals/actions-modal.tsx index 9e833be16..7648069fa 100644 --- a/app/soapbox/features/ui/components/actions-modal.tsx +++ b/app/soapbox/features/ui/components/modals/actions-modal.tsx @@ -8,7 +8,7 @@ import StatusContent from 'soapbox/components/status-content'; import { Stack } from 'soapbox/components/ui'; import AccountContainer from 'soapbox/containers/account-container'; -import Motion from '../util/optional-motion'; +import Motion from '../../util/optional-motion'; import type { Menu, MenuItem } from 'soapbox/components/dropdown-menu'; import type { Status as StatusEntity } from 'soapbox/types/entities'; diff --git a/app/soapbox/features/ui/components/birthdays-modal.tsx b/app/soapbox/features/ui/components/modals/birthdays-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/birthdays-modal.tsx rename to app/soapbox/features/ui/components/modals/birthdays-modal.tsx diff --git a/app/soapbox/features/ui/components/boost-modal.tsx b/app/soapbox/features/ui/components/modals/boost-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/boost-modal.tsx rename to app/soapbox/features/ui/components/modals/boost-modal.tsx diff --git a/app/soapbox/features/ui/components/compare-history-modal.tsx b/app/soapbox/features/ui/components/modals/compare-history-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/compare-history-modal.tsx rename to app/soapbox/features/ui/components/modals/compare-history-modal.tsx diff --git a/app/soapbox/features/ui/components/component-modal.tsx b/app/soapbox/features/ui/components/modals/component-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/component-modal.tsx rename to app/soapbox/features/ui/components/modals/component-modal.tsx diff --git a/app/soapbox/features/ui/components/compose-modal.tsx b/app/soapbox/features/ui/components/modals/compose-modal.tsx similarity index 97% rename from app/soapbox/features/ui/components/compose-modal.tsx rename to app/soapbox/features/ui/components/modals/compose-modal.tsx index 703f3e46f..bf2cdd562 100644 --- a/app/soapbox/features/ui/components/compose-modal.tsx +++ b/app/soapbox/features/ui/components/modals/compose-modal.tsx @@ -7,7 +7,7 @@ import { checkComposeContent } from 'soapbox/components/modal-root'; import { Modal } from 'soapbox/components/ui'; import { useAppDispatch, useCompose } from 'soapbox/hooks'; -import ComposeForm from '../../compose/components/compose-form'; +import ComposeForm from '../../../compose/components/compose-form'; const messages = defineMessages({ close: { id: 'lightbox.close', defaultMessage: 'Close' }, diff --git a/app/soapbox/features/ui/components/confirmation-modal.tsx b/app/soapbox/features/ui/components/modals/confirmation-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/confirmation-modal.tsx rename to app/soapbox/features/ui/components/modals/confirmation-modal.tsx diff --git a/app/soapbox/features/ui/components/crypto-donate-modal.tsx b/app/soapbox/features/ui/components/modals/crypto-donate-modal.tsx similarity index 85% rename from app/soapbox/features/ui/components/crypto-donate-modal.tsx rename to app/soapbox/features/ui/components/modals/crypto-donate-modal.tsx index 48a9ccd00..c1724ee78 100644 --- a/app/soapbox/features/ui/components/crypto-donate-modal.tsx +++ b/app/soapbox/features/ui/components/modals/crypto-donate-modal.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { Modal } from 'soapbox/components/ui'; import DetailedCryptoAddress from 'soapbox/features/crypto-donate/components/detailed-crypto-address'; -import type { ICryptoAddress } from '../../crypto-donate/components/crypto-address'; +import type { ICryptoAddress } from '../../../crypto-donate/components/crypto-address'; const CryptoDonateModal: React.FC void }> = ({ onClose, ...props }) => { diff --git a/app/soapbox/features/ui/components/edit-federation-modal.tsx b/app/soapbox/features/ui/components/modals/edit-federation-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/edit-federation-modal.tsx rename to app/soapbox/features/ui/components/modals/edit-federation-modal.tsx diff --git a/app/soapbox/features/ui/components/embed-modal.tsx b/app/soapbox/features/ui/components/modals/embed-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/embed-modal.tsx rename to app/soapbox/features/ui/components/modals/embed-modal.tsx diff --git a/app/soapbox/features/ui/components/familiar-followers-modal.tsx b/app/soapbox/features/ui/components/modals/familiar-followers-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/familiar-followers-modal.tsx rename to app/soapbox/features/ui/components/modals/familiar-followers-modal.tsx diff --git a/app/soapbox/features/ui/components/hotkeys-modal.tsx b/app/soapbox/features/ui/components/modals/hotkeys-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/hotkeys-modal.tsx rename to app/soapbox/features/ui/components/modals/hotkeys-modal.tsx diff --git a/app/soapbox/features/ui/components/media-modal.tsx b/app/soapbox/features/ui/components/modals/media-modal.tsx similarity index 99% rename from app/soapbox/features/ui/components/media-modal.tsx rename to app/soapbox/features/ui/components/modals/media-modal.tsx index be80a27e4..6ed8ef435 100644 --- a/app/soapbox/features/ui/components/media-modal.tsx +++ b/app/soapbox/features/ui/components/modals/media-modal.tsx @@ -10,7 +10,7 @@ import IconButton from 'soapbox/components/icon-button'; import Audio from 'soapbox/features/audio'; import Video from 'soapbox/features/video'; -import ImageLoader from './image-loader'; +import ImageLoader from '../image-loader'; import type { List as ImmutableList } from 'immutable'; import type { Account, Attachment, Status } from 'soapbox/types/entities'; diff --git a/app/soapbox/features/ui/components/mentions-modal.tsx b/app/soapbox/features/ui/components/modals/mentions-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/mentions-modal.tsx rename to app/soapbox/features/ui/components/modals/mentions-modal.tsx diff --git a/app/soapbox/features/ui/components/missing-description-modal.tsx b/app/soapbox/features/ui/components/modals/missing-description-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/missing-description-modal.tsx rename to app/soapbox/features/ui/components/modals/missing-description-modal.tsx diff --git a/app/soapbox/features/ui/components/mute-modal.tsx b/app/soapbox/features/ui/components/modals/mute-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/mute-modal.tsx rename to app/soapbox/features/ui/components/modals/mute-modal.tsx diff --git a/app/soapbox/features/ui/components/reactions-modal.tsx b/app/soapbox/features/ui/components/modals/reactions-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/reactions-modal.tsx rename to app/soapbox/features/ui/components/modals/reactions-modal.tsx diff --git a/app/soapbox/features/ui/components/reblogs-modal.tsx b/app/soapbox/features/ui/components/modals/reblogs-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/reblogs-modal.tsx rename to app/soapbox/features/ui/components/modals/reblogs-modal.tsx diff --git a/app/soapbox/features/ui/components/reply-mentions-modal.tsx b/app/soapbox/features/ui/components/modals/reply-mentions-modal.tsx similarity index 96% rename from app/soapbox/features/ui/components/reply-mentions-modal.tsx rename to app/soapbox/features/ui/components/modals/reply-mentions-modal.tsx index 00be2e19f..eb85d4ecb 100644 --- a/app/soapbox/features/ui/components/reply-mentions-modal.tsx +++ b/app/soapbox/features/ui/components/modals/reply-mentions-modal.tsx @@ -6,7 +6,7 @@ import { useAppSelector, useCompose } from 'soapbox/hooks'; import { statusToMentionsAccountIdsArray } from 'soapbox/reducers/compose'; import { makeGetStatus } from 'soapbox/selectors'; -import Account from '../../reply-mentions/account'; +import Account from '../../../reply-mentions/account'; import type { Account as AccountEntity, Status as StatusEntity } from 'soapbox/types/entities'; diff --git a/app/soapbox/features/ui/components/unauthorized-modal.tsx b/app/soapbox/features/ui/components/modals/unauthorized-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/unauthorized-modal.tsx rename to app/soapbox/features/ui/components/modals/unauthorized-modal.tsx diff --git a/app/soapbox/features/ui/components/video-modal.tsx b/app/soapbox/features/ui/components/modals/video-modal.tsx similarity index 100% rename from app/soapbox/features/ui/components/video-modal.tsx rename to app/soapbox/features/ui/components/modals/video-modal.tsx diff --git a/app/soapbox/features/ui/util/async-components.ts b/app/soapbox/features/ui/util/async-components.ts index 8280a59c2..23f221cea 100644 --- a/app/soapbox/features/ui/util/async-components.ts +++ b/app/soapbox/features/ui/util/async-components.ts @@ -95,7 +95,7 @@ export function Mutes() { } export function MuteModal() { - return import(/* webpackChunkName: "modals/mute_modal" */'../components/mute-modal'); + return import(/* webpackChunkName: "modals/mute_modal" */'../components/modals/mute-modal'); } export function Filters() { @@ -123,59 +123,59 @@ export function Audio() { } export function MediaModal() { - return import(/* webpackChunkName: "features/ui" */'../components/media-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/media-modal'); } export function VideoModal() { - return import(/* webpackChunkName: "features/ui" */'../components/video-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/video-modal'); } export function BoostModal() { - return import(/* webpackChunkName: "features/ui" */'../components/boost-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/boost-modal'); } export function ConfirmationModal() { - return import(/* webpackChunkName: "features/ui" */'../components/confirmation-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/confirmation-modal'); } export function MissingDescriptionModal() { - return import(/* webpackChunkName: "features/ui" */'../components/missing-description-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/missing-description-modal'); } export function ActionsModal() { - return import(/* webpackChunkName: "features/ui" */'../components/actions-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/actions-modal'); } export function HotkeysModal() { - return import(/* webpackChunkName: "features/ui" */'../components/hotkeys-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/hotkeys-modal'); } export function ComposeModal() { - return import(/* webpackChunkName: "features/ui" */'../components/compose-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/compose-modal'); } export function ReplyMentionsModal() { - return import(/* webpackChunkName: "features/ui" */'../components/reply-mentions-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/reply-mentions-modal'); } export function UnauthorizedModal() { - return import(/* webpackChunkName: "features/ui" */'../components/unauthorized-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/unauthorized-modal'); } export function EditFederationModal() { - return import(/* webpackChunkName: "features/ui" */'../components/edit-federation-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/edit-federation-modal'); } export function EmbedModal() { - return import(/* webpackChunkName: "modals/embed_modal" */'../components/embed-modal'); + return import(/* webpackChunkName: "modals/embed_modal" */'../components/modals/embed-modal'); } export function ComponentModal() { - return import(/* webpackChunkName: "features/ui" */'../components/component-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/component-modal'); } export function ReblogsModal() { - return import(/* webpackChunkName: "features/ui" */'../components/reblogs-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/reblogs-modal'); } export function FavouritesModal() { @@ -183,11 +183,11 @@ export function FavouritesModal() { } export function ReactionsModal() { - return import(/* webpackChunkName: "features/ui" */'../components/reactions-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/reactions-modal'); } export function MentionsModal() { - return import(/* webpackChunkName: "features/ui" */'../components/mentions-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/mentions-modal'); } export function LandingPageModal() { @@ -195,7 +195,7 @@ export function LandingPageModal() { } export function BirthdaysModal() { - return import(/* webpackChunkName: "features/ui" */'../components/birthdays-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/birthdays-modal'); } export function BirthdayPanel() { @@ -203,7 +203,7 @@ export function BirthdayPanel() { } export function AccountNoteModal() { - return import(/* webpackChunkName: "features/ui" */'../components/account-note-modal'); + return import(/* webpackChunkName: "features/ui" */'../components/modals/account-note-modal'); } export function ListEditor() { @@ -399,7 +399,7 @@ export function CryptoAddress() { } export function CryptoDonateModal() { - return import(/* webpackChunkName: "features/crypto_donate" */'../components/crypto-donate-modal'); + return import(/* webpackChunkName: "features/crypto_donate" */'../components/modals/crypto-donate-modal'); } export function ScheduledStatuses() { @@ -487,7 +487,7 @@ export function WaitlistPage() { } export function CompareHistoryModal() { - return import(/*webpackChunkName: "modals/compare_history_modal" */'../components/compare-history-modal'); + return import(/*webpackChunkName: "modals/compare_history_modal" */'../components/modals/compare-history-modal'); } export function AuthTokenList() { @@ -499,7 +499,7 @@ export function VerifySmsModal() { } export function FamiliarFollowersModal() { - return import(/*webpackChunkName: "modals/familiar_followers_modal" */'../components/familiar-followers-modal'); + return import(/*webpackChunkName: "modals/familiar_followers_modal" */'../components/modals/familiar-followers-modal'); } export function AnnouncementsPanel() {