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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user