From 3e98b5172d45ab245bd45f966c8330c258c886b2 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sat, 4 Oct 2025 00:14:11 +0200 Subject: [PATCH] Move "SelectableCollection" to "base" folder --- .../collection/components/SelectableCollectionSelectAll.tsx | 0 .../components/SelectableCollectionSelectMode.tsx | 2 +- .../collection/components/SelectionFAB.tsx | 0 .../collection/hooks/useSelectableCollection.ts | 0 src/base/components/settings/CheckboxListSetting.tsx | 2 +- src/features/category/components/CategorySelect.tsx | 2 +- src/features/chapter/components/ChapterList.tsx | 6 +++--- .../chapter/components/actions/ChapterActionMenuItems.tsx | 2 +- src/features/library/screens/Library.tsx | 6 +++--- src/features/manga/Manga.types.ts | 2 +- src/features/manga/components/MangaActionMenuItems.tsx | 2 +- src/features/manga/components/MangaGrid.tsx | 2 +- src/features/manga/components/MangaOptionButton.tsx | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) rename src/{features => base}/collection/components/SelectableCollectionSelectAll.tsx (100%) rename src/{features => base}/collection/components/SelectableCollectionSelectMode.tsx (93%) rename src/{features => base}/collection/components/SelectionFAB.tsx (100%) rename src/{features => base}/collection/hooks/useSelectableCollection.ts (100%) diff --git a/src/features/collection/components/SelectableCollectionSelectAll.tsx b/src/base/collection/components/SelectableCollectionSelectAll.tsx similarity index 100% rename from src/features/collection/components/SelectableCollectionSelectAll.tsx rename to src/base/collection/components/SelectableCollectionSelectAll.tsx diff --git a/src/features/collection/components/SelectableCollectionSelectMode.tsx b/src/base/collection/components/SelectableCollectionSelectMode.tsx similarity index 93% rename from src/features/collection/components/SelectableCollectionSelectMode.tsx rename to src/base/collection/components/SelectableCollectionSelectMode.tsx index 6605aa5a..1b8d5d58 100644 --- a/src/features/collection/components/SelectableCollectionSelectMode.tsx +++ b/src/base/collection/components/SelectableCollectionSelectMode.tsx @@ -10,7 +10,7 @@ import Checkbox from '@mui/material/Checkbox'; import { useTranslation } from 'react-i18next'; import ClearIcon from '@mui/icons-material/Clear'; import { CustomTooltip } from '@/base/components/CustomTooltip.tsx'; -import { SelectableCollectionSelectAll } from '@/features/collection/components/SelectableCollectionSelectAll.tsx'; +import { SelectableCollectionSelectAll } from '@/base/collection/components/SelectableCollectionSelectAll.tsx'; export const SelectableCollectionSelectMode = ({ isActive, diff --git a/src/features/collection/components/SelectionFAB.tsx b/src/base/collection/components/SelectionFAB.tsx similarity index 100% rename from src/features/collection/components/SelectionFAB.tsx rename to src/base/collection/components/SelectionFAB.tsx diff --git a/src/features/collection/hooks/useSelectableCollection.ts b/src/base/collection/hooks/useSelectableCollection.ts similarity index 100% rename from src/features/collection/hooks/useSelectableCollection.ts rename to src/base/collection/hooks/useSelectableCollection.ts diff --git a/src/base/components/settings/CheckboxListSetting.tsx b/src/base/components/settings/CheckboxListSetting.tsx index 2c138d3c..be8b6d6e 100644 --- a/src/base/components/settings/CheckboxListSetting.tsx +++ b/src/base/components/settings/CheckboxListSetting.tsx @@ -17,7 +17,7 @@ import Stack from '@mui/material/Stack'; import { useCallback, useMemo } from 'react'; import { CheckboxProps } from '@mui/material/Checkbox'; import { CheckboxInput } from '@/base/components/inputs/CheckboxInput.tsx'; -import { useSelectableCollection } from '@/features/collection/hooks/useSelectableCollection.ts'; +import { useSelectableCollection } from '@/base/collection/hooks/useSelectableCollection.ts'; export function CheckboxListSetting({ title, diff --git a/src/features/category/components/CategorySelect.tsx b/src/features/category/components/CategorySelect.tsx index d16e21c0..0e113798 100644 --- a/src/features/category/components/CategorySelect.tsx +++ b/src/features/category/components/CategorySelect.tsx @@ -18,7 +18,7 @@ import { Link } from 'react-router-dom'; import Stack from '@mui/material/Stack'; import { requestManager } from '@/lib/requests/RequestManager.ts'; import { Mangas } from '@/features/manga/services/Mangas.ts'; -import { useSelectableCollection } from '@/features/collection/hooks/useSelectableCollection.ts'; +import { useSelectableCollection } from '@/base/collection/hooks/useSelectableCollection.ts'; import { ThreeStateCheckboxInput } from '@/base/components/inputs/ThreeStateCheckboxInput.tsx'; import { Categories } from '@/features/category/services/Categories.ts'; import { CheckboxInput } from '@/base/components/inputs/CheckboxInput.tsx'; diff --git a/src/features/chapter/components/ChapterList.tsx b/src/features/chapter/components/ChapterList.tsx index a6db0edf..0a7a8eba 100644 --- a/src/features/chapter/components/ChapterList.tsx +++ b/src/features/chapter/components/ChapterList.tsx @@ -21,7 +21,7 @@ import { } from '@/features/chapter/utils/ChapterList.util.tsx'; import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewAbsoluteCentered.tsx'; import { ChaptersToolbarMenu } from '@/features/chapter/components/ChaptersToolbarMenu.tsx'; -import { SelectionFAB } from '@/features/collection/components/SelectionFAB.tsx'; +import { SelectionFAB } from '@/base/collection/components/SelectionFAB.tsx'; import { DEFAULT_FULL_FAB_HEIGHT } from '@/base/components/buttons/StyledFab.tsx'; import { ChapterListFieldsFragment, @@ -29,8 +29,8 @@ import { GetChaptersMangaQueryVariables, MangaScreenFieldsFragment, } from '@/lib/graphql/generated/graphql.ts'; -import { useSelectableCollection } from '@/features/collection/hooks/useSelectableCollection.ts'; -import { SelectableCollectionSelectAll } from '@/features/collection/components/SelectableCollectionSelectAll.tsx'; +import { useSelectableCollection } from '@/base/collection/hooks/useSelectableCollection.ts'; +import { SelectableCollectionSelectAll } from '@/base/collection/components/SelectableCollectionSelectAll.tsx'; import { Chapters } from '@/features/chapter/services/Chapters.ts'; import { ChapterActionMenuItems } from '@/features/chapter/components/actions/ChapterActionMenuItems.tsx'; import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts'; diff --git a/src/features/chapter/components/actions/ChapterActionMenuItems.tsx b/src/features/chapter/components/actions/ChapterActionMenuItems.tsx index ca5d412a..b4360ba4 100644 --- a/src/features/chapter/components/actions/ChapterActionMenuItems.tsx +++ b/src/features/chapter/components/actions/ChapterActionMenuItems.tsx @@ -16,7 +16,7 @@ import BookmarkRemove from '@mui/icons-material/BookmarkRemove'; import BookmarkAdd from '@mui/icons-material/BookmarkAdd'; import DoneAll from '@mui/icons-material/DoneAll'; import { ComponentProps, useMemo } from 'react'; -import { SelectableCollectionReturnType } from '@/features/collection/hooks/useSelectableCollection.ts'; +import { SelectableCollectionReturnType } from '@/base/collection/hooks/useSelectableCollection.ts'; import { Chapters } from '@/features/chapter/services/Chapters.ts'; import { MenuItem } from '@/base/components/menu/MenuItem.tsx'; import { diff --git a/src/features/library/screens/Library.tsx b/src/features/library/screens/Library.tsx index ae52ea1c..7e212efa 100644 --- a/src/features/library/screens/Library.tsx +++ b/src/features/library/screens/Library.tsx @@ -23,10 +23,10 @@ import { LibraryToolbarMenu } from '@/features/library/components/LibraryToolbar import { LibraryMangaGrid } from '@/features/library/components/LibraryMangaGrid.tsx'; import { AppbarSearch } from '@/base/components/AppbarSearch.tsx'; import { UpdateChecker } from '@/features/updates/components/UpdateChecker.tsx'; -import { useSelectableCollection } from '@/features/collection/hooks/useSelectableCollection.ts'; -import { SelectableCollectionSelectMode } from '@/features/collection/components/SelectableCollectionSelectMode.tsx'; +import { useSelectableCollection } from '@/base/collection/hooks/useSelectableCollection.ts'; +import { SelectableCollectionSelectMode } from '@/base/collection/components/SelectableCollectionSelectMode.tsx'; import { useGetVisibleLibraryMangas } from '@/features/library/hooks/useGetVisibleLibraryMangas.ts'; -import { SelectionFAB } from '@/features/collection/components/SelectionFAB.tsx'; +import { SelectionFAB } from '@/base/collection/components/SelectionFAB.tsx'; import { MangaActionMenuItems } from '@/features/manga/components/MangaActionMenuItems.tsx'; import { TabsMenu } from '@/base/components/tabs/TabsMenu.tsx'; import { TabsWrapper } from '@/base/components/tabs/TabsWrapper.tsx'; diff --git a/src/features/manga/Manga.types.ts b/src/features/manga/Manga.types.ts index 65458d9c..58cf8d44 100644 --- a/src/features/manga/Manga.types.ts +++ b/src/features/manga/Manga.types.ts @@ -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 type { JSX } from 'react'; -import { SelectableCollectionReturnType } from '@/features/collection/hooks/useSelectableCollection.ts'; +import { SelectableCollectionReturnType } from '@/base/collection/hooks/useSelectableCollection.ts'; import { useManageMangaLibraryState } from '@/features/manga/hooks/useManageMangaLibraryState.tsx'; import { ChapterType, diff --git a/src/features/manga/components/MangaActionMenuItems.tsx b/src/features/manga/components/MangaActionMenuItems.tsx index 506ec706..b5776d9f 100644 --- a/src/features/manga/components/MangaActionMenuItems.tsx +++ b/src/features/manga/components/MangaActionMenuItems.tsx @@ -20,7 +20,7 @@ import { Link } from 'react-router-dom'; import SyncIcon from '@mui/icons-material/Sync'; import Dialog from '@mui/material/Dialog'; import { Mangas } from '@/features/manga/services/Mangas.ts'; -import { SelectableCollectionReturnType } from '@/features/collection/hooks/useSelectableCollection.ts'; +import { SelectableCollectionReturnType } from '@/base/collection/hooks/useSelectableCollection.ts'; import { MenuItem } from '@/base/components/menu/MenuItem.tsx'; import { createGetMenuItemTitle, diff --git a/src/features/manga/components/MangaGrid.tsx b/src/features/manga/components/MangaGrid.tsx index 7312c79f..8a433f32 100644 --- a/src/features/manga/components/MangaGrid.tsx +++ b/src/features/manga/components/MangaGrid.tsx @@ -14,7 +14,7 @@ import { useTranslation } from 'react-i18next'; import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewAbsoluteCentered.tsx'; import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx'; import { MangaCard } from '@/features/manga/components/cards/MangaCard.tsx'; -import { SelectableCollectionReturnType } from '@/features/collection/hooks/useSelectableCollection.ts'; +import { SelectableCollectionReturnType } from '@/base/collection/hooks/useSelectableCollection.ts'; import { DEFAULT_FULL_FAB_HEIGHT } from '@/base/components/buttons/StyledFab.tsx'; import { MangaCardProps } from '@/features/manga/Manga.types.ts'; import { MangaType } from '@/lib/graphql/generated/graphql.ts'; diff --git a/src/features/manga/components/MangaOptionButton.tsx b/src/features/manga/components/MangaOptionButton.tsx index 29d43b51..deba1764 100644 --- a/src/features/manga/components/MangaOptionButton.tsx +++ b/src/features/manga/components/MangaOptionButton.tsx @@ -15,7 +15,7 @@ import MoreVertIcon from '@mui/icons-material/MoreVert'; import { PopupState } from 'material-ui-popup-state/hooks'; import { bindTrigger } from 'material-ui-popup-state'; import { CustomTooltip } from '@/base/components/CustomTooltip.tsx'; -import { SelectableCollectionReturnType } from '@/features/collection/hooks/useSelectableCollection.ts'; +import { SelectableCollectionReturnType } from '@/base/collection/hooks/useSelectableCollection.ts'; import { MangaType } from '@/lib/graphql/generated/graphql.ts'; import { MUIUtil } from '@/lib/mui/MUI.util.ts';