Update dependency "@graphql-codegen"
This commit is contained in:
@@ -15,19 +15,29 @@ const config: CodegenConfig = {
|
|||||||
schema: process.env.CODEGEN_SERVER_URL_GQL,
|
schema: process.env.CODEGEN_SERVER_URL_GQL,
|
||||||
documents: ['src/lib/graphql/**', '!src/lib/graphql/generated/**'],
|
documents: ['src/lib/graphql/**', '!src/lib/graphql/generated/**'],
|
||||||
ignoreNoDocuments: true,
|
ignoreNoDocuments: true,
|
||||||
|
config: {
|
||||||
|
namingConvention: {
|
||||||
|
typeNames: 'change-case-all#pascalCase',
|
||||||
|
transformUnderscore: true,
|
||||||
|
},
|
||||||
|
scalars: {
|
||||||
|
LongString: 'string',
|
||||||
|
Cursor: 'string',
|
||||||
|
Duration: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
generates: {
|
generates: {
|
||||||
'src/lib/graphql/generated/graphql.ts': {
|
'src/lib/graphql/generated/graphql-base.types.ts': {
|
||||||
plugins: ['typescript', 'typescript-operations'],
|
plugins: ['typescript'],
|
||||||
config: {
|
config: {
|
||||||
namingConvention: {
|
generateOperationTypes: false,
|
||||||
typeNames: 'change-case-all#pascalCase',
|
},
|
||||||
transformUnderscore: true,
|
},
|
||||||
},
|
'src/lib/graphql/generated/graphql.ts': {
|
||||||
scalars: {
|
plugins: ['typescript-operations'],
|
||||||
LongString: 'string',
|
config: {
|
||||||
Cursor: 'string',
|
importSchemaTypesFrom: 'src/lib/graphql/generated/graphql-base.types.ts',
|
||||||
Duration: 'string',
|
nonOptionalTypename: true,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'src/lib/graphql/generated/apollo-helpers.ts': {
|
'src/lib/graphql/generated/apollo-helpers.ts': {
|
||||||
|
|||||||
@@ -87,10 +87,10 @@
|
|||||||
"zustand": "5.0.13"
|
"zustand": "5.0.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@graphql-codegen/cli": "6.3.1",
|
"@graphql-codegen/cli": "7.0.0",
|
||||||
"@graphql-codegen/client-preset": "5.3.0",
|
"@graphql-codegen/client-preset": "6.0.0",
|
||||||
"@graphql-codegen/typescript-apollo-client-helpers": "4.0.1",
|
"@graphql-codegen/typescript-apollo-client-helpers": "4.0.1",
|
||||||
"@graphql-codegen/typescript-operations": "5.1.0",
|
"@graphql-codegen/typescript-operations": "6.0.2",
|
||||||
"@lingui/cli": "6.0.1",
|
"@lingui/cli": "6.0.1",
|
||||||
"@lingui/format-po": "6.0.1",
|
"@lingui/format-po": "6.0.1",
|
||||||
"@lingui/swc-plugin": "6.0.0",
|
"@lingui/swc-plugin": "6.0.0",
|
||||||
|
|||||||
567
pnpm-lock.yaml
generated
567
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -6,13 +6,13 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { SourceType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
||||||
|
|
||||||
import type { ChapterSourceOrderInfo } from '@/features/chapter/Chapter.types.ts';
|
import type { ChapterSourceOrderInfo } from '@/features/chapter/Chapter.types.ts';
|
||||||
import type { BrowseTab } from '@/features/browse/Browse.types.ts';
|
import type { BrowseTab } from '@/features/browse/Browse.types.ts';
|
||||||
import { SearchParam } from '@/base/Base.types.ts';
|
import { SearchParam } from '@/base/Base.types.ts';
|
||||||
import { UrlUtil } from '@/lib/UrlUtil.ts';
|
import { UrlUtil } from '@/lib/UrlUtil.ts';
|
||||||
|
import type { SourceIdInfo } from '@/features/source/Source.types.ts';
|
||||||
|
|
||||||
type AppRouteInfo = {
|
type AppRouteInfo = {
|
||||||
match: string;
|
match: string;
|
||||||
@@ -131,12 +131,12 @@ export const AppRoutes = {
|
|||||||
childRoutes: {
|
childRoutes: {
|
||||||
browse: {
|
browse: {
|
||||||
match: ':sourceId',
|
match: ':sourceId',
|
||||||
path: (sourceId: SourceType['id'], query?: string | null | undefined) =>
|
path: (sourceId: SourceIdInfo['id'], query?: string | null | undefined) =>
|
||||||
UrlUtil.addQueryParam(`/sources/${sourceId}`, query),
|
UrlUtil.addQueryParam(`/sources/${sourceId}`, query),
|
||||||
},
|
},
|
||||||
configure: {
|
configure: {
|
||||||
match: ':sourceId/configure',
|
match: ':sourceId/configure',
|
||||||
path: (sourceId: SourceType['id']) => `/sources/${sourceId}/configure`,
|
path: (sourceId: SourceIdInfo['id']) => `/sources/${sourceId}/configure`,
|
||||||
},
|
},
|
||||||
searchAll: {
|
searchAll: {
|
||||||
match: 'all/search',
|
match: 'all/search',
|
||||||
@@ -204,7 +204,7 @@ export const AppRoutes = {
|
|||||||
childRoutes: {
|
childRoutes: {
|
||||||
singleMangaSearch: {
|
singleMangaSearch: {
|
||||||
match: 'source/:sourceId/manga/:mangaId/search',
|
match: 'source/:sourceId/manga/:mangaId/search',
|
||||||
path: (sourceId: SourceType['id'], mangaId: MangaIdInfo['id'], query?: string | null | undefined) =>
|
path: (sourceId: SourceIdInfo['id'], mangaId: MangaIdInfo['id'], query?: string | null | undefined) =>
|
||||||
UrlUtil.addQueryParam(`/migrate/source/${sourceId}/manga/${mangaId}/search`, query),
|
UrlUtil.addQueryParam(`/migrate/source/${sourceId}/manga/${mangaId}/search`, query),
|
||||||
},
|
},
|
||||||
manualSearch: {
|
manualSearch: {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import Box from '@mui/material/Box';
|
|||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { msg } from '@lingui/core/macro';
|
import { msg } from '@lingui/core/macro';
|
||||||
import { DownloadState } from '@/lib/graphql/generated/graphql.ts';
|
import { DownloadState } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
||||||
import type { ChapterIdInfo } from '@/features/chapter/Chapter.types.ts';
|
import type { ChapterIdInfo } from '@/features/chapter/Chapter.types.ts';
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import DownloadIcon from '@mui/icons-material/Download';
|
|||||||
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
||||||
import DownloadingIcon from '@mui/icons-material/Downloading';
|
import DownloadingIcon from '@mui/icons-material/Downloading';
|
||||||
import { t } from '@lingui/core/macro';
|
import { t } from '@lingui/core/macro';
|
||||||
import { UpdateState } from '@/lib/graphql/generated/graphql.ts';
|
import { UpdateState } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
export type BaseVersionInfoProps = {
|
export type BaseVersionInfoProps = {
|
||||||
version: string;
|
version: string;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import DialogActions from '@mui/material/DialogActions';
|
|||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
||||||
import type { WebUiUpdateStatus } from '@/lib/graphql/generated/graphql.ts';
|
import type { WebUiUpdateStatus } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { UpdateState, WebUiChannel } from '@/lib/graphql/generated/graphql.ts';
|
import { UpdateState, WebUiChannel } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { useLocalStorage, useSessionStorage } from '@/base/hooks/useStorage.tsx';
|
import { useLocalStorage, useSessionStorage } from '@/base/hooks/useStorage.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { makeToast } from '@/base/utils/Toast.ts';
|
import { makeToast } from '@/base/utils/Toast.ts';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { PartialBackupFlagsInput } from '@/lib/graphql/generated/graphql.ts';
|
import type { PartialBackupFlagsInput } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { ServerSettings } from '@/features/settings/Settings.types.ts';
|
import type { ServerSettings } from '@/features/settings/Settings.types.ts';
|
||||||
|
|
||||||
export enum BackupFlagGroup {
|
export enum BackupFlagGroup {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import type { AwaitableComponentProps } from 'awaitable-component';
|
|||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { BrowseTab } from '@/features/browse/Browse.types.ts';
|
import { BrowseTab } from '@/features/browse/Browse.types.ts';
|
||||||
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
||||||
import type { ValidateBackupResult } from '@/lib/graphql/generated/graphql.ts';
|
import type { ValidateBackupResult } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
export const BackupValidationDialog = ({
|
export const BackupValidationDialog = ({
|
||||||
validationResult,
|
validationResult,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { useLingui } from '@lingui/react/macro';
|
|||||||
import { plural } from '@lingui/core/macro';
|
import { plural } from '@lingui/core/macro';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { makeToast } from '@/base/utils/Toast.ts';
|
import { makeToast } from '@/base/utils/Toast.ts';
|
||||||
import { BackupRestoreState } from '@/lib/graphql/generated/graphql.ts';
|
import { BackupRestoreState } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { Progress } from '@/base/components/feedback/Progress.tsx';
|
import { Progress } from '@/base/components/feedback/Progress.tsx';
|
||||||
import { TextSetting } from '@/base/components/settings/text/TextSetting.tsx';
|
import { TextSetting } from '@/base/components/settings/text/TextSetting.tsx';
|
||||||
import { NumberSetting } from '@/base/components/settings/NumberSetting.tsx';
|
import { NumberSetting } from '@/base/components/settings/NumberSetting.tsx';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type { LibraryOptions } from '@/features/library/Library.types.ts';
|
import type { LibraryOptions } from '@/features/library/Library.types.ts';
|
||||||
import type { CategoryMetaType, CategoryType } from '@/lib/graphql/generated/graphql.ts';
|
import type { CategoryMetaType, CategoryType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
export type ICategoryMetadata = LibraryOptions;
|
export type ICategoryMetadata = LibraryOptions;
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { useLingui } from '@lingui/react/macro';
|
|||||||
import { t as translate } from '@lingui/core/macro';
|
import { t as translate } from '@lingui/core/macro';
|
||||||
import { ThreeStateCheckboxInput } from '@/base/components/inputs/ThreeStateCheckboxInput.tsx';
|
import { ThreeStateCheckboxInput } from '@/base/components/inputs/ThreeStateCheckboxInput.tsx';
|
||||||
import { makeToast } from '@/base/utils/Toast.ts';
|
import { makeToast } from '@/base/utils/Toast.ts';
|
||||||
import { IncludeOrExclude } from '@/lib/graphql/generated/graphql.ts';
|
import { IncludeOrExclude } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { CheckboxContainer } from '@/base/components/inputs/CheckboxContainer.ts';
|
import { CheckboxContainer } from '@/base/components/inputs/CheckboxContainer.ts';
|
||||||
import type {
|
import type {
|
||||||
|
|||||||
@@ -17,14 +17,14 @@ import Typography from '@mui/material/Typography';
|
|||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import type { CategoryType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { ListCardContent } from '@/base/components/lists/cards/ListCardContent.tsx';
|
import { ListCardContent } from '@/base/components/lists/cards/ListCardContent.tsx';
|
||||||
|
import type { CategoryIdInfo, CategoryNameInfo } from '@/features/category/Category.types.ts';
|
||||||
|
|
||||||
export const CategorySettingsCard = ({
|
export const CategorySettingsCard = ({
|
||||||
category,
|
category,
|
||||||
onEdit,
|
onEdit,
|
||||||
}: {
|
}: {
|
||||||
category: Pick<CategoryType, 'id' | 'name'>;
|
category: CategoryIdInfo & CategoryNameInfo;
|
||||||
onEdit: () => void;
|
onEdit: () => void;
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useLingui();
|
const { t } = useLingui();
|
||||||
|
|||||||
@@ -6,11 +6,8 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {
|
import type { ChapterType } from '@/lib/graphql/generated/graphql-base.types';
|
||||||
ChapterReaderFieldsFragment,
|
import type { ChapterReaderFieldsFragment, DownloadStatusFieldsFragment } from '@/lib/graphql/generated/graphql.ts';
|
||||||
ChapterType,
|
|
||||||
DownloadStatusFieldsFragment,
|
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
|
|
||||||
export type ChapterSortMode = 'fetchedAt' | 'source' | 'chapterNumber' | 'uploadedAt';
|
export type ChapterSortMode = 'fetchedAt' | 'source' | 'chapterNumber' | 'uploadedAt';
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import MenuItem from '@mui/material/MenuItem';
|
|||||||
import { msg } from '@lingui/core/macro';
|
import { msg } from '@lingui/core/macro';
|
||||||
import { useMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
import { useMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
||||||
import { Mangas } from '@/features/manga/services/Mangas.ts';
|
import { Mangas } from '@/features/manga/services/Mangas.ts';
|
||||||
import type { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
||||||
|
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
||||||
|
|
||||||
const DOWNLOAD_OPTIONS: {
|
const DOWNLOAD_OPTIONS: {
|
||||||
title: MessageDescriptor;
|
title: MessageDescriptor;
|
||||||
@@ -59,7 +59,7 @@ export const ChaptersDownloadActionMenuItems = ({
|
|||||||
mangaIds,
|
mangaIds,
|
||||||
closeMenu,
|
closeMenu,
|
||||||
}: {
|
}: {
|
||||||
mangaIds: MangaType['id'][];
|
mangaIds: MangaIdInfo['id'][];
|
||||||
closeMenu: () => void;
|
closeMenu: () => void;
|
||||||
}) => {
|
}) => {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
import Refresh from '@mui/icons-material/Refresh';
|
import Refresh from '@mui/icons-material/Refresh';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { DownloadState } from '@/lib/graphql/generated/graphql.ts';
|
import { DownloadState } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
||||||
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import { useLingui } from '@lingui/react/macro';
|
|||||||
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
||||||
import { getDateString } from '@/base/utils/DateHelper.ts';
|
import { getDateString } from '@/base/utils/DateHelper.ts';
|
||||||
import { DownloadStateIndicator } from '@/base/components/downloads/DownloadStateIndicator.tsx';
|
import { DownloadStateIndicator } from '@/base/components/downloads/DownloadStateIndicator.tsx';
|
||||||
import type { ChapterType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { ChapterActionMenuItems } from '@/features/chapter/components/actions/ChapterActionMenuItems.tsx';
|
import { ChapterActionMenuItems } from '@/features/chapter/components/actions/ChapterActionMenuItems.tsx';
|
||||||
import { Menu } from '@/base/components/menu/Menu.tsx';
|
import { Menu } from '@/base/components/menu/Menu.tsx';
|
||||||
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
||||||
@@ -36,11 +35,14 @@ import type {
|
|||||||
ChapterDownloadInfo,
|
ChapterDownloadInfo,
|
||||||
ChapterIdInfo,
|
ChapterIdInfo,
|
||||||
ChapterMangaInfo,
|
ChapterMangaInfo,
|
||||||
|
ChapterNameInfo,
|
||||||
ChapterNumberInfo,
|
ChapterNumberInfo,
|
||||||
ChapterReadInfo,
|
ChapterReadInfo,
|
||||||
ChapterScanlatorInfo,
|
ChapterScanlatorInfo,
|
||||||
|
ChapterSourceOrderInfo,
|
||||||
} from '@/features/chapter/Chapter.types.ts';
|
} from '@/features/chapter/Chapter.types.ts';
|
||||||
import { MediaQuery } from '@/base/utils/MediaQuery.tsx';
|
import { MediaQuery } from '@/base/utils/MediaQuery.tsx';
|
||||||
|
import type { ChapterType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
type TChapter = ChapterIdInfo &
|
type TChapter = ChapterIdInfo &
|
||||||
ChapterMangaInfo &
|
ChapterMangaInfo &
|
||||||
@@ -49,7 +51,9 @@ type TChapter = ChapterIdInfo &
|
|||||||
ChapterBookmarkInfo &
|
ChapterBookmarkInfo &
|
||||||
ChapterNumberInfo &
|
ChapterNumberInfo &
|
||||||
ChapterScanlatorInfo &
|
ChapterScanlatorInfo &
|
||||||
Pick<ChapterType, 'name' | 'sourceOrder' | 'uploadDate'>;
|
ChapterNameInfo &
|
||||||
|
ChapterSourceOrderInfo &
|
||||||
|
Pick<ChapterType, 'uploadDate'>;
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
mode?: 'manga.page' | 'reader';
|
mode?: 'manga.page' | 'reader';
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
||||||
import { Mangas } from '@/features/manga/services/Mangas.ts';
|
import { Mangas } from '@/features/manga/services/Mangas.ts';
|
||||||
import type { MangaIdInfo, MangaThumbnailInfo } from '@/features/manga/Manga.types.ts';
|
import type { MangaIdInfo, MangaThumbnailInfo, MangaTitleInfo } from '@/features/manga/Manga.types.ts';
|
||||||
import type { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { ListCardAvatar } from '@/base/components/lists/cards/ListCardAvatar.tsx';
|
import { ListCardAvatar } from '@/base/components/lists/cards/ListCardAvatar.tsx';
|
||||||
|
|
||||||
export const ChapterCardThumbnail = ({
|
export const ChapterCardThumbnail = ({
|
||||||
@@ -20,7 +19,7 @@ export const ChapterCardThumbnail = ({
|
|||||||
thumbnailUrlLastFetched,
|
thumbnailUrlLastFetched,
|
||||||
}: MangaThumbnailInfo & {
|
}: MangaThumbnailInfo & {
|
||||||
mangaId: MangaIdInfo['id'];
|
mangaId: MangaIdInfo['id'];
|
||||||
mangaTitle: MangaType['title'];
|
mangaTitle: MangaTitleInfo['title'];
|
||||||
}) => (
|
}) => (
|
||||||
<Link to={AppRoutes.manga.path(mangaId)} style={{ textDecoration: 'none' }}>
|
<Link to={AppRoutes.manga.path(mangaId)} style={{ textDecoration: 'none' }}>
|
||||||
<ListCardAvatar
|
<ListCardAvatar
|
||||||
|
|||||||
@@ -12,12 +12,9 @@ import { t } from '@lingui/core/macro';
|
|||||||
import { makeToast } from '@/base/utils/Toast.ts';
|
import { makeToast } from '@/base/utils/Toast.ts';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { getMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
import { getMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
||||||
import type {
|
import type { ChapterListFieldsFragment, DownloadTypeFieldsFragment } from '@/lib/graphql/generated/graphql.ts';
|
||||||
ChapterListFieldsFragment,
|
import type { ChapterType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
ChapterType,
|
import { DownloadState } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
DownloadTypeFieldsFragment,
|
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { DownloadState } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { CHAPTER_LIST_FIELDS } from '@/lib/graphql/chapter/ChapterFragments.ts';
|
import { CHAPTER_LIST_FIELDS } from '@/lib/graphql/chapter/ChapterFragments.ts';
|
||||||
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
||||||
|
|
||||||
|
|||||||
@@ -7,13 +7,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import type { ChapterType } from '@/lib/graphql/generated/graphql.ts';
|
import type { ChapterType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type {
|
import type {
|
||||||
ChapterBookmarkInfo,
|
ChapterBookmarkInfo,
|
||||||
ChapterDownloadInfo,
|
ChapterDownloadInfo,
|
||||||
ChapterListOptions,
|
ChapterListOptions,
|
||||||
|
ChapterNumberInfo,
|
||||||
ChapterReadInfo,
|
ChapterReadInfo,
|
||||||
ChapterScanlatorInfo,
|
ChapterScanlatorInfo,
|
||||||
|
ChapterSourceOrderInfo,
|
||||||
} from '@/features/chapter/Chapter.types.ts';
|
} from '@/features/chapter/Chapter.types.ts';
|
||||||
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
||||||
import type { GqlMetaHolder } from '@/features/metadata/Metadata.types.ts';
|
import type { GqlMetaHolder } from '@/features/metadata/Metadata.types.ts';
|
||||||
@@ -60,7 +62,7 @@ function scanlatorFilter(excludedScanlators: string[], { scanlator }: ChapterSca
|
|||||||
return !scanlator || !excludedScanlators.includes(scanlator);
|
return !scanlator || !excludedScanlators.includes(scanlator);
|
||||||
}
|
}
|
||||||
|
|
||||||
type TChapterSort = Pick<ChapterType, 'sourceOrder' | 'fetchedAt' | 'chapterNumber' | 'uploadDate'>;
|
type TChapterSort = ChapterSourceOrderInfo & ChapterNumberInfo & Pick<ChapterType, 'fetchedAt' | 'uploadDate'>;
|
||||||
const sortChapters = <T extends TChapterSort>(
|
const sortChapters = <T extends TChapterSort>(
|
||||||
chapters: T[],
|
chapters: T[],
|
||||||
{ sortBy, reverse }: Pick<ChapterListOptions, 'sortBy' | 'reverse'>,
|
{ sortBy, reverse }: Pick<ChapterListOptions, 'sortBy' | 'reverse'>,
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts'
|
|||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import { makeToast } from '@/base/utils/Toast.ts';
|
import { makeToast } from '@/base/utils/Toast.ts';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { DownloaderState } from '@/lib/graphql/generated/graphql.ts';
|
import { DownloaderState } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { ChapterDownloadStatus, ChapterIdInfo } from '@/features/chapter/Chapter.types.ts';
|
import type { ChapterDownloadStatus, ChapterIdInfo } from '@/features/chapter/Chapter.types.ts';
|
||||||
import { MediaQuery } from '@/base/utils/MediaQuery.tsx';
|
import { MediaQuery } from '@/base/utils/MediaQuery.tsx';
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import { makeToast } from '@/base/utils/Toast.ts';
|
|||||||
import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewAbsoluteCentered.tsx';
|
import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewAbsoluteCentered.tsx';
|
||||||
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
|
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
|
||||||
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
||||||
import { DownloaderState } from '@/lib/graphql/generated/graphql.ts';
|
import { DownloaderState } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import { DndSortableItem } from '@/lib/dnd-kit/DndSortableItem.tsx';
|
import { DndSortableItem } from '@/lib/dnd-kit/DndSortableItem.tsx';
|
||||||
import { DndKitUtil } from '@/lib/dnd-kit/DndKitUtil.ts';
|
import { DndKitUtil } from '@/lib/dnd-kit/DndKitUtil.ts';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { ExtensionType } from '@/lib/graphql/generated/graphql.ts';
|
import type { ExtensionType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
export enum ExtensionAction {
|
export enum ExtensionAction {
|
||||||
UPDATE = 'UPDATE',
|
UPDATE = 'UPDATE',
|
||||||
|
|||||||
@@ -6,8 +6,10 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { MangaStatus, MangaType, TrackerType } from '@/lib/graphql/generated/graphql.ts';
|
import type { MangaStatus } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { GridLayout } from '@/base/Base.types.ts';
|
import type { GridLayout } from '@/base/Base.types.ts';
|
||||||
|
import type { MangaDescriptionInfo, MangaIdInfo, MangaTitleInfo } from '@/features/manga/Manga.types.ts';
|
||||||
|
import type { TrackerIdInfo } from '@/features/tracker/Tracker.types.ts';
|
||||||
|
|
||||||
export type MetadataLibrarySettings = {
|
export type MetadataLibrarySettings = {
|
||||||
showAddToLibraryCategorySelectDialog: boolean;
|
showAddToLibraryCategorySelectDialog: boolean;
|
||||||
@@ -39,11 +41,11 @@ export interface LibraryOptions {
|
|||||||
hasUnreadChapters: NullAndUndefined<boolean>;
|
hasUnreadChapters: NullAndUndefined<boolean>;
|
||||||
hasReadChapters: NullAndUndefined<boolean>;
|
hasReadChapters: NullAndUndefined<boolean>;
|
||||||
hasDuplicateChapters: NullAndUndefined<boolean>;
|
hasDuplicateChapters: NullAndUndefined<boolean>;
|
||||||
hasTrackerBinding: Record<TrackerType['id'], NullAndUndefined<boolean>>;
|
hasTrackerBinding: Record<TrackerIdInfo['id'], NullAndUndefined<boolean>>;
|
||||||
hasStatus: Record<MangaStatus, NullAndUndefined<boolean>>;
|
hasStatus: Record<MangaStatus, NullAndUndefined<boolean>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TMangaDuplicate = Pick<MangaType, 'id' | 'title' | 'description'>;
|
export type TMangaDuplicate = MangaIdInfo & MangaTitleInfo & MangaDescriptionInfo;
|
||||||
|
|
||||||
export type TMangaDuplicates<Manga> = Record<string, Manga[]>;
|
export type TMangaDuplicates<Manga> = Record<string, Manga[]>;
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { OptionsTabs } from '@/base/components/modals/OptionsTabs.tsx';
|
|||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { Trackers } from '@/features/tracker/services/Trackers.ts';
|
import { Trackers } from '@/features/tracker/services/Trackers.ts';
|
||||||
import type { GetTrackersSettingsQuery } from '@/lib/graphql/generated/graphql.ts';
|
import type { GetTrackersSettingsQuery } from '@/lib/graphql/generated/graphql.ts';
|
||||||
import { MangaStatus } from '@/lib/graphql/generated/graphql.ts';
|
import { MangaStatus } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { GET_TRACKERS_SETTINGS } from '@/lib/graphql/tracker/TrackerQuery.ts';
|
import { GET_TRACKERS_SETTINGS } from '@/lib/graphql/tracker/TrackerQuery.ts';
|
||||||
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
||||||
import { createUpdateCategoryMetadata, useGetCategoryMetadata } from '@/features/category/services/CategoryMetadata.ts';
|
import { createUpdateCategoryMetadata, useGetCategoryMetadata } from '@/features/category/services/CategoryMetadata.ts';
|
||||||
|
|||||||
@@ -9,19 +9,26 @@
|
|||||||
import { StringParam, useQueryParam } from 'use-query-params';
|
import { StringParam, useQueryParam } from 'use-query-params';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { useMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
import { useMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
||||||
import type { ChapterType, MangaType, TrackRecordType } from '@/lib/graphql/generated/graphql.ts';
|
import type { ChapterType, MangaType, TrackRecordType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { enhancedCleanup } from '@/base/utils/Strings.ts';
|
import { enhancedCleanup } from '@/base/utils/Strings.ts';
|
||||||
import { useGetCategoryMetadata } from '@/features/category/services/CategoryMetadata.ts';
|
import { useGetCategoryMetadata } from '@/features/category/services/CategoryMetadata.ts';
|
||||||
import type { LibraryOptions, LibrarySortMode } from '@/features/library/Library.types.ts';
|
import type { LibraryOptions, LibrarySortMode } from '@/features/library/Library.types.ts';
|
||||||
import type { CategoryIdInfo, CategoryMetadataInfo } from '@/features/category/Category.types.ts';
|
import type { CategoryIdInfo, CategoryMetadataInfo } from '@/features/category/Category.types.ts';
|
||||||
import type {
|
import type {
|
||||||
|
MangaArtistInfo,
|
||||||
|
MangaAuthorInfo,
|
||||||
MangaChapterCountInfo,
|
MangaChapterCountInfo,
|
||||||
|
MangaDescriptionInfo,
|
||||||
MangaDownloadInfo,
|
MangaDownloadInfo,
|
||||||
|
MangaGenreInfo,
|
||||||
MangaIdInfo,
|
MangaIdInfo,
|
||||||
|
MangaInLibraryInfo,
|
||||||
|
MangaSourceIdInfo,
|
||||||
|
MangaSourceNameInfo,
|
||||||
MangaStatusInfo,
|
MangaStatusInfo,
|
||||||
|
MangaTitleInfo,
|
||||||
MangaUnreadInfo,
|
MangaUnreadInfo,
|
||||||
} from '@/features/manga/Manga.types.ts';
|
} from '@/features/manga/Manga.types.ts';
|
||||||
import type { SourceDisplayNameInfo } from '@/features/source/Source.types.ts';
|
|
||||||
import { SearchParam } from '@/base/Base.types.ts';
|
import { SearchParam } from '@/base/Base.types.ts';
|
||||||
|
|
||||||
const triStateFilter = (
|
const triStateFilter = (
|
||||||
@@ -70,9 +77,13 @@ const performSearch = (
|
|||||||
return cleanedUpQueries.every((query) => cleanedUpStrings.includes(query));
|
return cleanedUpQueries.every((query) => cleanedUpStrings.includes(query));
|
||||||
};
|
};
|
||||||
|
|
||||||
type TMangaQueryFilter = Pick<MangaType, 'title' | 'genre' | 'description' | 'artist' | 'author' | 'sourceId'> & {
|
type TMangaQueryFilter = MangaTitleInfo &
|
||||||
source?: NullAndUndefined<SourceDisplayNameInfo>;
|
MangaGenreInfo &
|
||||||
};
|
MangaDescriptionInfo &
|
||||||
|
MangaArtistInfo &
|
||||||
|
MangaAuthorInfo &
|
||||||
|
MangaSourceIdInfo &
|
||||||
|
MangaSourceNameInfo;
|
||||||
const querySearchManga = (
|
const querySearchManga = (
|
||||||
query: NullAndUndefined<string>,
|
query: NullAndUndefined<string>,
|
||||||
{ title, genre: genres, description, artist, author, source, sourceId }: TMangaQueryFilter,
|
{ title, genre: genres, description, artist, author, source, sourceId }: TMangaQueryFilter,
|
||||||
@@ -162,7 +173,9 @@ const sortByNumber = (a: number | string = 0, b: number | string = 0) => Number(
|
|||||||
|
|
||||||
const sortByString = (a: string, b: string): number => a.localeCompare(b, undefined, { sensitivity: 'base' });
|
const sortByString = (a: string, b: string): number => a.localeCompare(b, undefined, { sensitivity: 'base' });
|
||||||
|
|
||||||
type TMangaSort = Pick<MangaType, 'title' | 'inLibraryAt' | 'unreadCount'> &
|
type TMangaSort = MangaTitleInfo &
|
||||||
|
MangaInLibraryInfo &
|
||||||
|
MangaUnreadInfo &
|
||||||
MangaChapterCountInfo & {
|
MangaChapterCountInfo & {
|
||||||
lastReadChapter?: Pick<ChapterType, 'lastReadAt'> | null;
|
lastReadChapter?: Pick<ChapterType, 'lastReadAt'> | null;
|
||||||
latestUploadedChapter?: Pick<ChapterType, 'uploadDate'> | null;
|
latestUploadedChapter?: Pick<ChapterType, 'uploadDate'> | null;
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ import type {
|
|||||||
GetLibraryMangaCountQuery,
|
GetLibraryMangaCountQuery,
|
||||||
GetLibraryMangaCountQueryVariables,
|
GetLibraryMangaCountQueryVariables,
|
||||||
MangaChapterStatFieldsFragment,
|
MangaChapterStatFieldsFragment,
|
||||||
MangaType,
|
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql.ts';
|
||||||
import { GET_CATEGORIES_LIBRARY } from '@/lib/graphql/category/CategoryQuery.ts';
|
import { GET_CATEGORIES_LIBRARY } from '@/lib/graphql/category/CategoryQuery.ts';
|
||||||
import { Mangas } from '@/features/manga/services/Mangas.ts';
|
import { Mangas } from '@/features/manga/services/Mangas.ts';
|
||||||
@@ -51,6 +50,7 @@ import { useAppAction } from '@/features/navigation-bar/hooks/useAppAction.ts';
|
|||||||
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
||||||
import { SearchParam } from '@/base/Base.types.ts';
|
import { SearchParam } from '@/base/Base.types.ts';
|
||||||
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
||||||
|
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
||||||
|
|
||||||
const TitleWithSizeTag = styled('span')({
|
const TitleWithSizeTag = styled('span')({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@@ -122,7 +122,7 @@ export function Library() {
|
|||||||
handleSelectAll,
|
handleSelectAll,
|
||||||
handleSelection,
|
handleSelection,
|
||||||
clearSelection,
|
clearSelection,
|
||||||
} = useSelectableCollection<MangaType['id'], string>(mangas.length, {
|
} = useSelectableCollection<MangaIdInfo['id'], string>(mangas.length, {
|
||||||
itemIds: mangaIds,
|
itemIds: mangaIds,
|
||||||
currentKey: activeTab?.id.toString(),
|
currentKey: activeTab?.id.toString(),
|
||||||
initialState: undefined,
|
initialState: undefined,
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { enhancedCleanup } from '@/base/utils/Strings.ts';
|
import { enhancedCleanup } from '@/base/utils/Strings.ts';
|
||||||
import type { TMangaDuplicate, TMangaDuplicateResult, TMangaDuplicates } from '@/features/library/Library.types.ts';
|
import type { TMangaDuplicate, TMangaDuplicateResult, TMangaDuplicates } from '@/features/library/Library.types.ts';
|
||||||
|
import type { MangaTitleInfo } from '@/features/manga/Manga.types.ts';
|
||||||
|
|
||||||
export const findDuplicatesByTitle = <Manga extends Pick<MangaType, 'title'>>(
|
export const findDuplicatesByTitle = <Manga extends MangaTitleInfo>(
|
||||||
libraryMangas: Manga[],
|
libraryMangas: Manga[],
|
||||||
): TMangaDuplicates<Manga> => {
|
): TMangaDuplicates<Manga> => {
|
||||||
const titleToMangas = Object.groupBy(libraryMangas, ({ title }) => enhancedCleanup(title));
|
const titleToMangas = Object.groupBy(libraryMangas, ({ title }) => enhancedCleanup(title));
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import type { MessageDescriptor } from '@lingui/core';
|
import type { MessageDescriptor } from '@lingui/core';
|
||||||
import { msg } from '@lingui/core/macro';
|
import { msg } from '@lingui/core/macro';
|
||||||
import { MangaStatus } from '@/lib/graphql/generated/graphql.ts';
|
import { MangaStatus } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { MangaAction, MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
import type { MangaAction, MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
||||||
import { MangaType } from '@/features/manga/Manga.types.ts';
|
import { MangaType } from '@/features/manga/Manga.types.ts';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -11,31 +11,39 @@ import type { PopupState } from 'material-ui-popup-state/hooks';
|
|||||||
import type { JSX } from 'react';
|
import type { JSX } from 'react';
|
||||||
import type { SelectableCollectionReturnType } from '@/base/collection/hooks/useSelectableCollection.ts';
|
import type { SelectableCollectionReturnType } from '@/base/collection/hooks/useSelectableCollection.ts';
|
||||||
import type { useManageMangaLibraryState } from '@/features/manga/hooks/useManageMangaLibraryState.tsx';
|
import type { useManageMangaLibraryState } from '@/features/manga/hooks/useManageMangaLibraryState.tsx';
|
||||||
|
import type { MangaReaderFieldsFragment } from '@/lib/graphql/generated/graphql.ts';
|
||||||
|
import type { SingleModeProps } from '@/features/manga/components/MangaActionMenuItems.tsx';
|
||||||
|
import type { GridLayout } from '@/base/Base.types.ts';
|
||||||
|
import type {
|
||||||
|
ChapterIdInfo,
|
||||||
|
ChapterListOptions,
|
||||||
|
ChapterNameInfo,
|
||||||
|
ChapterNumberInfo,
|
||||||
|
ChapterReadInfo,
|
||||||
|
ChapterSourceOrderInfo,
|
||||||
|
} from '@/features/chapter/Chapter.types.ts';
|
||||||
|
import type { MigrationMatch } from '@/features/migration/Migration.types.ts';
|
||||||
import type {
|
import type {
|
||||||
ChapterType,
|
|
||||||
MangaReaderFieldsFragment,
|
|
||||||
MangaType as MangaTypeGql,
|
MangaType as MangaTypeGql,
|
||||||
Maybe,
|
Maybe,
|
||||||
SourceType,
|
SourceType,
|
||||||
TrackRecordType,
|
TrackRecordType,
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { SingleModeProps } from '@/features/manga/components/MangaActionMenuItems.tsx';
|
|
||||||
import type { GridLayout } from '@/base/Base.types.ts';
|
|
||||||
import type { ChapterListOptions } from '@/features/chapter/Chapter.types.ts';
|
|
||||||
import type { MigrationMatch } from '@/features/migration/Migration.types.ts';
|
|
||||||
|
|
||||||
export type MangaCardMode = 'default' | 'source' | 'migrate.search' | 'migrate.select' | 'duplicate';
|
export type MangaCardMode = 'default' | 'source' | 'migrate.search' | 'migrate.select' | 'duplicate';
|
||||||
|
|
||||||
type MangaCardBaseProps = Pick<MangaTypeGql, 'id' | 'title' | 'sourceId'> &
|
type MangaCardBaseProps = Pick<MangaTypeGql, 'id' | 'title' | 'sourceId'> &
|
||||||
Omit<SingleModeProps['manga'], 'downloadCount' | 'unreadCount' | 'chapters'> &
|
Omit<SingleModeProps['manga'], 'downloadCount' | 'unreadCount' | 'chapters'> &
|
||||||
Partial<Pick<MangaTypeGql, 'inLibrary' | 'downloadCount' | 'unreadCount'>> & {
|
Partial<Pick<MangaTypeGql, 'inLibrary' | 'downloadCount' | 'unreadCount'>> & {
|
||||||
firstUnreadChapter?: Pick<ChapterType, 'id' | 'sourceOrder' | 'isRead' | 'chapterNumber' | 'name'> | null;
|
firstUnreadChapter?:
|
||||||
|
| (ChapterIdInfo & ChapterSourceOrderInfo & ChapterReadInfo & ChapterNumberInfo & ChapterNameInfo)
|
||||||
|
| null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type MangaIdInfo = Pick<MangaTypeGql, 'id'>;
|
export type MangaIdInfo = Pick<MangaTypeGql, 'id'>;
|
||||||
export type MangaChapterCountInfo = { chapters: Pick<MangaTypeGql['chapters'], 'totalCount'> };
|
export type MangaChapterCountInfo = { chapters: Pick<MangaTypeGql['chapters'], 'totalCount'> };
|
||||||
export type MangaHighestChapterNumberInfo = { highestNumberedChapter?: Pick<ChapterType, 'id' | 'chapterNumber'> };
|
export type MangaHighestChapterNumberInfo = { highestNumberedChapter?: (ChapterIdInfo & ChapterNumberInfo) | null };
|
||||||
export type MangaInLibraryInfo = Pick<MangaTypeGql, 'inLibrary'>;
|
export type MangaInLibraryInfo = Pick<MangaTypeGql, 'inLibrary' | 'inLibraryAt'>;
|
||||||
export type MangaDownloadInfo = Pick<MangaTypeGql, 'downloadCount'> & MangaChapterCountInfo;
|
export type MangaDownloadInfo = Pick<MangaTypeGql, 'downloadCount'> & MangaChapterCountInfo;
|
||||||
export type MangaUnreadInfo = Pick<MangaTypeGql, 'unreadCount'> & MangaChapterCountInfo;
|
export type MangaUnreadInfo = Pick<MangaTypeGql, 'unreadCount'> & MangaChapterCountInfo;
|
||||||
export type MangaThumbnailInfo = Pick<MangaTypeGql, 'thumbnailUrl' | 'thumbnailUrlLastFetched' | 'sourceId'>;
|
export type MangaThumbnailInfo = Pick<MangaTypeGql, 'thumbnailUrl' | 'thumbnailUrlLastFetched' | 'sourceId'>;
|
||||||
|
|||||||
@@ -31,8 +31,15 @@ import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts'
|
|||||||
import { TrackManga } from '@/features/tracker/components/TrackManga.tsx';
|
import { TrackManga } from '@/features/tracker/components/TrackManga.tsx';
|
||||||
import { ChaptersDownloadActionMenuItems } from '@/features/chapter/components/actions/ChaptersDownloadActionMenuItems.tsx';
|
import { ChaptersDownloadActionMenuItems } from '@/features/chapter/components/actions/ChaptersDownloadActionMenuItems.tsx';
|
||||||
import { NestedMenuItem } from '@/base/components/menu/NestedMenuItem.tsx';
|
import { NestedMenuItem } from '@/base/components/menu/NestedMenuItem.tsx';
|
||||||
import type { MangaChapterStatFieldsFragment, MangaType } from '@/lib/graphql/generated/graphql.ts';
|
import type { MangaChapterStatFieldsFragment } from '@/lib/graphql/generated/graphql.ts';
|
||||||
import type { MangaAction, MangaDownloadInfo, MangaIdInfo, MangaUnreadInfo } from '@/features/manga/Manga.types.ts';
|
import type {
|
||||||
|
MangaAction,
|
||||||
|
MangaDownloadInfo,
|
||||||
|
MangaIdInfo,
|
||||||
|
MangaSourceIdInfo,
|
||||||
|
MangaTitleInfo,
|
||||||
|
MangaUnreadInfo,
|
||||||
|
} from '@/features/manga/Manga.types.ts';
|
||||||
import { MANGA_ACTION_TO_TRANSLATION } from '@/features/manga/Manga.constants.ts';
|
import { MANGA_ACTION_TO_TRANSLATION } from '@/features/manga/Manga.constants.ts';
|
||||||
import { CategorySelect } from '@/features/category/components/CategorySelect.tsx';
|
import { CategorySelect } from '@/features/category/components/CategorySelect.tsx';
|
||||||
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
||||||
@@ -40,8 +47,8 @@ import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
|||||||
type BaseProps = { onClose: () => void; setHideMenu: (hide: boolean) => void };
|
type BaseProps = { onClose: () => void; setHideMenu: (hide: boolean) => void };
|
||||||
|
|
||||||
export type SingleModeProps = {
|
export type SingleModeProps = {
|
||||||
manga: Pick<MangaType, 'id' | 'title' | 'sourceId'> & MangaDownloadInfo & MangaUnreadInfo;
|
manga: MangaIdInfo & MangaTitleInfo & MangaSourceIdInfo & MangaDownloadInfo & MangaUnreadInfo;
|
||||||
handleSelection?: SelectableCollectionReturnType<MangaType['id']>['handleSelection'];
|
handleSelection?: SelectableCollectionReturnType<MangaIdInfo['id']>['handleSelection'];
|
||||||
};
|
};
|
||||||
|
|
||||||
type SelectModeProps = {
|
type SelectModeProps = {
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewA
|
|||||||
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
|
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
|
||||||
import { MangaCard } from '@/features/manga/components/cards/MangaCard.tsx';
|
import { MangaCard } from '@/features/manga/components/cards/MangaCard.tsx';
|
||||||
import { DEFAULT_FULL_FAB_HEIGHT } from '@/base/components/buttons/StyledFab.tsx';
|
import { DEFAULT_FULL_FAB_HEIGHT } from '@/base/components/buttons/StyledFab.tsx';
|
||||||
import type { MangaCardProps } from '@/features/manga/Manga.types.ts';
|
import type { MangaCardProps, MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
||||||
import type { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { useResizeObserver } from '@/base/hooks/useResizeObserver.tsx';
|
import { useResizeObserver } from '@/base/hooks/useResizeObserver.tsx';
|
||||||
import { useNavBarContext } from '@/features/navigation-bar/NavbarContext.tsx';
|
import { useNavBarContext } from '@/features/navigation-bar/NavbarContext.tsx';
|
||||||
import { GridLayout } from '@/base/Base.types.ts';
|
import { GridLayout } from '@/base/Base.types.ts';
|
||||||
@@ -64,7 +63,7 @@ const createMangaCard = (
|
|||||||
gridLayout?: GridLayout,
|
gridLayout?: GridLayout,
|
||||||
inLibraryIndicator?: boolean,
|
inLibraryIndicator?: boolean,
|
||||||
isSelectModeActive: boolean = false,
|
isSelectModeActive: boolean = false,
|
||||||
selectedMangaIds?: MangaType['id'][],
|
selectedMangaIds?: MangaIdInfo['id'][],
|
||||||
handleSelection?: DefaultGridProps['handleSelection'],
|
handleSelection?: DefaultGridProps['handleSelection'],
|
||||||
mode?: MangaCardProps['mode'],
|
mode?: MangaCardProps['mode'],
|
||||||
onMigrateSelect?: DefaultGridProps['onMigrateSelect'],
|
onMigrateSelect?: DefaultGridProps['onMigrateSelect'],
|
||||||
@@ -87,7 +86,7 @@ type DefaultGridProps = Omit<MangaCardProps, 'manga' | 'selected'> & {
|
|||||||
GridItemContainer: (props: GridTypeMap['props'] & Partial<GridItemProps>) => JSX.Element;
|
GridItemContainer: (props: GridTypeMap['props'] & Partial<GridItemProps>) => JSX.Element;
|
||||||
gridLayout?: GridLayout;
|
gridLayout?: GridLayout;
|
||||||
isSelectModeActive?: boolean;
|
isSelectModeActive?: boolean;
|
||||||
selectedMangaIds?: Required<MangaType['id']>[];
|
selectedMangaIds?: MangaIdInfo['id'][];
|
||||||
ref?: ForwardedRef<HTMLDivElement | null>;
|
ref?: ForwardedRef<HTMLDivElement | null>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ import { bindTrigger } from 'material-ui-popup-state';
|
|||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
||||||
import type { SelectableCollectionReturnType } from '@/base/collection/hooks/useSelectableCollection.ts';
|
import type { SelectableCollectionReturnType } from '@/base/collection/hooks/useSelectableCollection.ts';
|
||||||
import type { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { MUIUtil } from '@/lib/mui/MUI.util.ts';
|
import { MUIUtil } from '@/lib/mui/MUI.util.ts';
|
||||||
|
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
||||||
|
|
||||||
const preventDefaultAction = (e: BaseSyntheticEvent) => {
|
const preventDefaultAction = (e: BaseSyntheticEvent) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@@ -35,7 +35,7 @@ export const MangaOptionButton = ({
|
|||||||
}: {
|
}: {
|
||||||
id: number;
|
id: number;
|
||||||
selected?: boolean | null;
|
selected?: boolean | null;
|
||||||
handleSelection?: SelectableCollectionReturnType<MangaType['id']>['handleSelection'];
|
handleSelection?: SelectableCollectionReturnType<MangaIdInfo['id']>['handleSelection'];
|
||||||
asCheckbox?: boolean;
|
asCheckbox?: boolean;
|
||||||
popupState: PopupState;
|
popupState: PopupState;
|
||||||
ref?: ForwardedRef<HTMLButtonElement | null>;
|
ref?: ForwardedRef<HTMLButtonElement | null>;
|
||||||
|
|||||||
@@ -23,14 +23,19 @@ import { AwaitableComponent } from 'awaitable-component';
|
|||||||
import ColorLensIcon from '@mui/icons-material/ColorLens';
|
import ColorLensIcon from '@mui/icons-material/ColorLens';
|
||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
||||||
import type { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
||||||
import { CategorySelect } from '@/features/category/components/CategorySelect.tsx';
|
import { CategorySelect } from '@/features/category/components/CategorySelect.tsx';
|
||||||
import { useMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
import { useMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
||||||
import { ThemeCreationDialog } from '@/features/theme/components/CreateThemeDialog.tsx';
|
import { ThemeCreationDialog } from '@/features/theme/components/CreateThemeDialog.tsx';
|
||||||
|
import type {
|
||||||
|
MangaIdInfo,
|
||||||
|
MangaInLibraryInfo,
|
||||||
|
MangaSourceIdInfo,
|
||||||
|
MangaTitleInfo,
|
||||||
|
} from '@/features/manga/Manga.types.ts';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
manga: Pick<MangaType, 'id' | 'inLibrary' | 'sourceId' | 'title'>;
|
manga: MangaIdInfo & MangaInLibraryInfo & MangaSourceIdInfo & MangaTitleInfo;
|
||||||
onRefresh: () => any;
|
onRefresh: () => any;
|
||||||
refreshing: boolean;
|
refreshing: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ import { makeToast } from '@/base/utils/Toast.ts';
|
|||||||
import { TrackManga } from '@/features/tracker/components/TrackManga.tsx';
|
import { TrackManga } from '@/features/tracker/components/TrackManga.tsx';
|
||||||
import { Trackers } from '@/features/tracker/services/Trackers.ts';
|
import { Trackers } from '@/features/tracker/services/Trackers.ts';
|
||||||
import { CustomButton } from '@/base/components/buttons/CustomButton.tsx';
|
import { CustomButton } from '@/base/components/buttons/CustomButton.tsx';
|
||||||
import type { GetTrackersSettingsQuery, MangaType } from '@/lib/graphql/generated/graphql.ts';
|
import type { GetTrackersSettingsQuery } from '@/lib/graphql/generated/graphql.ts';
|
||||||
import { GET_TRACKERS_SETTINGS } from '@/lib/graphql/tracker/TrackerQuery.ts';
|
import { GET_TRACKERS_SETTINGS } from '@/lib/graphql/tracker/TrackerQuery.ts';
|
||||||
import type { MangaTrackRecordInfo } from '@/features/manga/Manga.types.ts';
|
import type { MangaTitleInfo, MangaTrackRecordInfo } from '@/features/manga/Manga.types.ts';
|
||||||
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
||||||
import { MediaQuery } from '@/base/utils/MediaQuery.tsx';
|
import { MediaQuery } from '@/base/utils/MediaQuery.tsx';
|
||||||
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
||||||
|
|
||||||
export const TrackMangaButton = ({ manga }: { manga: MangaTrackRecordInfo & Pick<MangaType, 'title'> }) => {
|
export const TrackMangaButton = ({ manga }: { manga: MangaTrackRecordInfo & MangaTitleInfo }) => {
|
||||||
const { t } = useLingui();
|
const { t } = useLingui();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const isMobileWidth = MediaQuery.useIsMobileWidth();
|
const isMobileWidth = MediaQuery.useIsMobileWidth();
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import { TrackMangaButton } from '@/features/manga/components/TrackMangaButton.t
|
|||||||
import { useManageMangaLibraryState } from '@/features/manga/hooks/useManageMangaLibraryState.tsx';
|
import { useManageMangaLibraryState } from '@/features/manga/hooks/useManageMangaLibraryState.tsx';
|
||||||
import { Metadata as BaseMetadata } from '@/base/components/texts/Metadata.tsx';
|
import { Metadata as BaseMetadata } from '@/base/components/texts/Metadata.tsx';
|
||||||
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
||||||
import type { MangaType, SourceType } from '@/lib/graphql/generated/graphql.ts';
|
import type { MangaType, SourceType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { useMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
import { useMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
||||||
import { MANGA_STATUS_TO_TRANSLATION } from '@/features/manga/Manga.constants.ts';
|
import { MANGA_STATUS_TO_TRANSLATION } from '@/features/manga/Manga.constants.ts';
|
||||||
import type {
|
import type {
|
||||||
|
|||||||
@@ -16,19 +16,16 @@ import { getMetadataServerSettings } from '@/features/settings/services/ServerSe
|
|||||||
import { Categories } from '@/features/category/services/Categories.ts';
|
import { Categories } from '@/features/category/services/Categories.ts';
|
||||||
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
||||||
import { Mangas } from '@/features/manga/services/Mangas.ts';
|
import { Mangas } from '@/features/manga/services/Mangas.ts';
|
||||||
import type {
|
import type { GetCategoriesBaseQuery, GetCategoriesBaseQueryVariables } from '@/lib/graphql/generated/graphql.ts';
|
||||||
GetCategoriesBaseQuery,
|
|
||||||
GetCategoriesBaseQueryVariables,
|
|
||||||
MangaType,
|
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { GET_CATEGORIES_BASE } from '@/lib/graphql/category/CategoryQuery.ts';
|
import { GET_CATEGORIES_BASE } from '@/lib/graphql/category/CategoryQuery.ts';
|
||||||
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import { CategorySelect } from '@/features/category/components/CategorySelect';
|
import { CategorySelect } from '@/features/category/components/CategorySelect';
|
||||||
import { Confirmation } from '@/base/AppAwaitableComponent.ts';
|
import { Confirmation } from '@/base/AppAwaitableComponent.ts';
|
||||||
|
import type { MangaIdInfo, MangaInLibraryInfo, MangaTitleInfo } from '@/features/manga/Manga.types.ts';
|
||||||
|
|
||||||
export const useManageMangaLibraryState = (
|
export const useManageMangaLibraryState = (
|
||||||
manga: Pick<MangaType, 'id' | 'title'> & Partial<Pick<MangaType, 'inLibrary'>>,
|
manga: MangaIdInfo & MangaTitleInfo & Partial<MangaInLibraryInfo>,
|
||||||
confirmRemoval: boolean = false,
|
confirmRemoval: boolean = false,
|
||||||
) => {
|
) => {
|
||||||
const { t } = useLingui();
|
const { t } = useLingui();
|
||||||
|
|||||||
@@ -11,12 +11,10 @@ import { t } from '@lingui/core/macro';
|
|||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import type {
|
import type {
|
||||||
ChapterConditionInput,
|
|
||||||
GetMangasBaseQuery,
|
GetMangasBaseQuery,
|
||||||
GetMangasBaseQueryVariables,
|
GetMangasBaseQueryVariables,
|
||||||
GetMangasChapterIdsWithStateQuery,
|
GetMangasChapterIdsWithStateQuery,
|
||||||
MangaBaseFieldsFragment,
|
MangaBaseFieldsFragment,
|
||||||
UpdateMangaCategoriesPatchInput,
|
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql.ts';
|
||||||
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
||||||
import { makeToast } from '@/base/utils/Toast.ts';
|
import { makeToast } from '@/base/utils/Toast.ts';
|
||||||
@@ -52,6 +50,10 @@ import { MigrationManager } from '@/features/migration/MigrationManager.ts';
|
|||||||
import uniq from 'lodash/fp/uniq';
|
import uniq from 'lodash/fp/uniq';
|
||||||
import { ReactRouter } from '@/lib/react-router/ReactRouter.ts';
|
import { ReactRouter } from '@/lib/react-router/ReactRouter.ts';
|
||||||
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
||||||
|
import type {
|
||||||
|
ChapterConditionInput,
|
||||||
|
UpdateMangaCategoriesPatchInput,
|
||||||
|
} from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
type DownloadChaptersOptions = {
|
type DownloadChaptersOptions = {
|
||||||
size?: number;
|
size?: number;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import type { MetadataServerSettingKeys, SearchMetadataKeys } from '@/features/s
|
|||||||
import type { MangaMetadataKeys } from '@/features/manga/Manga.types.ts';
|
import type { MangaMetadataKeys } from '@/features/manga/Manga.types.ts';
|
||||||
import type { SourceMetadataKeys } from '@/features/source/Source.types.ts';
|
import type { SourceMetadataKeys } from '@/features/source/Source.types.ts';
|
||||||
import type { CategoryMetadataKeys } from '@/features/category/Category.types.ts';
|
import type { CategoryMetadataKeys } from '@/features/category/Category.types.ts';
|
||||||
import type { MetaType } from '@/lib/graphql/generated/graphql.ts';
|
import type { MetaType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { IReaderSettings } from '@/features/reader/Reader.types.ts';
|
import type { IReaderSettings } from '@/features/reader/Reader.types.ts';
|
||||||
|
|
||||||
export interface IMetadataMigration {
|
export interface IMetadataMigration {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import type { FieldFunctionOptions } from '@apollo/client/cache';
|
import type { FieldFunctionOptions } from '@apollo/client/cache';
|
||||||
import type { Reference } from '@apollo/client/utilities';
|
import type { Reference } from '@apollo/client/utilities';
|
||||||
import type { MetaType } from '@/lib/graphql/generated/graphql.ts';
|
import type { MetaType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
type ReadFieldFunction = FieldFunctionOptions['readField'];
|
type ReadFieldFunction = FieldFunctionOptions['readField'];
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,9 @@ import type { GqlMetaHolder, Metadata, MetadataHolderType } from '@/features/met
|
|||||||
import { convertFromGqlMeta } from '@/features/metadata/services/MetadataConverter.ts';
|
import { convertFromGqlMeta } from '@/features/metadata/services/MetadataConverter.ts';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { GET_GLOBAL_METADATAS } from '@/lib/graphql/metadata/GlobalMetadataQuery.ts';
|
import { GET_GLOBAL_METADATAS } from '@/lib/graphql/metadata/GlobalMetadataQuery.ts';
|
||||||
import type {
|
import type { GetGlobalMetadatasQuery, GetGlobalMetadatasQueryVariables } from '@/lib/graphql/generated/graphql.ts';
|
||||||
GetGlobalMetadatasQuery,
|
|
||||||
GetGlobalMetadatasQueryVariables,
|
|
||||||
MetaInput,
|
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import { doesMetadataKeyExistIn } from '@/features/metadata/Metadata.utils.ts';
|
import { doesMetadataKeyExistIn } from '@/features/metadata/Metadata.utils.ts';
|
||||||
|
import type { MetaInput } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
export class MetadataChunker {
|
export class MetadataChunker {
|
||||||
static readonly MAX_METADATA_VALUE_LENGTH = 4000;
|
static readonly MAX_METADATA_VALUE_LENGTH = 4000;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { MetaType } from '@/lib/graphql/generated/graphql.ts';
|
import type { MetaType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { AllowedMetadataValueTypes, AppMetadataKeys, Metadata } from '@/features/metadata/Metadata.types.ts';
|
import type { AllowedMetadataValueTypes, AppMetadataKeys, Metadata } from '@/features/metadata/Metadata.types.ts';
|
||||||
import { APP_METADATA } from '@/features/metadata/Metadata.constants.ts';
|
import { APP_METADATA } from '@/features/metadata/Metadata.constants.ts';
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { convertToGqlMeta } from '@/features/metadata/services/MetadataConverter
|
|||||||
import { MetadataChunker } from '@/features/metadata/services/MetadataChunker.ts';
|
import { MetadataChunker } from '@/features/metadata/services/MetadataChunker.ts';
|
||||||
import type { SourceIdInfo } from '@/features/source/Source.types.ts';
|
import type { SourceIdInfo } from '@/features/source/Source.types.ts';
|
||||||
import type { ChapterIdInfo } from '@/features/chapter/Chapter.types.ts';
|
import type { ChapterIdInfo } from '@/features/chapter/Chapter.types.ts';
|
||||||
import type { MetaInput } from '@/lib/graphql/generated/graphql.ts';
|
import type { MetaInput } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
type MetadataUpdateOptions = {
|
type MetadataUpdateOptions = {
|
||||||
update?: MetadataKeyValuePair[];
|
update?: MetadataKeyValuePair[];
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import type { SetChapterMetasItemInput } from '@/lib/graphql/generated/graphql.ts';
|
import type { SetChapterMetasItemInput } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
||||||
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
||||||
import { ALL_APP_METADATA_KEY_PREFIXES } from '@/features/metadata/Metadata.constants.ts';
|
import { ALL_APP_METADATA_KEY_PREFIXES } from '@/features/metadata/Metadata.constants.ts';
|
||||||
|
|||||||
@@ -38,10 +38,19 @@ import type {
|
|||||||
GetServerSettingsQueryVariables,
|
GetServerSettingsQueryVariables,
|
||||||
MangaMigrationFieldsFragment,
|
MangaMigrationFieldsFragment,
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql.ts';
|
||||||
import { FetchSourceMangaType } from '@/lib/graphql/generated/graphql.ts';
|
import { FetchSourceMangaType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { GET_SERVER_SETTINGS } from '@/lib/graphql/settings/SettingsQuery.ts';
|
import { GET_SERVER_SETTINGS } from '@/lib/graphql/settings/SettingsQuery.ts';
|
||||||
import { MangaMigration } from '@/features/migration/MangaMigration.ts';
|
import { MangaMigration } from '@/features/migration/MangaMigration.ts';
|
||||||
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
import type {
|
||||||
|
MangaArtistInfo,
|
||||||
|
MangaAuthorInfo,
|
||||||
|
MangaHighestChapterNumberInfo,
|
||||||
|
MangaIdInfo,
|
||||||
|
MangaSourceIdInfo,
|
||||||
|
MangaSourceNameInfo,
|
||||||
|
MangaThumbnailInfo,
|
||||||
|
MangaTitleInfo,
|
||||||
|
} from '@/features/manga/Manga.types.ts';
|
||||||
import type { SourceIdInfo } from '@/features/source/Source.types.ts';
|
import type { SourceIdInfo } from '@/features/source/Source.types.ts';
|
||||||
import { assertIsDefined } from '@/base/Asserts.ts';
|
import { assertIsDefined } from '@/base/Asserts.ts';
|
||||||
import { ReactRouter } from '@/lib/react-router/ReactRouter.ts';
|
import { ReactRouter } from '@/lib/react-router/ReactRouter.ts';
|
||||||
@@ -286,7 +295,16 @@ export class MigrationManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static selectMangas(mangas: MangaMigrationFieldsFragment[]): void {
|
static selectMangas(
|
||||||
|
mangas: (MangaIdInfo &
|
||||||
|
MangaTitleInfo &
|
||||||
|
MangaArtistInfo &
|
||||||
|
MangaAuthorInfo &
|
||||||
|
MangaHighestChapterNumberInfo &
|
||||||
|
MangaThumbnailInfo &
|
||||||
|
MangaSourceIdInfo &
|
||||||
|
MangaSourceNameInfo)[],
|
||||||
|
): void {
|
||||||
MigrationManager.ensureIsInValidPhase([MigrationPhase.SELECT_MANGAS]);
|
MigrationManager.ensureIsInValidPhase([MigrationPhase.SELECT_MANGAS]);
|
||||||
|
|
||||||
const isSingleManga = mangas.length === 1;
|
const isSingleManga = mangas.length === 1;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import { NavBarItemMoreGroup } from '@/features/navigation-bar/NavigationBar.typ
|
|||||||
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
||||||
import { DownloaderState } from '@/lib/graphql/generated/graphql.ts';
|
import { DownloaderState } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
type RestrictedNavBarItem<Show extends NavbarItem['show']> = Omit<NavbarItem, 'show'> & { show: Show };
|
type RestrictedNavBarItem<Show extends NavbarItem['show']> = Omit<NavbarItem, 'show'> & { show: Show };
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import type { ReaderPageSpreadState, ReaderStateChapters, ReaderStatePages } from '@/features/reader/Reader.types.ts';
|
import type { ReaderPageSpreadState, ReaderStateChapters, ReaderStatePages } from '@/features/reader/Reader.types.ts';
|
||||||
import { ReaderResumeMode, ReadingMode } from '@/features/reader/Reader.types.ts';
|
import { ReaderResumeMode, ReadingMode } from '@/features/reader/Reader.types.ts';
|
||||||
import type { UpdateChapterPatchInput } from '@/lib/graphql/generated/graphql.ts';
|
import type { UpdateChapterPatchInput } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { ChapterIdInfo, TChapterReader } from '@/features/chapter/Chapter.types.ts';
|
import type { ChapterIdInfo, TChapterReader } from '@/features/chapter/Chapter.types.ts';
|
||||||
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
import { Chapters } from '@/features/chapter/services/Chapters.ts';
|
||||||
import { CHAPTER_READER_FIELDS } from '@/lib/graphql/chapter/ChapterFragments.ts';
|
import { CHAPTER_READER_FIELDS } from '@/lib/graphql/chapter/ChapterFragments.ts';
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { makeToast } from '@/base/utils/Toast.ts';
|
|||||||
import { MediaQuery } from '@/base/utils/MediaQuery.tsx';
|
import { MediaQuery } from '@/base/utils/MediaQuery.tsx';
|
||||||
import { useBackButton } from '@/base/hooks/useBackButton.ts';
|
import { useBackButton } from '@/base/hooks/useBackButton.ts';
|
||||||
import { GLOBAL_READER_SETTING_KEYS } from '@/features/reader/settings/ReaderSettings.constants.tsx';
|
import { GLOBAL_READER_SETTING_KEYS } from '@/features/reader/settings/ReaderSettings.constants.tsx';
|
||||||
import type { UpdateChapterPatchInput } from '@/lib/graphql/generated/graphql.ts';
|
import type { UpdateChapterPatchInput } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { useMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
import { useMetadataServerSettings } from '@/features/settings/services/ServerSettingsMetadata.ts';
|
||||||
import {
|
import {
|
||||||
getChapterIdsForDownloadAhead,
|
getChapterIdsForDownloadAhead,
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import {
|
|||||||
requestMangaMetadataUpdate,
|
requestMangaMetadataUpdate,
|
||||||
requestServerMetadataUpdate,
|
requestServerMetadataUpdate,
|
||||||
} from '@/features/metadata/services/MetadataUpdater.ts';
|
} from '@/features/metadata/services/MetadataUpdater.ts';
|
||||||
import type { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
import type { IReaderSettings, IReaderSettingsWithDefaultFlag, ReadingMode } from '@/features/reader/Reader.types.ts';
|
import type { IReaderSettings, IReaderSettingsWithDefaultFlag, ReadingMode } from '@/features/reader/Reader.types.ts';
|
||||||
import { convertFromGqlMeta } from '@/features/metadata/services/MetadataConverter.ts';
|
import { convertFromGqlMeta } from '@/features/metadata/services/MetadataConverter.ts';
|
||||||
import { getMetadataFrom } from '@/features/metadata/services/MetadataReader.ts';
|
import { getMetadataFrom } from '@/features/metadata/services/MetadataReader.ts';
|
||||||
@@ -220,7 +219,7 @@ export const useDefaultReaderSettingsWithDefaultFlag = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const updateReaderSettings = async <Setting extends keyof IReaderSettings = keyof IReaderSettings>(
|
export const updateReaderSettings = async <Setting extends keyof IReaderSettings = keyof IReaderSettings>(
|
||||||
manga: Pick<MangaType, 'id'> & GqlMetaHolder,
|
manga: MangaIdInfo & GqlMetaHolder,
|
||||||
setting: Setting,
|
setting: Setting,
|
||||||
value: IReaderSettings[Setting],
|
value: IReaderSettings[Setting],
|
||||||
isGlobal: boolean = false,
|
isGlobal: boolean = false,
|
||||||
@@ -241,7 +240,7 @@ export const updateReaderSettings = async <Setting extends keyof IReaderSettings
|
|||||||
};
|
};
|
||||||
export const createUpdateReaderSettings =
|
export const createUpdateReaderSettings =
|
||||||
<Settings extends keyof IReaderSettings>(
|
<Settings extends keyof IReaderSettings>(
|
||||||
manga: Pick<MangaType, 'id'> & GqlMetaHolder,
|
manga: MangaIdInfo & GqlMetaHolder,
|
||||||
handleError: (error: any) => void = defaultPromiseErrorHandler('createUpdateReaderSettings'),
|
handleError: (error: any) => void = defaultPromiseErrorHandler('createUpdateReaderSettings'),
|
||||||
profile?: ReadingMode,
|
profile?: ReadingMode,
|
||||||
): ((...args: OmitFirst<Parameters<typeof updateReaderSettings<Settings>>>) => Promise<void>) =>
|
): ((...args: OmitFirst<Parameters<typeof updateReaderSettings<Settings>>>) => Promise<void>) =>
|
||||||
|
|||||||
@@ -29,8 +29,7 @@ import type { NavbarContextType } from '@/features/navigation-bar/NavigationBar.
|
|||||||
import { withPropsFrom } from '@/base/hoc/withPropsFrom.tsx';
|
import { withPropsFrom } from '@/base/hoc/withPropsFrom.tsx';
|
||||||
import { getValueFromObject, noOp } from '@/lib/HelperFunctions.ts';
|
import { getValueFromObject, noOp } from '@/lib/HelperFunctions.ts';
|
||||||
import { READER_BACKGROUND_TO_COLOR } from '@/features/reader/settings/ReaderSettings.constants.tsx';
|
import { READER_BACKGROUND_TO_COLOR } from '@/features/reader/settings/ReaderSettings.constants.tsx';
|
||||||
import type { ChapterType } from '@/lib/graphql/generated/graphql.ts';
|
import type { ChapterIdInfo, ChapterNameInfo, ChapterScanlatorInfo } from '@/features/chapter/Chapter.types.ts';
|
||||||
import type { ChapterIdInfo } from '@/features/chapter/Chapter.types.ts';
|
|
||||||
import {
|
import {
|
||||||
useReaderChaptersStore,
|
useReaderChaptersStore,
|
||||||
useReaderPagesStore,
|
useReaderPagesStore,
|
||||||
@@ -46,8 +45,8 @@ const ChapterInfo = ({
|
|||||||
backgroundColor,
|
backgroundColor,
|
||||||
}: {
|
}: {
|
||||||
title: string;
|
title: string;
|
||||||
name?: ChapterType['name'];
|
name?: ChapterNameInfo['name'];
|
||||||
scanlator?: ChapterType['scanlator'];
|
scanlator?: ChapterScanlatorInfo['scanlator'];
|
||||||
backgroundColor: IReaderSettings['backgroundColor'];
|
backgroundColor: IReaderSettings['backgroundColor'];
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
@@ -89,12 +88,12 @@ const BaseReaderTransitionPage = ({
|
|||||||
}: Pick<NavbarContextType, 'readerNavBarWidth'> & {
|
}: Pick<NavbarContextType, 'readerNavBarWidth'> & {
|
||||||
// gets used in the "source props creators" of the "withPropsFrom" call
|
// gets used in the "source props creators" of the "withPropsFrom" call
|
||||||
chapterId: ChapterIdInfo['id'];
|
chapterId: ChapterIdInfo['id'];
|
||||||
currentChapterName?: ChapterType['name'];
|
currentChapterName?: ChapterNameInfo['name'];
|
||||||
currentChapterScanlator?: ChapterType['scanlator'];
|
currentChapterScanlator?: ChapterScanlatorInfo['scanlator'];
|
||||||
previousChapterName?: ChapterType['name'];
|
previousChapterName?: ChapterNameInfo['name'];
|
||||||
previousChapterScanlator?: ChapterType['scanlator'];
|
previousChapterScanlator?: ChapterScanlatorInfo['scanlator'];
|
||||||
nextChapterName?: ChapterType['name'];
|
nextChapterName?: ChapterNameInfo['name'];
|
||||||
nextChapterScanlator?: ChapterType['scanlator'];
|
nextChapterScanlator?: ChapterScanlatorInfo['scanlator'];
|
||||||
type: Exclude<ReaderTransitionPageMode, ReaderTransitionPageMode.NONE | ReaderTransitionPageMode.BOTH>;
|
type: Exclude<ReaderTransitionPageMode, ReaderTransitionPageMode.NONE | ReaderTransitionPageMode.BOTH>;
|
||||||
handleBack: () => void;
|
handleBack: () => void;
|
||||||
}) => {
|
}) => {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import type {
|
|||||||
SettingsDownloadConversion,
|
SettingsDownloadConversion,
|
||||||
SettingsDownloadConversionHeader,
|
SettingsDownloadConversionHeader,
|
||||||
SettingsDownloadConversionType,
|
SettingsDownloadConversionType,
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { UrlUtil } from '@/lib/UrlUtil.ts';
|
import { UrlUtil } from '@/lib/UrlUtil.ts';
|
||||||
import { jsonSaveParse } from '@/lib/HelperFunctions.ts';
|
import { jsonSaveParse } from '@/lib/HelperFunctions.ts';
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import {
|
|||||||
WebUiChannel,
|
WebUiChannel,
|
||||||
WebUiFlavor,
|
WebUiFlavor,
|
||||||
WebUiInterface,
|
WebUiInterface,
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { ThemeMode } from '@/features/theme/AppTheme.types.ts';
|
import { ThemeMode } from '@/features/theme/AppTheme.types.ts';
|
||||||
import { getPreferredISOLanguageCodes } from '@/lib/ISOLanguageUtil.ts';
|
import { getPreferredISOLanguageCodes } from '@/lib/ISOLanguageUtil.ts';
|
||||||
|
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ import type { MetadataTrackingSettings } from '@/features/tracker/Tracker.types.
|
|||||||
import type { MetadataUpdateSettings } from '@/features/app-updates/AppUpdateChecker.types.ts';
|
import type { MetadataUpdateSettings } from '@/features/app-updates/AppUpdateChecker.types.ts';
|
||||||
import type { MetadataThemeSettings } from '@/features/theme/AppTheme.types.ts';
|
import type { MetadataThemeSettings } from '@/features/theme/AppTheme.types.ts';
|
||||||
import type {
|
import type {
|
||||||
GetServerSettingsQuery,
|
|
||||||
Maybe,
|
Maybe,
|
||||||
SettingsDownloadConversion,
|
SettingsDownloadConversion,
|
||||||
SettingsDownloadConversionHeader,
|
SettingsDownloadConversionHeader,
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { MetadataHistorySettings } from '@/features/history/History.types.ts';
|
import type { MetadataHistorySettings } from '@/features/history/History.types.ts';
|
||||||
|
import type { GetServerSettingsQuery } from '@/lib/graphql/generated/graphql.ts';
|
||||||
|
|
||||||
export type MetadataServerSettingKeys = keyof MetadataServerSettings;
|
export type MetadataServerSettingKeys = keyof MetadataServerSettings;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import Typography from '@mui/material/Typography';
|
|||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import Collapse from '@mui/material/Collapse';
|
import Collapse from '@mui/material/Collapse';
|
||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import type { Maybe } from '@/lib/graphql/generated/graphql.ts';
|
import type { Maybe } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { addStableIdToKeyValueItems, isDuplicateKeyValueItem } from '@/features/settings/ImageProcessing.utils.ts';
|
import { addStableIdToKeyValueItems, isDuplicateKeyValueItem } from '@/features/settings/ImageProcessing.utils.ts';
|
||||||
import { KeyValueItem } from '@/features/settings/components/images/KeyValueItem.tsx';
|
import { KeyValueItem } from '@/features/settings/components/images/KeyValueItem.tsx';
|
||||||
import type { TSettingsDownloadConversionKeyValueItem } from '@/features/settings/Settings.types.ts';
|
import type { TSettingsDownloadConversionKeyValueItem } from '@/features/settings/Settings.types.ts';
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import type {
|
|||||||
KoreaderSyncChecksumMethod,
|
KoreaderSyncChecksumMethod,
|
||||||
KoreaderSyncConflictStrategy,
|
KoreaderSyncConflictStrategy,
|
||||||
KoSyncStatusPayload,
|
KoSyncStatusPayload,
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import {
|
import {
|
||||||
KOREADER_SYNC_CHECKSUM_METHOD_SELECT_VALUES,
|
KOREADER_SYNC_CHECKSUM_METHOD_SELECT_VALUES,
|
||||||
KOREADER_SYNC_CONFLICT_STRATEGY_SELECT_VALUES,
|
KOREADER_SYNC_CONFLICT_STRATEGY_SELECT_VALUES,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { useLingui } from '@lingui/react/macro';
|
|||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { ListItemLink } from '@/base/components/lists/ListItemLink.tsx';
|
import { ListItemLink } from '@/base/components/lists/ListItemLink.tsx';
|
||||||
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
|
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
|
||||||
import { UpdateState } from '@/lib/graphql/generated/graphql.ts';
|
import { UpdateState } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
||||||
import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewAbsoluteCentered.tsx';
|
import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewAbsoluteCentered.tsx';
|
||||||
import { VersionInfo } from '@/features/app-updates/components/VersionInfo.tsx';
|
import { VersionInfo } from '@/features/app-updates/components/VersionInfo.tsx';
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
IMAGE_PROCESSING_TYPE_TO_TRANSLATION,
|
IMAGE_PROCESSING_TYPE_TO_TRANSLATION,
|
||||||
} from '@/features/settings/Settings.constants.ts';
|
} from '@/features/settings/Settings.constants.ts';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import type { ImageProcessingType, ServerSettings } from '@/features/settings/Settings.types.ts';
|
import type { ImageProcessingType } from '@/features/settings/Settings.types.ts';
|
||||||
import { makeToast } from '@/base/utils/Toast.ts';
|
import { makeToast } from '@/base/utils/Toast.ts';
|
||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
|
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
|
||||||
@@ -34,6 +34,7 @@ import {
|
|||||||
} from '@/features/settings/ImageProcessing.utils.ts';
|
} from '@/features/settings/ImageProcessing.utils.ts';
|
||||||
import { Processing } from '@/features/settings/components/images/Processing.tsx';
|
import { Processing } from '@/features/settings/components/images/Processing.tsx';
|
||||||
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
import { STABLE_EMPTY_ARRAY } from '@/base/Base.constants.ts';
|
||||||
|
import type { PartialSettingsType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
export const ImageProcessingSetting = ({ type }: { type: ImageProcessingType }) => {
|
export const ImageProcessingSetting = ({ type }: { type: ImageProcessingType }) => {
|
||||||
const { t } = useLingui();
|
const { t } = useLingui();
|
||||||
@@ -57,7 +58,7 @@ export const ImageProcessingSetting = ({ type }: { type: ImageProcessingType })
|
|||||||
tmpConversions,
|
tmpConversions,
|
||||||
);
|
);
|
||||||
|
|
||||||
const updateSetting = (value: ServerSettings[typeof settingKey]): Promise<any> => {
|
const updateSetting = (value: PartialSettingsType[typeof settingKey]): Promise<any> => {
|
||||||
const mutation = mutateSettings({ variables: { input: { settings: { [settingKey]: value } } } });
|
const mutation = mutateSettings({ variables: { input: { settings: { [settingKey]: value } } } });
|
||||||
mutation.catch((e) => makeToast(t`Failed to save changes`, 'error', getErrorMessage(e)));
|
mutation.catch((e) => makeToast(t`Failed to save changes`, 'error', getErrorMessage(e)));
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import { makeToast } from '@/base/utils/Toast.ts';
|
|||||||
import type { MetadataUpdateSettings } from '@/features/app-updates/AppUpdateChecker.types.ts';
|
import type { MetadataUpdateSettings } from '@/features/app-updates/AppUpdateChecker.types.ts';
|
||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import { useAppTitle } from '@/features/navigation-bar/hooks/useAppTitle.ts';
|
import { useAppTitle } from '@/features/navigation-bar/hooks/useAppTitle.ts';
|
||||||
import { AuthMode, CbzMediaType, DatabaseType, SortOrder } from '@/lib/graphql/generated/graphql';
|
import { AuthMode, CbzMediaType, DatabaseType, SortOrder } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import {
|
import {
|
||||||
AUTH_MODES_SELECT_VALUES,
|
AUTH_MODES_SELECT_VALUES,
|
||||||
JWT_ACCESS_TOKEN_EXPIRY,
|
JWT_ACCESS_TOKEN_EXPIRY,
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import { requestManager } from '@/lib/requests/RequestManager.ts';
|
|||||||
import { WebUIUpdateIntervalSetting } from '@/features/settings/components/webUI/WebUIUpdateIntervalSetting.tsx';
|
import { WebUIUpdateIntervalSetting } from '@/features/settings/components/webUI/WebUIUpdateIntervalSetting.tsx';
|
||||||
import { TextSetting } from '@/base/components/settings/text/TextSetting.tsx';
|
import { TextSetting } from '@/base/components/settings/text/TextSetting.tsx';
|
||||||
import { SelectSetting } from '@/base/components/settings/SelectSetting.tsx';
|
import { SelectSetting } from '@/base/components/settings/SelectSetting.tsx';
|
||||||
import type { WebUiChannel, WebUiInterface } from '@/lib/graphql/generated/graphql.ts';
|
import type { WebUiChannel, WebUiInterface } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { WebUiFlavor } from '@/lib/graphql/generated/graphql.ts';
|
import { WebUiFlavor } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
|
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
|
||||||
import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewAbsoluteCentered.tsx';
|
import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewAbsoluteCentered.tsx';
|
||||||
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
||||||
|
|||||||
@@ -7,13 +7,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
ExtensionType,
|
|
||||||
GetSourceBrowseQuery,
|
GetSourceBrowseQuery,
|
||||||
GetSourceSettingsQuery,
|
GetSourceSettingsQuery,
|
||||||
SourceMetaFieldsFragment,
|
SourceMetaFieldsFragment,
|
||||||
|
} from '@/lib/graphql/generated/graphql.ts';
|
||||||
|
import type {
|
||||||
|
ExtensionType,
|
||||||
SourcePreferenceChangeInput,
|
SourcePreferenceChangeInput,
|
||||||
SourceType,
|
SourceType,
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
|
|
||||||
export interface IPos {
|
export interface IPos {
|
||||||
type: 'selectState' | 'textState' | 'checkBoxState' | 'triState' | 'sortState';
|
type: 'selectState' | 'textState' | 'checkBoxState' | 'triState' | 'sortState';
|
||||||
@@ -44,10 +46,10 @@ export interface PreferenceProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type CheckBoxPreferenceProps = PreferenceProps &
|
export type CheckBoxPreferenceProps = PreferenceProps &
|
||||||
ExtractByKeyValue<SourcePreferences, '__typename', 'CheckBoxPreference'>;
|
ExtractByKeyValue<SourcePreferences, 'type', 'CheckBoxPreference'>;
|
||||||
|
|
||||||
export type SwitchPreferenceCompatProps = PreferenceProps &
|
export type SwitchPreferenceCompatProps = PreferenceProps &
|
||||||
ExtractByKeyValue<SourcePreferences, '__typename', 'SwitchPreference'>;
|
ExtractByKeyValue<SourcePreferences, 'type', 'SwitchPreference'>;
|
||||||
|
|
||||||
export type TwoStatePreferenceProps = (CheckBoxPreferenceProps | SwitchPreferenceCompatProps) & {
|
export type TwoStatePreferenceProps = (CheckBoxPreferenceProps | SwitchPreferenceCompatProps) & {
|
||||||
// intetnal props
|
// intetnal props
|
||||||
@@ -55,13 +57,13 @@ export type TwoStatePreferenceProps = (CheckBoxPreferenceProps | SwitchPreferenc
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type ListPreferenceProps = PreferenceProps &
|
export type ListPreferenceProps = PreferenceProps &
|
||||||
ExtractByKeyValue<SourcePreferences, '__typename', 'ListPreference'>;
|
Omit<ExtractByKeyValue<SourcePreferences, 'type', 'ListPreference'>, '__typename'>;
|
||||||
|
|
||||||
export type MultiSelectListPreferenceProps = PreferenceProps &
|
export type MultiSelectListPreferenceProps = PreferenceProps &
|
||||||
ExtractByKeyValue<SourcePreferences, '__typename', 'MultiSelectListPreference'>;
|
Omit<ExtractByKeyValue<SourcePreferences, 'type', 'MultiSelectListPreference'>, '__typename'>;
|
||||||
|
|
||||||
export type EditTextPreferenceProps = PreferenceProps &
|
export type EditTextPreferenceProps = PreferenceProps &
|
||||||
ExtractByKeyValue<SourcePreferences, '__typename', 'EditTextPreference'>;
|
Omit<ExtractByKeyValue<SourcePreferences, 'type', 'EditTextPreference'>, '__typename'>;
|
||||||
|
|
||||||
export type SourceIdInfo = Pick<SourceType, 'id'>;
|
export type SourceIdInfo = Pick<SourceType, 'id'>;
|
||||||
export type SourceLanguageInfo = Pick<SourceType, 'lang'>;
|
export type SourceLanguageInfo = Pick<SourceType, 'lang'>;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { Options } from '@/features/source/browse/components/SourceOptions.tsx';
|
|||||||
import type { IPos, SourceFilters } from '@/features/source/Source.types.ts';
|
import type { IPos, SourceFilters } from '@/features/source/Source.types.ts';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
state: ExtractByKeyValue<SourceFilters, '__typename', 'GroupFilter'>['filters'];
|
state: ExtractByKeyValue<SourceFilters, 'type', 'GroupFilter'>['filters'];
|
||||||
name: string;
|
name: string;
|
||||||
position: number;
|
position: number;
|
||||||
updateFilterValue: (value: IPos[]) => void;
|
updateFilterValue: (value: IPos[]) => void;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import Stack from '@mui/material/Stack';
|
|||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { SortRadioInput } from '@/base/components/inputs/SortRadioInput.tsx';
|
import { SortRadioInput } from '@/base/components/inputs/SortRadioInput.tsx';
|
||||||
import type { SortSelectionInput } from '@/lib/graphql/generated/graphql.ts';
|
import type { SortSelectionInput } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { IPos } from '@/features/source/Source.types.ts';
|
import type { IPos } from '@/features/source/Source.types.ts';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ThreeStateCheckboxInput } from '@/base/components/inputs/ThreeStateCheckboxInput.tsx';
|
import { ThreeStateCheckboxInput } from '@/base/components/inputs/ThreeStateCheckboxInput.tsx';
|
||||||
import { TriState } from '@/lib/graphql/generated/graphql.ts';
|
import { TriState } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import type { IPos } from '@/features/source/Source.types.ts';
|
import type { IPos } from '@/features/source/Source.types.ts';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -191,8 +191,10 @@ const useSourceManga = (
|
|||||||
{
|
{
|
||||||
...pages[pages.length - 1],
|
...pages[pages.length - 1],
|
||||||
data: {
|
data: {
|
||||||
|
__typename: 'Mutation',
|
||||||
...lastLoadedPage!.data,
|
...lastLoadedPage!.data,
|
||||||
fetchSourceManga: {
|
fetchSourceManga: {
|
||||||
|
__typename: 'FetchSourceMangaPayload',
|
||||||
...lastLoadedPage!.data!.fetchSourceManga,
|
...lastLoadedPage!.data!.fetchSourceManga,
|
||||||
hasNextPage:
|
hasNextPage:
|
||||||
pages.length > lastLoadedPageIndex + 1
|
pages.length > lastLoadedPageIndex + 1
|
||||||
|
|||||||
@@ -6,12 +6,8 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {
|
import type { TrackerType, TrackRecordType, TrackSearchType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
TrackerType,
|
import type { TrackRecordSearchFieldsFragment } from '@/lib/graphql/generated/graphql.ts';
|
||||||
TrackRecordSearchFieldsFragment,
|
|
||||||
TrackRecordType,
|
|
||||||
TrackSearchType,
|
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
|
|
||||||
export type MetadataTrackingSettings = {
|
export type MetadataTrackingSettings = {
|
||||||
updateProgressAfterReading: boolean;
|
updateProgressAfterReading: boolean;
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ import { Trackers } from '@/features/tracker/services/Trackers.ts';
|
|||||||
import { TrackerCard, TrackerMode } from '@/features/tracker/components/cards/TrackerCard.tsx';
|
import { TrackerCard, TrackerMode } from '@/features/tracker/components/cards/TrackerCard.tsx';
|
||||||
import { makeToast } from '@/base/utils/Toast.ts';
|
import { makeToast } from '@/base/utils/Toast.ts';
|
||||||
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
||||||
import type { GetMangaTrackRecordsQuery, GetTrackersBindQuery, MangaType } from '@/lib/graphql/generated/graphql.ts';
|
import type { GetMangaTrackRecordsQuery, GetTrackersBindQuery } from '@/lib/graphql/generated/graphql.ts';
|
||||||
import { GET_TRACKERS_BIND } from '@/lib/graphql/tracker/TrackerQuery.ts';
|
import { GET_TRACKERS_BIND } from '@/lib/graphql/tracker/TrackerQuery.ts';
|
||||||
import { GET_MANGA_TRACK_RECORDS } from '@/lib/graphql/manga/MangaQuery.ts';
|
import { GET_MANGA_TRACK_RECORDS } from '@/lib/graphql/manga/MangaQuery.ts';
|
||||||
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
import type { MangaIdInfo, MangaTitleInfo } from '@/features/manga/Manga.types.ts';
|
||||||
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
import { AppRoutes } from '@/base/AppRoute.constants.ts';
|
||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import { EmptyView } from '@/base/components/feedback/EmptyView.tsx';
|
import { EmptyView } from '@/base/components/feedback/EmptyView.tsx';
|
||||||
@@ -38,7 +38,7 @@ const getTrackerMode = (id: number, trackersInUse: number[], searchModeForTracke
|
|||||||
return TrackerMode.UNTRACKED;
|
return TrackerMode.UNTRACKED;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TrackManga = ({ manga }: { manga: MangaIdInfo & Pick<MangaType, 'title'> }) => {
|
export const TrackManga = ({ manga }: { manga: MangaIdInfo & MangaTitleInfo }) => {
|
||||||
const { t } = useLingui();
|
const { t } = useLingui();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ import { TrackerMangaCard } from '@/features/tracker/components/cards/TrackerMan
|
|||||||
import { DIALOG_PADDING } from '@/features/tracker/Tracker.constants.ts';
|
import { DIALOG_PADDING } from '@/features/tracker/Tracker.constants.ts';
|
||||||
import { useGetOptionForDirection } from '@/features/theme/services/ThemeCreator.ts';
|
import { useGetOptionForDirection } from '@/features/theme/services/ThemeCreator.ts';
|
||||||
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
||||||
import type { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
import type { MangaIdInfo, MangaTitleInfo } from '@/features/manga/Manga.types.ts';
|
||||||
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
|
||||||
|
|
||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import { applyStyles } from '@/base/utils/ApplyStyles.ts';
|
import { applyStyles } from '@/base/utils/ApplyStyles.ts';
|
||||||
@@ -119,7 +118,7 @@ export const TrackerSearch = ({
|
|||||||
trackedId,
|
trackedId,
|
||||||
trackedTitle,
|
trackedTitle,
|
||||||
}: {
|
}: {
|
||||||
manga: MangaIdInfo & Pick<MangaType, 'title'>;
|
manga: MangaIdInfo & MangaTitleInfo;
|
||||||
tracker: TTrackerBind;
|
tracker: TTrackerBind;
|
||||||
closeSearchMode: () => void;
|
closeSearchMode: () => void;
|
||||||
trackedId?: string;
|
trackedId?: string;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import { TypographyMaxLines } from '@/base/components/texts/TypographyMaxLines.t
|
|||||||
import type { SelectSettingValue } from '@/base/components/settings/SelectSetting.tsx';
|
import type { SelectSettingValue } from '@/base/components/settings/SelectSetting.tsx';
|
||||||
import { SelectSetting } from '@/base/components/settings/SelectSetting.tsx';
|
import { SelectSetting } from '@/base/components/settings/SelectSetting.tsx';
|
||||||
import { CheckboxInput } from '@/base/components/inputs/CheckboxInput.tsx';
|
import { CheckboxInput } from '@/base/components/inputs/CheckboxInput.tsx';
|
||||||
import type { TrackRecordType } from '@/lib/graphql/generated/graphql.ts';
|
import type { TrackRecordType } from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import type { TTrackerBind, TTrackRecordBind } from '@/features/tracker/Tracker.types.ts';
|
import type { TTrackerBind, TTrackRecordBind } from '@/features/tracker/Tracker.types.ts';
|
||||||
import { AvatarSpinner } from '@/base/components/AvatarSpinner.tsx';
|
import { AvatarSpinner } from '@/base/components/AvatarSpinner.tsx';
|
||||||
@@ -317,6 +317,7 @@ export const TrackerActiveCard = ({
|
|||||||
type="ListPreference"
|
type="ListPreference"
|
||||||
entryValues={tracker.statuses.map((status) => `${status.value}`)}
|
entryValues={tracker.statuses.map((status) => `${status.value}`)}
|
||||||
ListPreferenceCurrentValue={`${trackRecord.status}`}
|
ListPreferenceCurrentValue={`${trackRecord.status}`}
|
||||||
|
ListPreferenceDefault={null}
|
||||||
updateValue={(_, status) => updateTrackerBind({ status: Number(status) })}
|
updateValue={(_, status) => updateTrackerBind({ status: Number(status) })}
|
||||||
summary="%s"
|
summary="%s"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -9,9 +9,8 @@
|
|||||||
import { TrackerUntrackedCard } from '@/features/tracker/components/cards/TrackerUntrackedCard.tsx';
|
import { TrackerUntrackedCard } from '@/features/tracker/components/cards/TrackerUntrackedCard.tsx';
|
||||||
import { TrackerSearch } from '@/features/tracker/components/TrackerSearch.tsx';
|
import { TrackerSearch } from '@/features/tracker/components/TrackerSearch.tsx';
|
||||||
import { TrackerActiveCard } from '@/features/tracker/components/cards/TrackerActiveCard.tsx';
|
import { TrackerActiveCard } from '@/features/tracker/components/cards/TrackerActiveCard.tsx';
|
||||||
import type { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
|
||||||
|
|
||||||
import type { MangaIdInfo } from '@/features/manga/Manga.types.ts';
|
import type { MangaIdInfo, MangaTitleInfo } from '@/features/manga/Manga.types.ts';
|
||||||
import type { TTrackerBind, TTrackRecordBind } from '@/features/tracker/Tracker.types.ts';
|
import type { TTrackerBind, TTrackRecordBind } from '@/features/tracker/Tracker.types.ts';
|
||||||
|
|
||||||
export enum TrackerMode {
|
export enum TrackerMode {
|
||||||
@@ -28,7 +27,7 @@ export const TrackerCard = ({
|
|||||||
setSearchMode,
|
setSearchMode,
|
||||||
}: {
|
}: {
|
||||||
tracker: TTrackerBind;
|
tracker: TTrackerBind;
|
||||||
manga: MangaIdInfo & Pick<MangaType, 'title'>;
|
manga: MangaIdInfo & MangaTitleInfo;
|
||||||
trackRecord?: TTrackRecordBind;
|
trackRecord?: TTrackRecordBind;
|
||||||
mode: TrackerMode;
|
mode: TrackerMode;
|
||||||
setSearchMode: (id?: number) => void;
|
setSearchMode: (id?: number) => void;
|
||||||
|
|||||||
3438
src/lib/graphql/generated/graphql-base.types.ts
Normal file
3438
src/lib/graphql/generated/graphql-base.types.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,6 @@ import { RestClient } from '@/lib/requests/client/RestClient.ts';
|
|||||||
import { GraphQLClient } from '@/lib/requests/client/GraphQLClient.ts';
|
import { GraphQLClient } from '@/lib/requests/client/GraphQLClient.ts';
|
||||||
import { BaseClient } from '@/lib/requests/client/BaseClient.ts';
|
import { BaseClient } from '@/lib/requests/client/BaseClient.ts';
|
||||||
import type {
|
import type {
|
||||||
ChapterConditionInput,
|
|
||||||
CheckForServerUpdatesQuery,
|
CheckForServerUpdatesQuery,
|
||||||
CheckForServerUpdatesQueryVariables,
|
CheckForServerUpdatesQueryVariables,
|
||||||
CheckForWebuiUpdateQuery,
|
CheckForWebuiUpdateQuery,
|
||||||
@@ -32,7 +31,6 @@ import type {
|
|||||||
ClearDownloaderMutationVariables,
|
ClearDownloaderMutationVariables,
|
||||||
ClearServerCacheMutation,
|
ClearServerCacheMutation,
|
||||||
ClearServerCacheMutationVariables,
|
ClearServerCacheMutationVariables,
|
||||||
CreateCategoryInput,
|
|
||||||
CreateCategoryMutation,
|
CreateCategoryMutation,
|
||||||
CreateCategoryMutationVariables,
|
CreateCategoryMutationVariables,
|
||||||
DeleteCategoryMutation,
|
DeleteCategoryMutation,
|
||||||
@@ -51,8 +49,6 @@ import type {
|
|||||||
EnqueueChapterDownloadMutationVariables,
|
EnqueueChapterDownloadMutationVariables,
|
||||||
EnqueueChapterDownloadsMutation,
|
EnqueueChapterDownloadsMutation,
|
||||||
EnqueueChapterDownloadsMutationVariables,
|
EnqueueChapterDownloadsMutationVariables,
|
||||||
FetchSourceMangaInput,
|
|
||||||
FilterChangeInput,
|
|
||||||
GetAboutQuery,
|
GetAboutQuery,
|
||||||
GetAboutQueryVariables,
|
GetAboutQueryVariables,
|
||||||
GetCategoriesSettingsQuery,
|
GetCategoriesSettingsQuery,
|
||||||
@@ -113,10 +109,6 @@ import type {
|
|||||||
ResetWebuiUpdateStatusMutationVariables,
|
ResetWebuiUpdateStatusMutationVariables,
|
||||||
RestoreBackupMutation,
|
RestoreBackupMutation,
|
||||||
RestoreBackupMutationVariables,
|
RestoreBackupMutationVariables,
|
||||||
SetGlobalMetasInput,
|
|
||||||
DeleteGlobalMetasInput,
|
|
||||||
SettingsType,
|
|
||||||
SourcePreferenceChangeInput,
|
|
||||||
StartDownloaderMutation,
|
StartDownloaderMutation,
|
||||||
StartDownloaderMutationVariables,
|
StartDownloaderMutationVariables,
|
||||||
StopDownloaderMutation,
|
StopDownloaderMutation,
|
||||||
@@ -143,23 +135,18 @@ import type {
|
|||||||
UpdateCategoryMutationVariables,
|
UpdateCategoryMutationVariables,
|
||||||
UpdateCategoryOrderMutation,
|
UpdateCategoryOrderMutation,
|
||||||
UpdateCategoryOrderMutationVariables,
|
UpdateCategoryOrderMutationVariables,
|
||||||
UpdateCategoryPatchInput,
|
|
||||||
UpdateChapterMutation,
|
UpdateChapterMutation,
|
||||||
UpdateChapterMutationVariables,
|
UpdateChapterMutationVariables,
|
||||||
UpdateChapterPatchInput,
|
|
||||||
UpdateChaptersMutation,
|
UpdateChaptersMutation,
|
||||||
UpdateChaptersMutationVariables,
|
UpdateChaptersMutationVariables,
|
||||||
UpdateExtensionMutation,
|
UpdateExtensionMutation,
|
||||||
UpdateExtensionMutationVariables,
|
UpdateExtensionMutationVariables,
|
||||||
UpdateExtensionPatchInput,
|
|
||||||
UpdateExtensionsMutation,
|
UpdateExtensionsMutation,
|
||||||
UpdateExtensionsMutationVariables,
|
UpdateExtensionsMutationVariables,
|
||||||
UpdateMangaCategoriesMutation,
|
UpdateMangaCategoriesMutation,
|
||||||
UpdateMangaCategoriesMutationVariables,
|
UpdateMangaCategoriesMutationVariables,
|
||||||
UpdateMangaCategoriesPatchInput,
|
|
||||||
UpdateMangaMutation,
|
UpdateMangaMutation,
|
||||||
UpdateMangaMutationVariables,
|
UpdateMangaMutationVariables,
|
||||||
UpdateMangaPatchInput,
|
|
||||||
UpdateMangasCategoriesMutation,
|
UpdateMangasCategoriesMutation,
|
||||||
UpdateMangasCategoriesMutationVariables,
|
UpdateMangasCategoriesMutationVariables,
|
||||||
UpdateMangasMutation,
|
UpdateMangasMutation,
|
||||||
@@ -170,7 +157,6 @@ import type {
|
|||||||
UpdateServerSettingsMutationVariables,
|
UpdateServerSettingsMutationVariables,
|
||||||
UpdateSourcePreferencesMutation,
|
UpdateSourcePreferencesMutation,
|
||||||
UpdateSourcePreferencesMutationVariables,
|
UpdateSourcePreferencesMutationVariables,
|
||||||
UpdateTrackInput,
|
|
||||||
UpdateWebuiMutation,
|
UpdateWebuiMutation,
|
||||||
UpdateWebuiMutationVariables,
|
UpdateWebuiMutationVariables,
|
||||||
ValidateBackupQuery,
|
ValidateBackupQuery,
|
||||||
@@ -184,10 +170,8 @@ import type {
|
|||||||
UserLoginMutationVariables,
|
UserLoginMutationVariables,
|
||||||
UserRefreshMutation,
|
UserRefreshMutation,
|
||||||
UserRefreshMutationVariables,
|
UserRefreshMutationVariables,
|
||||||
CreateBackupInput,
|
|
||||||
CreateBackupMutation,
|
CreateBackupMutation,
|
||||||
CreateBackupMutationVariables,
|
CreateBackupMutationVariables,
|
||||||
RestoreBackupInput,
|
|
||||||
KoSyncLoginMutation,
|
KoSyncLoginMutation,
|
||||||
KoSyncLoginMutationVariables,
|
KoSyncLoginMutationVariables,
|
||||||
KoSyncLogoutMutation,
|
KoSyncLogoutMutation,
|
||||||
@@ -204,17 +188,34 @@ import type {
|
|||||||
UpdateCategoryMetadataMutationVariables,
|
UpdateCategoryMetadataMutationVariables,
|
||||||
UpdateSourceMetadataMutation,
|
UpdateSourceMetadataMutation,
|
||||||
UpdateSourceMetadataMutationVariables,
|
UpdateSourceMetadataMutationVariables,
|
||||||
SetSourceMetasInput,
|
|
||||||
DeleteSourceMetasInput,
|
|
||||||
SetMangaMetasInput,
|
|
||||||
DeleteMangaMetasInput,
|
|
||||||
SetChapterMetasInput,
|
|
||||||
DeleteChapterMetasInput,
|
|
||||||
SetCategoryMetasInput,
|
|
||||||
DeleteCategoryMetasInput,
|
|
||||||
RefreshMangaMutation,
|
RefreshMangaMutation,
|
||||||
RefreshMangaMutationVariables,
|
RefreshMangaMutationVariables,
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql.ts';
|
||||||
|
import type {
|
||||||
|
DeleteGlobalMetasInput,
|
||||||
|
SetGlobalMetasInput,
|
||||||
|
UpdateExtensionPatchInput,
|
||||||
|
DeleteSourceMetasInput,
|
||||||
|
SetSourceMetasInput,
|
||||||
|
FetchSourceMangaInput,
|
||||||
|
SourcePreferenceChangeInput,
|
||||||
|
FilterChangeInput,
|
||||||
|
UpdateMangaCategoriesPatchInput,
|
||||||
|
UpdateMangaPatchInput,
|
||||||
|
DeleteMangaMetasInput,
|
||||||
|
SetMangaMetasInput,
|
||||||
|
ChapterConditionInput,
|
||||||
|
UpdateChapterPatchInput,
|
||||||
|
DeleteChapterMetasInput,
|
||||||
|
SetChapterMetasInput,
|
||||||
|
CreateCategoryInput,
|
||||||
|
UpdateCategoryPatchInput,
|
||||||
|
DeleteCategoryMetasInput,
|
||||||
|
SetCategoryMetasInput,
|
||||||
|
CreateBackupInput,
|
||||||
|
RestoreBackupInput,
|
||||||
|
UpdateTrackInput,
|
||||||
|
} from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import {
|
import {
|
||||||
CategoryOrderBy,
|
CategoryOrderBy,
|
||||||
ChapterOrderBy,
|
ChapterOrderBy,
|
||||||
@@ -222,7 +223,7 @@ import {
|
|||||||
FetchSourceMangaType,
|
FetchSourceMangaType,
|
||||||
SortOrder,
|
SortOrder,
|
||||||
DownloaderState,
|
DownloaderState,
|
||||||
} from '@/lib/graphql/generated/graphql.ts';
|
} from '@/lib/graphql/generated/graphql-base.types.ts';
|
||||||
import { GET_GLOBAL_METADATAS } from '@/lib/graphql/metadata/GlobalMetadataQuery.ts';
|
import { GET_GLOBAL_METADATAS } from '@/lib/graphql/metadata/GlobalMetadataQuery.ts';
|
||||||
import { UPDATE_GLOBAL_METADATA } from '@/lib/graphql/metadata/GlobalMetadataMutation.ts';
|
import { UPDATE_GLOBAL_METADATA } from '@/lib/graphql/metadata/GlobalMetadataMutation.ts';
|
||||||
import {
|
import {
|
||||||
@@ -1583,6 +1584,7 @@ export class RequestManager {
|
|||||||
data: {
|
data: {
|
||||||
...cachedExtensions.data,
|
...cachedExtensions.data,
|
||||||
fetchExtensions: {
|
fetchExtensions: {
|
||||||
|
__typename: 'FetchExtensionsPayload',
|
||||||
...cachedExtensions.data.fetchExtensions,
|
...cachedExtensions.data.fetchExtensions,
|
||||||
extensions: isExtensionCached
|
extensions: isExtensionCached
|
||||||
? cachedExtensions.data.fetchExtensions!.extensions.map((extension) => {
|
? cachedExtensions.data.fetchExtensions!.extensions.map((extension) => {
|
||||||
@@ -1645,6 +1647,7 @@ export class RequestManager {
|
|||||||
data: {
|
data: {
|
||||||
...cachedExtensions.data,
|
...cachedExtensions.data,
|
||||||
fetchExtensions: {
|
fetchExtensions: {
|
||||||
|
__typename: 'FetchExtensionsPayload',
|
||||||
...cachedExtensions.data.fetchExtensions,
|
...cachedExtensions.data.fetchExtensions,
|
||||||
extensions:
|
extensions:
|
||||||
cachedExtensions.data.fetchExtensions?.extensions
|
cachedExtensions.data.fetchExtensions?.extensions
|
||||||
@@ -1709,6 +1712,7 @@ export class RequestManager {
|
|||||||
data: {
|
data: {
|
||||||
...cachedExtensions.data,
|
...cachedExtensions.data,
|
||||||
fetchExtensions: {
|
fetchExtensions: {
|
||||||
|
__typename: 'FetchExtensionsPayload',
|
||||||
...cachedExtensions.data.fetchExtensions,
|
...cachedExtensions.data.fetchExtensions,
|
||||||
extensions:
|
extensions:
|
||||||
cachedExtensions.data.fetchExtensions?.extensions
|
cachedExtensions.data.fetchExtensions?.extensions
|
||||||
@@ -3495,6 +3499,7 @@ export class RequestManager {
|
|||||||
cache.writeQuery<GetDownloadStatusQuery>({
|
cache.writeQuery<GetDownloadStatusQuery>({
|
||||||
query: GET_DOWNLOAD_STATUS,
|
query: GET_DOWNLOAD_STATUS,
|
||||||
data: {
|
data: {
|
||||||
|
__typename: 'Query',
|
||||||
...downloadStatusQueryCache,
|
...downloadStatusQueryCache,
|
||||||
downloadStatus: {
|
downloadStatus: {
|
||||||
__typename: 'DownloadStatus',
|
__typename: 'DownloadStatus',
|
||||||
@@ -3588,7 +3593,7 @@ export class RequestManager {
|
|||||||
settings: {
|
settings: {
|
||||||
__typename: 'SettingsType',
|
__typename: 'SettingsType',
|
||||||
...(mutateOptions?.variables?.input.settings ?? {}),
|
...(mutateOptions?.variables?.input.settings ?? {}),
|
||||||
} as SettingsType,
|
} as UpdateServerSettingsMutation['setSettings']['settings'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...mutateOptions,
|
...mutateOptions,
|
||||||
|
|||||||
Reference in New Issue
Block a user