Feature/manga migration (#536)

* Add "migration" tab to "Browse" screen

* Add missing useEffect cleanup for navbar title and actions

* Make "SourceGridLayout" reusable

* Add migration tab to "Browse"

* Add migration logic
This commit is contained in:
schroda
2024-01-26 20:50:51 +01:00
committed by GitHub
parent 5224ad1391
commit e0c5e0521d
39 changed files with 1329 additions and 365 deletions

View File

@@ -20,6 +20,35 @@ export const GET_MANGA = gql`
}
`;
// returns the current manga from the database
export const GET_MANGA_TO_MIGRATE = gql`
query GET_MANGA_TO_MIGRATE($id: Int!, $migrateChapters: Boolean!, $migrateCategories: Boolean!) {
manga(id: $id) {
id
inLibrary
title
chapters @include(if: $migrateChapters) {
nodes {
id
manga {
id
}
chapterNumber
isRead
isDownloaded
isBookmarked
}
totalCount
}
categories @include(if: $migrateCategories) {
nodes {
id
}
}
}
}
`;
// returns the current manga from the database
export const GET_MANGAS = gql`
${FULL_MANGA_FIELDS}
@@ -57,3 +86,23 @@ export const GET_MANGAS = gql`
}
}
`;
export const GET_MIGRATABLE_SOURCE_MANGAS = gql`
query GET_MIGRATABLE_SOURCE_MANGAS($sourceId: LongString!) {
mangas(condition: { sourceId: $sourceId, inLibrary: true }) {
nodes {
id
title
thumbnailUrl
source {
id
}
categories {
nodes {
id
}
}
}
}
}
`;

View File

@@ -28,3 +28,19 @@ export const GET_SOURCES = gql`
}
}
`;
export const GET_MIGRATABLE_SOURCES = gql`
query GET_MIGRATABLE_SOURCES {
mangas(condition: { inLibrary: true }) {
nodes {
sourceId
source {
id
name
lang
iconUrl
}
}
}
}
`;