Move migration files into new folder

This commit is contained in:
schroda
2024-10-05 21:35:25 +02:00
parent 7cf3849911
commit 17e42ae012
13 changed files with 22 additions and 22 deletions

View File

@@ -44,7 +44,7 @@ const { DownloadSettings } = loadable(() => import('@/screens/settings/DownloadS
const { ServerSettings } = loadable(() => import('@/screens/settings/ServerSettings.tsx'), lazyLoadFallback);
const { BrowseSettings } = loadable(() => import('@/screens/settings/BrowseSettings.tsx'), lazyLoadFallback);
const { WebUISettings } = loadable(() => import('@/screens/settings/WebUISettings.tsx'), lazyLoadFallback);
const { Migrate } = loadable(() => import('@/screens/Migrate.tsx'), lazyLoadFallback);
const { Migrate } = loadable(() => import('@/modules/migration/screens/Migrate.tsx'), lazyLoadFallback);
const { DeviceSetting } = loadable(() => import('@/components/settings/DeviceSetting.tsx'), lazyLoadFallback);
const { TrackingSettings } = loadable(() => import('@/modules/tracker/screens/TrackingSettings.tsx'), lazyLoadFallback);
const { TrackerOAuthLogin } = loadable(

View File

@@ -10,7 +10,6 @@ import {
AllowedMetadataValueTypes,
AppMetadataKeys,
Metadata,
MetadataMigrationSettings,
MetadataServerSettingKeys,
MetadataServerSettings,
MetadataThemeSettings,
@@ -20,7 +19,8 @@ import { convertFromGqlMeta, getMetadataFrom, requestUpdateServerMetadata } from
import { jsonSaveParse } from '@/lib/HelperFunctions.ts';
import { DEFAULT_DEVICE } from '@/util/device.ts';
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
import { DEFAULT_SORT_SETTINGS } from '@/screens/Migration.constants.ts';
import { DEFAULT_SORT_SETTINGS } from '@/modules/migration/Migration.constants.ts';
import { MetadataMigrationSettings } from '@/modules/migration/Migration.types.ts';
export const getDefaultSettings = (): MetadataServerSettings => ({
// downloads

View File

@@ -300,7 +300,6 @@ import {
TRACKER_UPDATE_BIND,
} from '@/lib/graphql/mutations/TrackerMutation.ts';
import { ControlledPromise } from '@/lib/ControlledPromise.ts';
import { MetadataMigrationSettings } from '@/typings.ts';
import { DOWNLOAD_STATUS_FIELDS } from '@/lib/graphql/fragments/DownloadFragments.ts';
import { EXTENSION_LIST_FIELDS } from '@/lib/graphql/fragments/ExtensionFragments.ts';
import { MANGA_BASE_FIELDS, MANGA_META_FIELDS } from '@/lib/graphql/fragments/MangaFragments.ts';
@@ -309,6 +308,7 @@ import { GLOBAL_METADATA } from '@/lib/graphql/fragments/Fragments.ts';
import { CATEGORY_META_FIELDS } from '@/lib/graphql/fragments/CategoryFragments.ts';
import { SOURCE_META_FIELDS } from '@/lib/graphql/fragments/SourceFragments.ts';
import { CHAPTER_META_FIELDS } from '@/lib/graphql/fragments/ChapterFragments.ts';
import { MetadataMigrationSettings } from '@/modules/migration/Migration.types.ts';
enum GQLMethod {
QUERY = 'QUERY',

View File

@@ -12,7 +12,7 @@ import { useLongPress } from 'use-long-press';
import { GridLayout, useLibraryOptionsContext } from '@/modules/library/contexts/LibraryOptionsContext.tsx';
import { MangaActionMenuItems, SingleModeProps } from '@/modules/manga/components/MangaActionMenuItems.tsx';
import { Menu } from '@/modules/core/components/menu/Menu.tsx';
import { MigrateDialog } from '@/components/MigrateDialog.tsx';
import { MigrateDialog } from '@/modules/migration/components/MigrateDialog.tsx';
import { useManageMangaLibraryState } from '@/modules/manga/hooks/useManageMangaLibraryState.tsx';
import { MangaGridCard } from '@/modules/manga/components/cards/MangaGridCard.tsx';
import { MangaListCard } from '@/modules/manga/components/cards/MangaListCard.tsx';

View File

@@ -8,7 +8,6 @@
import { t as translate } from 'i18next';
import { DocumentNode } from '@apollo/client/core';
import { MetadataMigrationSettings } from '@/typings.ts';
import { requestManager } from '@/lib/requests/requests/RequestManager.ts';
import {
ChapterConditionInput,
@@ -30,6 +29,7 @@ import { getMetadataServerSettings } from '@/lib/metadata/metadataServerSettings
import { GET_MANGAS_BASE } from '@/lib/graphql/queries/MangaQuery.ts';
import { MANGA_BASE_FIELDS } from '@/lib/graphql/fragments/MangaFragments.ts';
import { TranslationKey } from '@/Base.types.ts';
import { MetadataMigrationSettings } from '@/modules/migration/Migration.types.ts';
export type MangaAction =
| 'download'

View File

@@ -6,7 +6,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { SortBy, SortOrder } from '@/screens/Migration.types.ts';
import { SortBy, SortOrder } from '@/modules/migration/Migration.types.ts';
import { TranslationKey } from '@/Base.types.ts';

View File

@@ -24,3 +24,11 @@ export interface SortSettings {
}
export type TMigratableSourcesResult = GetMigratableSourcesQuery['mangas']['nodes'];
export type MetadataMigrationSettings = {
migrateChapters: boolean;
migrateCategories: boolean;
migrateTracking: boolean;
deleteChapters: boolean;
migrateSortSettings: SortSettings;
};

View File

@@ -23,8 +23,8 @@ import {
createUpdateMetadataServerSettings,
useMetadataServerSettings,
} from '@/lib/metadata/metadataServerSettings.ts';
import { MetadataMigrationSettings } from '@/typings.ts';
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
import { MetadataMigrationSettings } from '@/modules/migration/Migration.types.ts';
export const MigrateDialog = ({ mangaIdToMigrateTo, onClose }: { mangaIdToMigrateTo: number; onClose: () => void }) => {
const { t } = useTranslation();

View File

@@ -11,7 +11,7 @@ import { useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { NavBarContext } from '@/components/context/NavbarContext.tsx';
import { requestManager } from '@/lib/requests/requests/RequestManager.ts';
import { TMigratableSource } from '@/components/MigrationCard.tsx';
import { TMigratableSource } from '@/modules/migration/components/MigrationCard.tsx';
import { LoadingPlaceholder } from '@/modules/core/components/placeholder/LoadingPlaceholder.tsx';
import { EmptyViewAbsoluteCentered } from '@/modules/core/components/placeholder/EmptyViewAbsoluteCentered.tsx';
import { GridLayouts } from '@/modules/core/components/GridLayouts.tsx';

View File

@@ -19,11 +19,11 @@ import Tooltip from '@mui/material/Tooltip';
import { requestManager } from '@/lib/requests/requests/RequestManager.ts';
import { LoadingPlaceholder } from '@/modules/core/components/placeholder/LoadingPlaceholder.tsx';
import { EmptyViewAbsoluteCentered } from '@/modules/core/components/placeholder/EmptyViewAbsoluteCentered.tsx';
import { MigrationCard, TMigratableSource } from '@/components/MigrationCard.tsx';
import { MigrationCard, TMigratableSource } from '@/modules/migration/components/MigrationCard.tsx';
import { StyledGroupItemWrapper } from '@/modules/core/components/virtuoso/StyledGroupItemWrapper.tsx';
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
import { SortBy, SortOrder, SortSettings, TMigratableSourcesResult } from '@/screens/Migration.types.ts';
import { sortByToTranslationKey, sortOrderToTranslationKey } from '@/screens/Migration.constants';
import { SortBy, SortOrder, SortSettings, TMigratableSourcesResult } from '@/modules/migration/Migration.types.ts';
import { sortByToTranslationKey, sortOrderToTranslationKey } from '@/modules/migration/Migration.constants.ts';
import {
createUpdateMetadataServerSettings,
useMetadataServerSettings,

View File

@@ -15,7 +15,7 @@ import { Extensions } from '@/modules/extension/screens/Extensions.tsx';
import { TabPanel } from '@/modules/core/components/tabs/TabPanel.tsx';
import { TabsWrapper } from '@/modules/core/components/tabs/TabsWrapper.tsx';
import { TabsMenu } from '@/modules/core/components/tabs/TabsMenu.tsx';
import { Migration } from '@/screens/Migration.tsx';
import { Migration } from '@/modules/migration/screens/Migration.tsx';
import { NavBarContext } from '@/components/context/NavbarContext.tsx';
import { useResizeObserver } from '@/modules/core/hooks/useResizeObserver.tsx';

View File

@@ -10,7 +10,7 @@ import { OverridableComponent } from '@mui/material/OverridableComponent';
import { SvgIconTypeMap } from '@mui/material/SvgIcon';
import { GetServerSettingsQuery, MetaType } from '@/lib/graphql/generated/graphql.ts';
import { AppTheme } from '@/lib/ui/AppThemes.ts';
import { SortSettings } from '@/screens/Migration.types.ts';
import { MetadataMigrationSettings } from '@/modules/migration/Migration.types.ts';
import { TranslationKey } from '@/Base.types.ts';
import { MangaMetadataKeys } from '@/modules/manga/MangaCard.types.tsx';
import { LibraryOptions, MetadataLibrarySettings } from '@/modules/library/Library.types.ts';
@@ -76,14 +76,6 @@ export type MetadataClientSettings = {
devices: string[];
};
export type MetadataMigrationSettings = {
migrateChapters: boolean;
migrateCategories: boolean;
migrateTracking: boolean;
deleteChapters: boolean;
migrateSortSettings: SortSettings;
};
export type MetadataBrowseSettings = {
hideLibraryEntries: boolean;
};