Move download files into new folder

This commit is contained in:
schroda
2024-10-05 22:31:21 +02:00
parent 3917d5b328
commit 204d909b0e
7 changed files with 26 additions and 13 deletions

View File

@@ -23,7 +23,7 @@ import { ErrorBoundary } from '@/modules/core/components/ErrorBoundary.tsx';
import { useNavBarContext } from '@/modules/navigation-bar/contexts/NavbarContext.tsx';
const { Browse } = loadable(() => import('@/modules/browse/screens/Browse.tsx'), lazyLoadFallback);
const { DownloadQueue } = loadable(() => import('@/screens/DownloadQueue'), lazyLoadFallback);
const { DownloadQueue } = loadable(() => import('@/modules/downloads/screens/DownloadQueue.tsx'), lazyLoadFallback);
const { Library } = loadable(() => import('@/modules/library/screens/Library.tsx'), lazyLoadFallback);
const { Manga } = loadable(() => import('@/modules/manga/screens/Manga.tsx'), lazyLoadFallback);
const { Reader } = loadable(() => import('@/modules/reader/screens/Reader.tsx'), lazyLoadFallback);
@@ -43,7 +43,10 @@ const { SourceConfigure } = loadable(() => import('@/modules/source/screens/Sour
const { SourceMangas } = loadable(() => import('@/modules/source/screens/SourceMangas.tsx'), lazyLoadFallback);
const { Updates } = loadable(() => import('@/screens/Updates'), lazyLoadFallback);
const { LibrarySettings } = loadable(() => import('@/modules/library/screens/LibrarySettings.tsx'), lazyLoadFallback);
const { DownloadSettings } = loadable(() => import('@/screens/settings/DownloadSettings.tsx'), lazyLoadFallback);
const { DownloadSettings } = loadable(
() => import('@/modules/downloads/screens/DownloadSettings.tsx'),
lazyLoadFallback,
);
const { ServerSettings } = loadable(() => import('@/screens/settings/ServerSettings.tsx'), lazyLoadFallback);
const { BrowseSettings } = loadable(() => import('@/modules/browse/screens/BrowseSettings.tsx'), lazyLoadFallback);
const { WebUISettings } = loadable(() => import('@/screens/settings/WebUISettings.tsx'), lazyLoadFallback);

View File

@@ -0,0 +1,14 @@
/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
export type MetadataDownloadSettings = {
deleteChaptersManuallyMarkedRead: boolean;
deleteChaptersWhileReading: number;
deleteChaptersWithBookmark: boolean;
downloadAheadLimit: number;
};

View File

@@ -14,8 +14,9 @@ import Switch from '@mui/material/Switch';
import { NumberSetting } from '@/modules/core/components/settings/NumberSetting.tsx';
import { getPersistedServerSetting, usePersistedValue } from '@/modules/core/hooks/usePersistedValue.tsx';
import { updateMetadataServerSettings } from '@/lib/metadata/metadataServerSettings.ts';
import { MetadataDownloadSettings, MetadataServerSettings } from '@/typings.ts';
import { MetadataServerSettings } from '@/typings.ts';
import { makeToast } from '@/lib/ui/Toast.ts';
import { MetadataDownloadSettings } from '@/modules/downloads/Downloads.types.ts';
const MIN_LIMIT = 2;
const MAX_LIMIT = 10;

View File

@@ -15,15 +15,15 @@ import Switch from '@mui/material/Switch';
import ListSubheader from '@mui/material/ListSubheader';
import { TextSetting } from '@/modules/core/components/settings/text/TextSetting.tsx';
import { NavBarContext } from '@/modules/navigation-bar/contexts/NavbarContext.tsx';
import { MetadataDownloadSettings, ServerSettings } from '@/typings.ts';
import { ServerSettings } from '@/typings.ts';
import { requestManager } from '@/lib/requests/requests/RequestManager.ts';
import { DownloadAheadSetting } from '@/components/settings/downloads/DownloadAheadSetting.tsx';
import { DownloadAheadSetting } from '@/modules/downloads/components/DownloadAheadSetting.tsx';
import {
createUpdateMetadataServerSettings,
useMetadataServerSettings,
} from '@/lib/metadata/metadataServerSettings.ts';
import { makeToast } from '@/lib/ui/Toast.ts';
import { DeleteChaptersWhileReadingSetting } from '@/components/settings/downloads/DeleteChaptersWhileReadingSetting.tsx';
import { DeleteChaptersWhileReadingSetting } from '@/modules/downloads/components/DeleteChaptersWhileReadingSetting.tsx';
import { CategoriesInclusionSetting } from '@/modules/category/components/CategoriesInclusionSetting.tsx';
import { NumberSetting } from '@/modules/core/components/settings/NumberSetting.tsx';
import { LoadingPlaceholder } from '@/modules/core/components/placeholder/LoadingPlaceholder.tsx';
@@ -31,6 +31,7 @@ import { EmptyViewAbsoluteCentered } from '@/modules/core/components/placeholder
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
import { GetCategoriesSettingsQuery, GetCategoriesSettingsQueryVariables } from '@/lib/graphql/generated/graphql.ts';
import { GET_CATEGORIES_SETTINGS } from '@/lib/graphql/queries/CategoryQuery.ts';
import { MetadataDownloadSettings } from '@/modules/downloads/Downloads.types.ts';
type DownloadSettingsType = Pick<
ServerSettings,

View File

@@ -17,6 +17,7 @@ import { MetadataUpdateSettings } from '@/modules/app-updates/AppUpdateChecker.t
import { MetadataThemeSettings } from '@/modules/theme/AppTheme.types.ts';
import { MetadataClientSettings } from '@/modules/device/Device.types.ts';
import { MetadataBrowseSettings } from '@/modules/browse/Browse.types.ts';
import { MetadataDownloadSettings } from '@/modules/downloads/Downloads.types.ts';
export interface IMetadataMigration {
appKeyPrefix?: { oldPrefix: string; newPrefix: string };
@@ -57,13 +58,6 @@ export type AppMetadataKeys =
export type MetadataKeyValuePair = [AppMetadataKeys, AllowedMetadataValueTypes];
export type MetadataDownloadSettings = {
deleteChaptersManuallyMarkedRead: boolean;
deleteChaptersWhileReading: number;
deleteChaptersWithBookmark: boolean;
downloadAheadLimit: number;
};
export type MetadataServerSettings = MetadataDownloadSettings &
MetadataLibrarySettings &
MetadataClientSettings &