From abc40de47bb11d1288d12e1a0229b63b2d96d8dc Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sat, 5 Oct 2024 19:24:45 +0200 Subject: [PATCH] Move collection files into new folder --- src/components/navbar/action/CategorySelect.tsx | 2 +- src/modules/chapter/components/ChapterList.tsx | 6 +++--- .../chapter/components/actions/ChapterActionMenuItems.tsx | 2 +- .../components}/SelectableCollectionSelectAll.tsx | 0 .../components}/SelectableCollectionSelectMode.tsx | 2 +- .../collection/components}/SelectionFAB.tsx | 0 .../collection/hooks}/useSelectableCollection.ts | 0 src/modules/manga/MangaCard.types.tsx | 2 +- src/modules/manga/components/MangaActionMenuItems.tsx | 2 +- src/modules/manga/components/MangaGrid.tsx | 2 +- src/modules/manga/components/MangaOptionButton.tsx | 2 +- src/screens/Library.tsx | 6 +++--- 12 files changed, 13 insertions(+), 13 deletions(-) rename src/{components/collection => modules/collection/components}/SelectableCollectionSelectAll.tsx (100%) rename src/{components/collection => modules/collection/components}/SelectableCollectionSelectMode.tsx (93%) rename src/{components/collection => modules/collection/components}/SelectionFAB.tsx (100%) rename src/{components/collection => modules/collection/hooks}/useSelectableCollection.ts (100%) diff --git a/src/components/navbar/action/CategorySelect.tsx b/src/components/navbar/action/CategorySelect.tsx index 3ba801b6..3a86e692 100644 --- a/src/components/navbar/action/CategorySelect.tsx +++ b/src/components/navbar/action/CategorySelect.tsx @@ -18,7 +18,7 @@ import { Link } from 'react-router-dom'; import Stack from '@mui/material/Stack'; import { requestManager } from '@/lib/requests/requests/RequestManager.ts'; import { Mangas } from '@/modules/manga/services/Mangas.ts'; -import { useSelectableCollection } from '@/components/collection/useSelectableCollection.ts'; +import { useSelectableCollection } from '@/modules/collection/hooks/useSelectableCollection.ts'; import { ThreeStateCheckboxInput } from '@/modules/core/components/inputs/ThreeStateCheckboxInput.tsx'; import { Categories } from '@/lib/data/Categories.ts'; import { CheckboxInput } from '@/modules/core/components/inputs/CheckboxInput.tsx'; diff --git a/src/modules/chapter/components/ChapterList.tsx b/src/modules/chapter/components/ChapterList.tsx index 81fb72ea..261407dd 100644 --- a/src/modules/chapter/components/ChapterList.tsx +++ b/src/modules/chapter/components/ChapterList.tsx @@ -25,15 +25,15 @@ import { ResumeFab } from '@/modules/manga/components/ResumeFAB.tsx'; import { filterAndSortChapters } from '@/modules/chapter/utils/ChapterList.util.tsx'; import { EmptyViewAbsoluteCentered } from '@/modules/core/components/placeholder/EmptyViewAbsoluteCentered.tsx'; import { ChaptersToolbarMenu } from '@/modules/chapter/components/ChaptersToolbarMenu.tsx'; -import { SelectionFAB } from '@/components/collection/SelectionFAB.tsx'; +import { SelectionFAB } from '@/modules/collection/components/SelectionFAB.tsx'; import { DEFAULT_FULL_FAB_HEIGHT } from '@/modules/core/components/buttons/StyledFab.tsx'; import { GetChaptersMangaQuery, GetChaptersMangaQueryVariables, MangaScreenFieldsFragment, } from '@/lib/graphql/generated/graphql.ts'; -import { useSelectableCollection } from '@/components/collection/useSelectableCollection.ts'; -import { SelectableCollectionSelectAll } from '@/components/collection/SelectableCollectionSelectAll.tsx'; +import { useSelectableCollection } from '@/modules/collection/hooks/useSelectableCollection.ts'; +import { SelectableCollectionSelectAll } from '@/modules/collection/components/SelectableCollectionSelectAll.tsx'; import { Chapters } from '@/modules/chapter/services/Chapters.ts'; import { ChaptersWithMeta, ChapterWithMetaType } from '@/modules/chapter/services/ChaptersWithMeta.ts'; import { ChapterActionMenuItems } from '@/modules/chapter/components/actions/ChapterActionMenuItems.tsx'; diff --git a/src/modules/chapter/components/actions/ChapterActionMenuItems.tsx b/src/modules/chapter/components/actions/ChapterActionMenuItems.tsx index 7c727212..57135a5d 100644 --- a/src/modules/chapter/components/actions/ChapterActionMenuItems.tsx +++ b/src/modules/chapter/components/actions/ChapterActionMenuItems.tsx @@ -17,7 +17,7 @@ import BookmarkAdd from '@mui/icons-material/BookmarkAdd'; import DoneAll from '@mui/icons-material/DoneAll'; import { useMemo } from 'react'; import LaunchIcon from '@mui/icons-material/Launch'; -import { SelectableCollectionReturnType } from '@/components/collection/useSelectableCollection.ts'; +import { SelectableCollectionReturnType } from '@/modules/collection/hooks/useSelectableCollection.ts'; import { actionToTranslationKey, ChapterAction, diff --git a/src/components/collection/SelectableCollectionSelectAll.tsx b/src/modules/collection/components/SelectableCollectionSelectAll.tsx similarity index 100% rename from src/components/collection/SelectableCollectionSelectAll.tsx rename to src/modules/collection/components/SelectableCollectionSelectAll.tsx diff --git a/src/components/collection/SelectableCollectionSelectMode.tsx b/src/modules/collection/components/SelectableCollectionSelectMode.tsx similarity index 93% rename from src/components/collection/SelectableCollectionSelectMode.tsx rename to src/modules/collection/components/SelectableCollectionSelectMode.tsx index f99f9903..ce372fbc 100644 --- a/src/components/collection/SelectableCollectionSelectMode.tsx +++ b/src/modules/collection/components/SelectableCollectionSelectMode.tsx @@ -10,7 +10,7 @@ import Tooltip from '@mui/material/Tooltip'; import Checkbox from '@mui/material/Checkbox'; import { useTranslation } from 'react-i18next'; import ClearIcon from '@mui/icons-material/Clear'; -import { SelectableCollectionSelectAll } from '@/components/collection/SelectableCollectionSelectAll.tsx'; +import { SelectableCollectionSelectAll } from '@/modules/collection/components/SelectableCollectionSelectAll.tsx'; export const SelectableCollectionSelectMode = ({ isActive, diff --git a/src/components/collection/SelectionFAB.tsx b/src/modules/collection/components/SelectionFAB.tsx similarity index 100% rename from src/components/collection/SelectionFAB.tsx rename to src/modules/collection/components/SelectionFAB.tsx diff --git a/src/components/collection/useSelectableCollection.ts b/src/modules/collection/hooks/useSelectableCollection.ts similarity index 100% rename from src/components/collection/useSelectableCollection.ts rename to src/modules/collection/hooks/useSelectableCollection.ts diff --git a/src/modules/manga/MangaCard.types.tsx b/src/modules/manga/MangaCard.types.tsx index 66de2e93..67b4d119 100644 --- a/src/modules/manga/MangaCard.types.tsx +++ b/src/modules/manga/MangaCard.types.tsx @@ -9,7 +9,7 @@ import { LongPressPointerHandlers, LongPressResult } from 'use-long-press/lib/use-long-press.types'; import { PopupState } from 'material-ui-popup-state/hooks'; import { GridLayout } from '@/components/context/LibraryOptionsContext.tsx'; -import { SelectableCollectionReturnType } from '@/components/collection/useSelectableCollection.ts'; +import { SelectableCollectionReturnType } from '@/modules/collection/hooks/useSelectableCollection.ts'; import { useManageMangaLibraryState } from '@/modules/manga/hooks/useManageMangaLibraryState.tsx'; import { MangaThumbnailInfo } from '@/modules/manga/services/Mangas.ts'; import { ChapterType, MangaType } from '@/lib/graphql/generated/graphql.ts'; diff --git a/src/modules/manga/components/MangaActionMenuItems.tsx b/src/modules/manga/components/MangaActionMenuItems.tsx index 72d984d2..a4d8fb21 100644 --- a/src/modules/manga/components/MangaActionMenuItems.tsx +++ b/src/modules/manga/components/MangaActionMenuItems.tsx @@ -27,7 +27,7 @@ import { Mangas, MangaUnreadInfo, } from '@/modules/manga/services/Mangas.ts'; -import { SelectableCollectionReturnType } from '@/components/collection/useSelectableCollection.ts'; +import { SelectableCollectionReturnType } from '@/modules/collection/hooks/useSelectableCollection.ts'; import { MenuItem } from '@/modules/core/components/menu/MenuItem.tsx'; import { createGetMenuItemTitle, diff --git a/src/modules/manga/components/MangaGrid.tsx b/src/modules/manga/components/MangaGrid.tsx index 8e99b50d..35d4731f 100644 --- a/src/modules/manga/components/MangaGrid.tsx +++ b/src/modules/manga/components/MangaGrid.tsx @@ -26,7 +26,7 @@ import { LoadingPlaceholder } from '@/modules/core/components/placeholder/Loadin import { MangaCard } from '@/modules/manga/components/cards/MangaCard.tsx'; import { GridLayout } from '@/components/context/LibraryOptionsContext'; import { useLocalStorage, useSessionStorage } from '@/modules/core/hooks/useStorage.tsx'; -import { SelectableCollectionReturnType } from '@/components/collection/useSelectableCollection.ts'; +import { SelectableCollectionReturnType } from '@/modules/collection/hooks/useSelectableCollection.ts'; import { DEFAULT_FULL_FAB_HEIGHT } from '@/modules/core/components/buttons/StyledFab.tsx'; import { AppStorage } from '@/lib/AppStorage.ts'; import { MangaCardProps } from '@/modules/manga/MangaCard.types.tsx'; diff --git a/src/modules/manga/components/MangaOptionButton.tsx b/src/modules/manga/components/MangaOptionButton.tsx index b83868fd..5045f209 100644 --- a/src/modules/manga/components/MangaOptionButton.tsx +++ b/src/modules/manga/components/MangaOptionButton.tsx @@ -15,7 +15,7 @@ import IconButton from '@mui/material/IconButton'; import MoreVertIcon from '@mui/icons-material/MoreVert'; import { PopupState } from 'material-ui-popup-state/hooks'; import { bindTrigger } from 'material-ui-popup-state'; -import { SelectableCollectionReturnType } from '@/components/collection/useSelectableCollection.ts'; +import { SelectableCollectionReturnType } from '@/modules/collection/hooks/useSelectableCollection.ts'; import { MediaQuery } from '@/lib/ui/MediaQuery.tsx'; import { MangaType } from '@/lib/graphql/generated/graphql.ts'; diff --git a/src/screens/Library.tsx b/src/screens/Library.tsx index c0b29c22..60294326 100644 --- a/src/screens/Library.tsx +++ b/src/screens/Library.tsx @@ -21,10 +21,10 @@ import { LibraryMangaGrid } from '@/components/library/LibraryMangaGrid'; import { AppbarSearch } from '@/modules/core/components/AppbarSearch.tsx'; import { UpdateChecker } from '@/modules/core/components/UpdateChecker.tsx'; import { NavBarContext } from '@/components/context/NavbarContext.tsx'; -import { useSelectableCollection } from '@/components/collection/useSelectableCollection.ts'; -import { SelectableCollectionSelectMode } from '@/components/collection/SelectableCollectionSelectMode.tsx'; +import { useSelectableCollection } from '@/modules/collection/hooks/useSelectableCollection.ts'; +import { SelectableCollectionSelectMode } from '@/modules/collection/components/SelectableCollectionSelectMode.tsx'; import { useGetVisibleLibraryMangas } from '@/components/library/useGetVisibleLibraryMangas.ts'; -import { SelectionFAB } from '@/components/collection/SelectionFAB.tsx'; +import { SelectionFAB } from '@/modules/collection/components/SelectionFAB.tsx'; import { MangaActionMenuItems } from '@/modules/manga/components/MangaActionMenuItems.tsx'; import { TabsMenu } from '@/modules/core/components/tabs/TabsMenu.tsx'; import { TabsWrapper } from '@/modules/core/components/tabs/TabsWrapper.tsx';