From fd651b61655315395775f6fdbe6aba672651111f Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sat, 17 Feb 2024 20:16:51 +0100 Subject: [PATCH] Feature/add vui as webui flavor (#609) * Remove unused "downloadAhead" function * [Codegen] Update generated files * Add "VUI" as webui flavor * Add info about changing the webUI channel or flavor --- src/i18n/locale/en.json | 15 +++- src/lib/graphql/generated/apollo-helpers.ts | 58 +++++++++---- src/lib/graphql/generated/graphql.ts | 87 +++++++++++++------ .../graphql/mutations/DownloaderMutation.ts | 8 -- src/lib/requests/RequestManager.ts | 9 -- src/screens/settings/WebUISettings.tsx | 8 ++ 6 files changed, 123 insertions(+), 62 deletions(-) diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json index 1a5cddd4..8f2bbef3 100644 --- a/src/i18n/locale/en.json +++ b/src/i18n/locale/en.json @@ -683,9 +683,6 @@ } }, "settings": { - "browse": { - "title": "Browse settings" - }, "about": { "server": { "label": { @@ -765,6 +762,9 @@ }, "title": "Backup" }, + "browse": { + "title": "Browse settings" + }, "clear_cache": { "label": { "description": "The cache of the client (browser, electron) should get cleared alongside it, otherwise, the client cache will keep getting used", @@ -920,7 +920,7 @@ "preview": { "label": { "description": "Use the latest features and help us get them ready for a stable release.", - "disclaimer": "Features and changes in this version might not be completely ready yet and can cause bugs.\nMake sure that you have automatic backups enabled to prevent loss of your library!", + "disclaimer": "Features and changes in this version might not be completely ready yet and can cause bugs.\nMake sure that you have automatic backups enabled to prevent loss of your library!\n\n$t(settings.webui.flavor.label.info)", "title": "Preview" } }, @@ -940,6 +940,7 @@ }, "flavor": { "label": { + "info": "After changing this setting go to the \"About\" page and check for a webUI update and install it", "title": "Flavor" }, "option": { @@ -949,6 +950,12 @@ "title": "Custom" } }, + "vui": { + "label": { + "description": "A preview focused web frontend built with svelte", + "title": "VUI" + } + }, "webui": { "label": { "description": "Use the default $t(settings.webui.title.webui)" diff --git a/src/lib/graphql/generated/apollo-helpers.ts b/src/lib/graphql/generated/apollo-helpers.ts index 63a794df..924a3253 100644 --- a/src/lib/graphql/generated/apollo-helpers.ts +++ b/src/lib/graphql/generated/apollo-helpers.ts @@ -182,6 +182,12 @@ export type DeleteMangaMetaPayloadFieldPolicy = { manga?: FieldPolicy | FieldReadFunction, meta?: FieldPolicy | FieldReadFunction }; +export type DeleteSourceMetaPayloadKeySpecifier = ('clientMutationId' | 'meta' | 'source' | DeleteSourceMetaPayloadKeySpecifier)[]; +export type DeleteSourceMetaPayloadFieldPolicy = { + clientMutationId?: FieldPolicy | FieldReadFunction, + meta?: FieldPolicy | FieldReadFunction, + source?: FieldPolicy | FieldReadFunction +}; export type DequeueChapterDownloadPayloadKeySpecifier = ('clientMutationId' | 'downloadStatus' | DequeueChapterDownloadPayloadKeySpecifier)[]; export type DequeueChapterDownloadPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, @@ -192,10 +198,6 @@ export type DequeueChapterDownloadsPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, downloadStatus?: FieldPolicy | FieldReadFunction }; -export type DownloadAheadPayloadKeySpecifier = ('clientMutationId' | DownloadAheadPayloadKeySpecifier)[]; -export type DownloadAheadPayloadFieldPolicy = { - clientMutationId?: FieldPolicy | FieldReadFunction -}; export type DownloadEdgeKeySpecifier = ('cursor' | 'node' | DownloadEdgeKeySpecifier)[]; export type DownloadEdgeFieldPolicy = { cursor?: FieldPolicy | FieldReadFunction, @@ -381,7 +383,7 @@ export type MangaNodeListFieldPolicy = { pageInfo?: FieldPolicy | FieldReadFunction, totalCount?: FieldPolicy | FieldReadFunction }; -export type MangaTypeKeySpecifier = ('age' | 'artist' | 'author' | 'categories' | 'chapters' | 'chaptersAge' | 'chaptersLastFetchedAt' | 'description' | 'downloadCount' | 'genre' | 'id' | 'inLibrary' | 'inLibraryAt' | 'initialized' | 'lastFetchedAt' | 'lastReadChapter' | 'latestFetchedChapter' | 'latestReadChapter' | 'latestUploadedChapter' | 'meta' | 'realUrl' | 'source' | 'sourceId' | 'status' | 'thumbnailUrl' | 'title' | 'trackRecords' | 'unreadCount' | 'updateStrategy' | 'url' | MangaTypeKeySpecifier)[]; +export type MangaTypeKeySpecifier = ('age' | 'artist' | 'author' | 'categories' | 'chapters' | 'chaptersAge' | 'chaptersLastFetchedAt' | 'description' | 'downloadCount' | 'genre' | 'id' | 'inLibrary' | 'inLibraryAt' | 'initialized' | 'lastFetchedAt' | 'lastReadChapter' | 'latestFetchedChapter' | 'latestReadChapter' | 'latestUploadedChapter' | 'meta' | 'realUrl' | 'source' | 'sourceId' | 'status' | 'thumbnailUrl' | 'thumbnailUrlLastFetched' | 'title' | 'trackRecords' | 'unreadCount' | 'updateStrategy' | 'url' | MangaTypeKeySpecifier)[]; export type MangaTypeFieldPolicy = { age?: FieldPolicy | FieldReadFunction, artist?: FieldPolicy | FieldReadFunction, @@ -408,6 +410,7 @@ export type MangaTypeFieldPolicy = { sourceId?: FieldPolicy | FieldReadFunction, status?: FieldPolicy | FieldReadFunction, thumbnailUrl?: FieldPolicy | FieldReadFunction, + thumbnailUrlLastFetched?: FieldPolicy | FieldReadFunction, title?: FieldPolicy | FieldReadFunction, trackRecords?: FieldPolicy | FieldReadFunction, unreadCount?: FieldPolicy | FieldReadFunction, @@ -437,7 +440,7 @@ export type MultiSelectListPreferenceFieldPolicy = { title?: FieldPolicy | FieldReadFunction, visible?: FieldPolicy | FieldReadFunction }; -export type MutationKeySpecifier = ('bindTrack' | 'clearCachedImages' | 'clearDownloader' | 'createBackup' | 'createCategory' | 'deleteCategory' | 'deleteCategoryMeta' | 'deleteChapterMeta' | 'deleteDownloadedChapter' | 'deleteDownloadedChapters' | 'deleteGlobalMeta' | 'deleteMangaMeta' | 'dequeueChapterDownload' | 'dequeueChapterDownloads' | 'downloadAhead' | 'enqueueChapterDownload' | 'enqueueChapterDownloads' | 'fetchChapterPages' | 'fetchChapters' | 'fetchExtensions' | 'fetchManga' | 'fetchSourceManga' | 'installExternalExtension' | 'loginTrackerCredentials' | 'loginTrackerOAuth' | 'logoutTracker' | 'reorderChapterDownload' | 'resetSettings' | 'resetWebUIUpdateStatus' | 'restoreBackup' | 'setCategoryMeta' | 'setChapterMeta' | 'setGlobalMeta' | 'setMangaMeta' | 'setSettings' | 'startDownloader' | 'stopDownloader' | 'updateCategories' | 'updateCategory' | 'updateCategoryManga' | 'updateCategoryOrder' | 'updateChapter' | 'updateChapters' | 'updateExtension' | 'updateExtensions' | 'updateLibraryManga' | 'updateManga' | 'updateMangaCategories' | 'updateMangas' | 'updateMangasCategories' | 'updateSourcePreference' | 'updateStop' | 'updateTrack' | 'updateWebUI' | MutationKeySpecifier)[]; +export type MutationKeySpecifier = ('bindTrack' | 'clearCachedImages' | 'clearDownloader' | 'createBackup' | 'createCategory' | 'deleteCategory' | 'deleteCategoryMeta' | 'deleteChapterMeta' | 'deleteDownloadedChapter' | 'deleteDownloadedChapters' | 'deleteGlobalMeta' | 'deleteMangaMeta' | 'deleteSourceMeta' | 'dequeueChapterDownload' | 'dequeueChapterDownloads' | 'enqueueChapterDownload' | 'enqueueChapterDownloads' | 'fetchChapterPages' | 'fetchChapters' | 'fetchExtensions' | 'fetchManga' | 'fetchSourceManga' | 'installExternalExtension' | 'loginTrackerCredentials' | 'loginTrackerOAuth' | 'logoutTracker' | 'reorderChapterDownload' | 'resetSettings' | 'resetWebUIUpdateStatus' | 'restoreBackup' | 'setCategoryMeta' | 'setChapterMeta' | 'setGlobalMeta' | 'setMangaMeta' | 'setSettings' | 'setSourceMeta' | 'startDownloader' | 'stopDownloader' | 'updateCategories' | 'updateCategory' | 'updateCategoryManga' | 'updateCategoryOrder' | 'updateChapter' | 'updateChapters' | 'updateExtension' | 'updateExtensions' | 'updateLibraryManga' | 'updateManga' | 'updateMangaCategories' | 'updateMangas' | 'updateMangasCategories' | 'updateSourcePreference' | 'updateStop' | 'updateTrack' | 'updateWebUI' | MutationKeySpecifier)[]; export type MutationFieldPolicy = { bindTrack?: FieldPolicy | FieldReadFunction, clearCachedImages?: FieldPolicy | FieldReadFunction, @@ -451,9 +454,9 @@ export type MutationFieldPolicy = { deleteDownloadedChapters?: FieldPolicy | FieldReadFunction, deleteGlobalMeta?: FieldPolicy | FieldReadFunction, deleteMangaMeta?: FieldPolicy | FieldReadFunction, + deleteSourceMeta?: FieldPolicy | FieldReadFunction, dequeueChapterDownload?: FieldPolicy | FieldReadFunction, dequeueChapterDownloads?: FieldPolicy | FieldReadFunction, - downloadAhead?: FieldPolicy | FieldReadFunction, enqueueChapterDownload?: FieldPolicy | FieldReadFunction, enqueueChapterDownloads?: FieldPolicy | FieldReadFunction, fetchChapterPages?: FieldPolicy | FieldReadFunction, @@ -474,6 +477,7 @@ export type MutationFieldPolicy = { setGlobalMeta?: FieldPolicy | FieldReadFunction, setMangaMeta?: FieldPolicy | FieldReadFunction, setSettings?: FieldPolicy | FieldReadFunction, + setSourceMeta?: FieldPolicy | FieldReadFunction, startDownloader?: FieldPolicy | FieldReadFunction, stopDownloader?: FieldPolicy | FieldReadFunction, updateCategories?: FieldPolicy | FieldReadFunction, @@ -508,10 +512,11 @@ export type PageInfoFieldPolicy = { hasPreviousPage?: FieldPolicy | FieldReadFunction, startCursor?: FieldPolicy | FieldReadFunction }; -export type PartialSettingsTypeKeySpecifier = ('autoDownloadAheadLimit' | 'autoDownloadNewChapters' | 'backupInterval' | 'backupPath' | 'backupTTL' | 'backupTime' | 'basicAuthEnabled' | 'basicAuthPassword' | 'basicAuthUsername' | 'debugLogsEnabled' | 'downloadAsCbz' | 'downloadsPath' | 'electronPath' | 'excludeCompleted' | 'excludeEntryWithUnreadChapters' | 'excludeNotStarted' | 'excludeUnreadChapters' | 'extensionRepos' | 'flareSolverrEnabled' | 'flareSolverrSessionName' | 'flareSolverrSessionTtl' | 'flareSolverrTimeout' | 'flareSolverrUrl' | 'globalUpdateInterval' | 'gqlDebugLogsEnabled' | 'initialOpenInBrowserEnabled' | 'ip' | 'localSourcePath' | 'maxSourcesInParallel' | 'port' | 'socksProxyEnabled' | 'socksProxyHost' | 'socksProxyPort' | 'systemTrayEnabled' | 'updateMangas' | 'webUIChannel' | 'webUIFlavor' | 'webUIInterface' | 'webUIUpdateCheckInterval' | PartialSettingsTypeKeySpecifier)[]; +export type PartialSettingsTypeKeySpecifier = ('autoDownloadAheadLimit' | 'autoDownloadNewChapters' | 'autoDownloadNewChaptersLimit' | 'backupInterval' | 'backupPath' | 'backupTTL' | 'backupTime' | 'basicAuthEnabled' | 'basicAuthPassword' | 'basicAuthUsername' | 'debugLogsEnabled' | 'downloadAsCbz' | 'downloadsPath' | 'electronPath' | 'excludeCompleted' | 'excludeEntryWithUnreadChapters' | 'excludeNotStarted' | 'excludeUnreadChapters' | 'extensionRepos' | 'flareSolverrEnabled' | 'flareSolverrSessionName' | 'flareSolverrSessionTtl' | 'flareSolverrTimeout' | 'flareSolverrUrl' | 'globalUpdateInterval' | 'gqlDebugLogsEnabled' | 'initialOpenInBrowserEnabled' | 'ip' | 'localSourcePath' | 'maxSourcesInParallel' | 'port' | 'socksProxyEnabled' | 'socksProxyHost' | 'socksProxyPort' | 'systemTrayEnabled' | 'updateMangas' | 'webUIChannel' | 'webUIFlavor' | 'webUIInterface' | 'webUIUpdateCheckInterval' | PartialSettingsTypeKeySpecifier)[]; export type PartialSettingsTypeFieldPolicy = { autoDownloadAheadLimit?: FieldPolicy | FieldReadFunction, autoDownloadNewChapters?: FieldPolicy | FieldReadFunction, + autoDownloadNewChaptersLimit?: FieldPolicy | FieldReadFunction, backupInterval?: FieldPolicy | FieldReadFunction, backupPath?: FieldPolicy | FieldReadFunction, backupTTL?: FieldPolicy | FieldReadFunction, @@ -636,10 +641,16 @@ export type SetSettingsPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, settings?: FieldPolicy | FieldReadFunction }; -export type SettingsKeySpecifier = ('autoDownloadAheadLimit' | 'autoDownloadNewChapters' | 'backupInterval' | 'backupPath' | 'backupTTL' | 'backupTime' | 'basicAuthEnabled' | 'basicAuthPassword' | 'basicAuthUsername' | 'debugLogsEnabled' | 'downloadAsCbz' | 'downloadsPath' | 'electronPath' | 'excludeCompleted' | 'excludeEntryWithUnreadChapters' | 'excludeNotStarted' | 'excludeUnreadChapters' | 'extensionRepos' | 'flareSolverrEnabled' | 'flareSolverrSessionName' | 'flareSolverrSessionTtl' | 'flareSolverrTimeout' | 'flareSolverrUrl' | 'globalUpdateInterval' | 'gqlDebugLogsEnabled' | 'initialOpenInBrowserEnabled' | 'ip' | 'localSourcePath' | 'maxSourcesInParallel' | 'port' | 'socksProxyEnabled' | 'socksProxyHost' | 'socksProxyPort' | 'systemTrayEnabled' | 'updateMangas' | 'webUIChannel' | 'webUIFlavor' | 'webUIInterface' | 'webUIUpdateCheckInterval' | SettingsKeySpecifier)[]; +export type SetSourceMetaPayloadKeySpecifier = ('clientMutationId' | 'meta' | SetSourceMetaPayloadKeySpecifier)[]; +export type SetSourceMetaPayloadFieldPolicy = { + clientMutationId?: FieldPolicy | FieldReadFunction, + meta?: FieldPolicy | FieldReadFunction +}; +export type SettingsKeySpecifier = ('autoDownloadAheadLimit' | 'autoDownloadNewChapters' | 'autoDownloadNewChaptersLimit' | 'backupInterval' | 'backupPath' | 'backupTTL' | 'backupTime' | 'basicAuthEnabled' | 'basicAuthPassword' | 'basicAuthUsername' | 'debugLogsEnabled' | 'downloadAsCbz' | 'downloadsPath' | 'electronPath' | 'excludeCompleted' | 'excludeEntryWithUnreadChapters' | 'excludeNotStarted' | 'excludeUnreadChapters' | 'extensionRepos' | 'flareSolverrEnabled' | 'flareSolverrSessionName' | 'flareSolverrSessionTtl' | 'flareSolverrTimeout' | 'flareSolverrUrl' | 'globalUpdateInterval' | 'gqlDebugLogsEnabled' | 'initialOpenInBrowserEnabled' | 'ip' | 'localSourcePath' | 'maxSourcesInParallel' | 'port' | 'socksProxyEnabled' | 'socksProxyHost' | 'socksProxyPort' | 'systemTrayEnabled' | 'updateMangas' | 'webUIChannel' | 'webUIFlavor' | 'webUIInterface' | 'webUIUpdateCheckInterval' | SettingsKeySpecifier)[]; export type SettingsFieldPolicy = { autoDownloadAheadLimit?: FieldPolicy | FieldReadFunction, autoDownloadNewChapters?: FieldPolicy | FieldReadFunction, + autoDownloadNewChaptersLimit?: FieldPolicy | FieldReadFunction, backupInterval?: FieldPolicy | FieldReadFunction, backupPath?: FieldPolicy | FieldReadFunction, backupTTL?: FieldPolicy | FieldReadFunction, @@ -678,10 +689,11 @@ export type SettingsFieldPolicy = { webUIInterface?: FieldPolicy | FieldReadFunction, webUIUpdateCheckInterval?: FieldPolicy | FieldReadFunction }; -export type SettingsTypeKeySpecifier = ('autoDownloadAheadLimit' | 'autoDownloadNewChapters' | 'backupInterval' | 'backupPath' | 'backupTTL' | 'backupTime' | 'basicAuthEnabled' | 'basicAuthPassword' | 'basicAuthUsername' | 'debugLogsEnabled' | 'downloadAsCbz' | 'downloadsPath' | 'electronPath' | 'excludeCompleted' | 'excludeEntryWithUnreadChapters' | 'excludeNotStarted' | 'excludeUnreadChapters' | 'extensionRepos' | 'flareSolverrEnabled' | 'flareSolverrSessionName' | 'flareSolverrSessionTtl' | 'flareSolverrTimeout' | 'flareSolverrUrl' | 'globalUpdateInterval' | 'gqlDebugLogsEnabled' | 'initialOpenInBrowserEnabled' | 'ip' | 'localSourcePath' | 'maxSourcesInParallel' | 'port' | 'socksProxyEnabled' | 'socksProxyHost' | 'socksProxyPort' | 'systemTrayEnabled' | 'updateMangas' | 'webUIChannel' | 'webUIFlavor' | 'webUIInterface' | 'webUIUpdateCheckInterval' | SettingsTypeKeySpecifier)[]; +export type SettingsTypeKeySpecifier = ('autoDownloadAheadLimit' | 'autoDownloadNewChapters' | 'autoDownloadNewChaptersLimit' | 'backupInterval' | 'backupPath' | 'backupTTL' | 'backupTime' | 'basicAuthEnabled' | 'basicAuthPassword' | 'basicAuthUsername' | 'debugLogsEnabled' | 'downloadAsCbz' | 'downloadsPath' | 'electronPath' | 'excludeCompleted' | 'excludeEntryWithUnreadChapters' | 'excludeNotStarted' | 'excludeUnreadChapters' | 'extensionRepos' | 'flareSolverrEnabled' | 'flareSolverrSessionName' | 'flareSolverrSessionTtl' | 'flareSolverrTimeout' | 'flareSolverrUrl' | 'globalUpdateInterval' | 'gqlDebugLogsEnabled' | 'initialOpenInBrowserEnabled' | 'ip' | 'localSourcePath' | 'maxSourcesInParallel' | 'port' | 'socksProxyEnabled' | 'socksProxyHost' | 'socksProxyPort' | 'systemTrayEnabled' | 'updateMangas' | 'webUIChannel' | 'webUIFlavor' | 'webUIInterface' | 'webUIUpdateCheckInterval' | SettingsTypeKeySpecifier)[]; export type SettingsTypeFieldPolicy = { autoDownloadAheadLimit?: FieldPolicy | FieldReadFunction, autoDownloadNewChapters?: FieldPolicy | FieldReadFunction, + autoDownloadNewChaptersLimit?: FieldPolicy | FieldReadFunction, backupInterval?: FieldPolicy | FieldReadFunction, backupPath?: FieldPolicy | FieldReadFunction, backupTTL?: FieldPolicy | FieldReadFunction, @@ -736,6 +748,13 @@ export type SourceEdgeFieldPolicy = { cursor?: FieldPolicy | FieldReadFunction, node?: FieldPolicy | FieldReadFunction }; +export type SourceMetaTypeKeySpecifier = ('key' | 'source' | 'sourceId' | 'value' | SourceMetaTypeKeySpecifier)[]; +export type SourceMetaTypeFieldPolicy = { + key?: FieldPolicy | FieldReadFunction, + source?: FieldPolicy | FieldReadFunction, + sourceId?: FieldPolicy | FieldReadFunction, + value?: FieldPolicy | FieldReadFunction +}; export type SourceNodeListKeySpecifier = ('edges' | 'nodes' | 'pageInfo' | 'totalCount' | SourceNodeListKeySpecifier)[]; export type SourceNodeListFieldPolicy = { edges?: FieldPolicy | FieldReadFunction, @@ -743,7 +762,7 @@ export type SourceNodeListFieldPolicy = { pageInfo?: FieldPolicy | FieldReadFunction, totalCount?: FieldPolicy | FieldReadFunction }; -export type SourceTypeKeySpecifier = ('displayName' | 'extension' | 'filters' | 'iconUrl' | 'id' | 'isConfigurable' | 'isNsfw' | 'lang' | 'manga' | 'name' | 'preferences' | 'supportsLatest' | SourceTypeKeySpecifier)[]; +export type SourceTypeKeySpecifier = ('displayName' | 'extension' | 'filters' | 'iconUrl' | 'id' | 'isConfigurable' | 'isNsfw' | 'lang' | 'manga' | 'meta' | 'name' | 'preferences' | 'supportsLatest' | SourceTypeKeySpecifier)[]; export type SourceTypeFieldPolicy = { displayName?: FieldPolicy | FieldReadFunction, extension?: FieldPolicy | FieldReadFunction, @@ -754,6 +773,7 @@ export type SourceTypeFieldPolicy = { isNsfw?: FieldPolicy | FieldReadFunction, lang?: FieldPolicy | FieldReadFunction, manga?: FieldPolicy | FieldReadFunction, + meta?: FieldPolicy | FieldReadFunction, name?: FieldPolicy | FieldReadFunction, preferences?: FieldPolicy | FieldReadFunction, supportsLatest?: FieldPolicy | FieldReadFunction @@ -1102,6 +1122,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | DeleteMangaMetaPayloadKeySpecifier | (() => undefined | DeleteMangaMetaPayloadKeySpecifier), fields?: DeleteMangaMetaPayloadFieldPolicy, }, + DeleteSourceMetaPayload?: Omit & { + keyFields?: false | DeleteSourceMetaPayloadKeySpecifier | (() => undefined | DeleteSourceMetaPayloadKeySpecifier), + fields?: DeleteSourceMetaPayloadFieldPolicy, + }, DequeueChapterDownloadPayload?: Omit & { keyFields?: false | DequeueChapterDownloadPayloadKeySpecifier | (() => undefined | DequeueChapterDownloadPayloadKeySpecifier), fields?: DequeueChapterDownloadPayloadFieldPolicy, @@ -1110,10 +1134,6 @@ export type StrictTypedTypePolicies = { keyFields?: false | DequeueChapterDownloadsPayloadKeySpecifier | (() => undefined | DequeueChapterDownloadsPayloadKeySpecifier), fields?: DequeueChapterDownloadsPayloadFieldPolicy, }, - DownloadAheadPayload?: Omit & { - keyFields?: false | DownloadAheadPayloadKeySpecifier | (() => undefined | DownloadAheadPayloadKeySpecifier), - fields?: DownloadAheadPayloadFieldPolicy, - }, DownloadEdge?: Omit & { keyFields?: false | DownloadEdgeKeySpecifier | (() => undefined | DownloadEdgeKeySpecifier), fields?: DownloadEdgeFieldPolicy, @@ -1310,6 +1330,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | SetSettingsPayloadKeySpecifier | (() => undefined | SetSettingsPayloadKeySpecifier), fields?: SetSettingsPayloadFieldPolicy, }, + SetSourceMetaPayload?: Omit & { + keyFields?: false | SetSourceMetaPayloadKeySpecifier | (() => undefined | SetSourceMetaPayloadKeySpecifier), + fields?: SetSourceMetaPayloadFieldPolicy, + }, Settings?: Omit & { keyFields?: false | SettingsKeySpecifier | (() => undefined | SettingsKeySpecifier), fields?: SettingsFieldPolicy, @@ -1330,6 +1354,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | SourceEdgeKeySpecifier | (() => undefined | SourceEdgeKeySpecifier), fields?: SourceEdgeFieldPolicy, }, + SourceMetaType?: Omit & { + keyFields?: false | SourceMetaTypeKeySpecifier | (() => undefined | SourceMetaTypeKeySpecifier), + fields?: SourceMetaTypeFieldPolicy, + }, SourceNodeList?: Omit & { keyFields?: false | SourceNodeListKeySpecifier | (() => undefined | SourceNodeListKeySpecifier), fields?: SourceNodeListFieldPolicy, diff --git a/src/lib/graphql/generated/graphql.ts b/src/lib/graphql/generated/graphql.ts index c8110a0d..1203202a 100644 --- a/src/lib/graphql/generated/graphql.ts +++ b/src/lib/graphql/generated/graphql.ts @@ -400,6 +400,19 @@ export type DeleteMangaMetaPayload = { meta?: Maybe; }; +export type DeleteSourceMetaInput = { + clientMutationId?: InputMaybe; + key: Scalars['String']['input']; + sourceId: Scalars['LongString']['input']; +}; + +export type DeleteSourceMetaPayload = { + __typename?: 'DeleteSourceMetaPayload'; + clientMutationId?: Maybe; + meta?: Maybe; + source?: Maybe; +}; + export type DequeueChapterDownloadInput = { clientMutationId?: InputMaybe; id: Scalars['Int']['input']; @@ -436,17 +449,6 @@ export type DoubleFilterInput = { notIn?: InputMaybe>; }; -export type DownloadAheadInput = { - clientMutationId?: InputMaybe; - latestReadChapterIds?: InputMaybe>; - mangaIds: Array; -}; - -export type DownloadAheadPayload = { - __typename?: 'DownloadAheadPayload'; - clientMutationId?: Maybe; -}; - export type DownloadEdge = Edge & { __typename?: 'DownloadEdge'; cursor: Scalars['Cursor']['output']; @@ -952,6 +954,7 @@ export type MangaType = { sourceId: Scalars['LongString']['output']; status: MangaStatus; thumbnailUrl?: Maybe; + thumbnailUrlLastFetched?: Maybe; title: Scalars['String']['output']; trackRecords: TrackRecordNodeList; unreadCount: Scalars['Int']['output']; @@ -1016,9 +1019,9 @@ export type Mutation = { deleteDownloadedChapters: DeleteDownloadedChaptersPayload; deleteGlobalMeta: DeleteGlobalMetaPayload; deleteMangaMeta: DeleteMangaMetaPayload; + deleteSourceMeta: DeleteSourceMetaPayload; dequeueChapterDownload: DequeueChapterDownloadPayload; dequeueChapterDownloads: DequeueChapterDownloadsPayload; - downloadAhead: DownloadAheadPayload; enqueueChapterDownload: EnqueueChapterDownloadPayload; enqueueChapterDownloads: EnqueueChapterDownloadsPayload; fetchChapterPages: FetchChapterPagesPayload; @@ -1039,6 +1042,7 @@ export type Mutation = { setGlobalMeta: SetGlobalMetaPayload; setMangaMeta: SetMangaMetaPayload; setSettings: SetSettingsPayload; + setSourceMeta: SetSourceMetaPayload; startDownloader: StartDownloaderPayload; stopDownloader: StopDownloaderPayload; updateCategories: UpdateCategoriesPayload; @@ -1121,6 +1125,11 @@ export type MutationDeleteMangaMetaArgs = { }; +export type MutationDeleteSourceMetaArgs = { + input: DeleteSourceMetaInput; +}; + + export type MutationDequeueChapterDownloadArgs = { input: DequeueChapterDownloadInput; }; @@ -1131,11 +1140,6 @@ export type MutationDequeueChapterDownloadsArgs = { }; -export type MutationDownloadAheadArgs = { - input: DownloadAheadInput; -}; - - export type MutationEnqueueChapterDownloadArgs = { input: EnqueueChapterDownloadInput; }; @@ -1231,6 +1235,11 @@ export type MutationSetSettingsArgs = { }; +export type MutationSetSourceMetaArgs = { + input: SetSourceMetaInput; +}; + + export type MutationStartDownloaderArgs = { input: StartDownloaderInput; }; @@ -1325,7 +1334,7 @@ export type MutationUpdateWebUiArgs = { input: WebUiUpdateInput; }; -export type Node = CategoryMetaType | CategoryType | ChapterMetaType | ChapterType | DownloadType | ExtensionType | GlobalMetaType | MangaMetaType | MangaType | PartialSettingsType | SettingsType | SourceType | TrackRecordType | TrackerType; +export type Node = CategoryMetaType | CategoryType | ChapterMetaType | ChapterType | DownloadType | ExtensionType | GlobalMetaType | MangaMetaType | MangaType | PartialSettingsType | SettingsType | SourceMetaType | SourceType | TrackRecordType | TrackerType; export type NodeList = { /** A list of edges which contains the [T] and cursor to aid in pagination. */ @@ -1352,8 +1361,10 @@ export type PageInfo = { export type PartialSettingsType = Settings & { __typename?: 'PartialSettingsType'; + /** @deprecated Replaced with autoDownloadNewChaptersLimit, replace with autoDownloadNewChaptersLimit */ autoDownloadAheadLimit?: Maybe; autoDownloadNewChapters?: Maybe; + autoDownloadNewChaptersLimit?: Maybe; backupInterval?: Maybe; backupPath?: Maybe; backupTTL?: Maybe; @@ -1394,8 +1405,8 @@ export type PartialSettingsType = Settings & { }; export type PartialSettingsTypeInput = { - autoDownloadAheadLimit?: InputMaybe; autoDownloadNewChapters?: InputMaybe; + autoDownloadNewChaptersLimit?: InputMaybe; backupInterval?: InputMaybe; backupPath?: InputMaybe; backupTTL?: InputMaybe; @@ -1738,9 +1749,22 @@ export type SetSettingsPayload = { settings: SettingsType; }; +export type SetSourceMetaInput = { + clientMutationId?: InputMaybe; + meta: SourceMetaTypeInput; +}; + +export type SetSourceMetaPayload = { + __typename?: 'SetSourceMetaPayload'; + clientMutationId?: Maybe; + meta: SourceMetaType; +}; + export type Settings = { + /** @deprecated Replaced with autoDownloadNewChaptersLimit, replace with autoDownloadNewChaptersLimit */ autoDownloadAheadLimit?: Maybe; autoDownloadNewChapters?: Maybe; + autoDownloadNewChaptersLimit?: Maybe; backupInterval?: Maybe; backupPath?: Maybe; backupTTL?: Maybe; @@ -1782,8 +1806,10 @@ export type Settings = { export type SettingsType = Settings & { __typename?: 'SettingsType'; + /** @deprecated Replaced with autoDownloadNewChaptersLimit, replace with autoDownloadNewChaptersLimit */ autoDownloadAheadLimit: Scalars['Int']['output']; autoDownloadNewChapters: Scalars['Boolean']['output']; + autoDownloadNewChaptersLimit: Scalars['Int']['output']; backupInterval: Scalars['Int']['output']; backupPath: Scalars['String']['output']; backupTTL: Scalars['Int']['output']; @@ -1873,6 +1899,20 @@ export type SourceFilterInput = { or?: InputMaybe>; }; +export type SourceMetaType = MetaType & { + __typename?: 'SourceMetaType'; + key: Scalars['String']['output']; + source: SourceType; + sourceId: Scalars['LongString']['output']; + value: Scalars['String']['output']; +}; + +export type SourceMetaTypeInput = { + key: Scalars['String']['input']; + sourceId: Scalars['LongString']['input']; + value: Scalars['String']['input']; +}; + export type SourceNodeList = NodeList & { __typename?: 'SourceNodeList'; edges: Array; @@ -1907,6 +1947,7 @@ export type SourceType = { isNsfw: Scalars['Boolean']['output']; lang: Scalars['String']['output']; manga: MangaNodeList; + meta: Array; name: Scalars['String']['output']; preferences: Array; supportsLatest: Scalars['Boolean']['output']; @@ -2426,6 +2467,7 @@ export enum WebUiChannel { export enum WebUiFlavor { Custom = 'CUSTOM', + Vui = 'VUI', Webui = 'WEBUI' } @@ -2697,13 +2739,6 @@ export type StopDownloaderMutationVariables = Exact<{ export type StopDownloaderMutation = { __typename?: 'Mutation', stopDownloader: { __typename?: 'StopDownloaderPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState } } }; -export type DownloadAheadMutationVariables = Exact<{ - input: DownloadAheadInput; -}>; - - -export type DownloadAheadMutation = { __typename?: 'Mutation', downloadAhead: { __typename?: 'DownloadAheadPayload', clientMutationId?: string | null } }; - export type GetExtensionsFetchMutationVariables = Exact<{ input?: InputMaybe; }>; diff --git a/src/lib/graphql/mutations/DownloaderMutation.ts b/src/lib/graphql/mutations/DownloaderMutation.ts index 125a81d6..0c4a8cf8 100644 --- a/src/lib/graphql/mutations/DownloaderMutation.ts +++ b/src/lib/graphql/mutations/DownloaderMutation.ts @@ -134,11 +134,3 @@ export const STOP_DOWNLOADER = gql` } } `; - -export const DOWNLOAD_AHEAD = gql` - mutation DOWNLOAD_AHEAD($input: DownloadAheadInput!) { - downloadAhead(input: $input) { - clientMutationId - } - } -`; diff --git a/src/lib/requests/RequestManager.ts b/src/lib/requests/RequestManager.ts index 35825a5f..f9b26074 100644 --- a/src/lib/requests/RequestManager.ts +++ b/src/lib/requests/RequestManager.ts @@ -55,8 +55,6 @@ import { DequeueChapterDownloadMutationVariables, DequeueChapterDownloadsMutation, DequeueChapterDownloadsMutationVariables, - DownloadAheadMutation, - DownloadAheadMutationVariables, DownloadStatusSubscription, DownloadStatusSubscriptionVariables, EnqueueChapterDownloadMutation, @@ -219,7 +217,6 @@ import { DELETE_DOWNLOADED_CHAPTERS, DEQUEUE_CHAPTER_DOWNLOAD, DEQUEUE_CHAPTER_DOWNLOADS, - DOWNLOAD_AHEAD, ENQUEUE_CHAPTER_DOWNLOAD, ENQUEUE_CHAPTER_DOWNLOADS, REORDER_CHAPTER_DOWNLOAD, @@ -2272,12 +2269,6 @@ export class RequestManager { return this.doRequest(GQLMethod.USE_MUTATION, UPDATE_SERVER_SETTINGS, undefined, options); } - public useDownloadAhead( - options?: MutationHookOptions, - ): AbortableApolloUseMutationResponse { - return this.doRequest(GQLMethod.USE_MUTATION, DOWNLOAD_AHEAD, undefined, options); - } - public useGetLastGlobalUpdateTimestamp( options?: QueryHookOptions, ): AbortableApolloUseQueryResponse { diff --git a/src/screens/settings/WebUISettings.tsx b/src/screens/settings/WebUISettings.tsx index 9c3e27e8..b6bd5a36 100644 --- a/src/screens/settings/WebUISettings.tsx +++ b/src/screens/settings/WebUISettings.tsx @@ -37,6 +37,12 @@ const FLAVOR_TO_TRANSLATION_KEY: { [flavor in WebUiFlavor]: SelectSettingValueDi [WebUiFlavor.Webui]: { text: 'settings.webui.title.webui', description: 'settings.webui.flavor.option.webui.label.description', + disclaimer: 'settings.webui.flavor.label.info', + }, + [WebUiFlavor.Vui]: { + text: 'settings.webui.flavor.option.vui.label.title', + description: 'settings.webui.flavor.option.vui.label.description', + disclaimer: 'settings.webui.flavor.label.info', }, [WebUiFlavor.Custom]: { text: 'settings.webui.flavor.option.custom.label.title', @@ -55,10 +61,12 @@ const CHANNEL_TO_TRANSLATION_KEYS: { [WebUiChannel.Bundled]: { text: 'settings.webui.channel.option.bundled.label.title', description: 'settings.webui.channel.option.bundled.label.description', + disclaimer: 'settings.webui.flavor.label.info', }, [WebUiChannel.Stable]: { text: 'settings.webui.channel.option.stable.label.title', description: 'settings.webui.channel.option.stable.label.description', + disclaimer: 'settings.webui.flavor.label.info', }, [WebUiChannel.Preview]: { text: 'settings.webui.channel.option.preview.label.title',