Extract server settings gql fragments
This commit is contained in:
@@ -56,74 +56,3 @@ export const WEBUI_UPDATE_STATUS = gql`
|
|||||||
state
|
state
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const SERVER_SETTINGS = gql`
|
|
||||||
fragment SERVER_SETTINGS on SettingsType {
|
|
||||||
# Server ip and port bindings
|
|
||||||
ip
|
|
||||||
port
|
|
||||||
|
|
||||||
# Socks proxy
|
|
||||||
socksProxyEnabled
|
|
||||||
socksProxyVersion
|
|
||||||
socksProxyHost
|
|
||||||
socksProxyPort
|
|
||||||
socksProxyUsername
|
|
||||||
socksProxyPassword
|
|
||||||
|
|
||||||
# webUI
|
|
||||||
webUIFlavor
|
|
||||||
initialOpenInBrowserEnabled
|
|
||||||
webUIInterface
|
|
||||||
electronPath
|
|
||||||
webUIChannel
|
|
||||||
webUIUpdateCheckInterval
|
|
||||||
|
|
||||||
# downloader
|
|
||||||
downloadAsCbz
|
|
||||||
downloadsPath
|
|
||||||
autoDownloadNewChapters
|
|
||||||
excludeEntryWithUnreadChapters
|
|
||||||
autoDownloadNewChaptersLimit
|
|
||||||
autoDownloadIgnoreReUploads
|
|
||||||
|
|
||||||
# extensions
|
|
||||||
extensionRepos
|
|
||||||
|
|
||||||
# requests
|
|
||||||
maxSourcesInParallel
|
|
||||||
|
|
||||||
# updater
|
|
||||||
excludeUnreadChapters
|
|
||||||
excludeNotStarted
|
|
||||||
excludeCompleted
|
|
||||||
globalUpdateInterval
|
|
||||||
updateMangas
|
|
||||||
|
|
||||||
# Authentication
|
|
||||||
basicAuthEnabled
|
|
||||||
basicAuthUsername
|
|
||||||
basicAuthPassword
|
|
||||||
|
|
||||||
# misc
|
|
||||||
debugLogsEnabled
|
|
||||||
gqlDebugLogsEnabled
|
|
||||||
systemTrayEnabled
|
|
||||||
|
|
||||||
# backup
|
|
||||||
backupPath
|
|
||||||
backupTime
|
|
||||||
backupInterval
|
|
||||||
backupTTL
|
|
||||||
|
|
||||||
# local source
|
|
||||||
localSourcePath
|
|
||||||
|
|
||||||
# Cloudflare bypass
|
|
||||||
flareSolverrEnabled
|
|
||||||
flareSolverrUrl
|
|
||||||
flareSolverrTimeout
|
|
||||||
flareSolverrSessionName
|
|
||||||
flareSolverrSessionTtl
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|||||||
80
src/lib/graphql/fragments/SettingsFragments.ts
Normal file
80
src/lib/graphql/fragments/SettingsFragments.ts
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) Contributors to the Suwayomi project
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import gql from 'graphql-tag';
|
||||||
|
|
||||||
|
export const SERVER_SETTINGS = gql`
|
||||||
|
fragment SERVER_SETTINGS on SettingsType {
|
||||||
|
# Server ip and port bindings
|
||||||
|
ip
|
||||||
|
port
|
||||||
|
|
||||||
|
# Socks proxy
|
||||||
|
socksProxyEnabled
|
||||||
|
socksProxyVersion
|
||||||
|
socksProxyHost
|
||||||
|
socksProxyPort
|
||||||
|
socksProxyUsername
|
||||||
|
socksProxyPassword
|
||||||
|
|
||||||
|
# webUI
|
||||||
|
webUIFlavor
|
||||||
|
initialOpenInBrowserEnabled
|
||||||
|
webUIInterface
|
||||||
|
electronPath
|
||||||
|
webUIChannel
|
||||||
|
webUIUpdateCheckInterval
|
||||||
|
|
||||||
|
# downloader
|
||||||
|
downloadAsCbz
|
||||||
|
downloadsPath
|
||||||
|
autoDownloadNewChapters
|
||||||
|
excludeEntryWithUnreadChapters
|
||||||
|
autoDownloadNewChaptersLimit
|
||||||
|
autoDownloadIgnoreReUploads
|
||||||
|
|
||||||
|
# extensions
|
||||||
|
extensionRepos
|
||||||
|
|
||||||
|
# requests
|
||||||
|
maxSourcesInParallel
|
||||||
|
|
||||||
|
# updater
|
||||||
|
excludeUnreadChapters
|
||||||
|
excludeNotStarted
|
||||||
|
excludeCompleted
|
||||||
|
globalUpdateInterval
|
||||||
|
updateMangas
|
||||||
|
|
||||||
|
# Authentication
|
||||||
|
basicAuthEnabled
|
||||||
|
basicAuthUsername
|
||||||
|
basicAuthPassword
|
||||||
|
|
||||||
|
# misc
|
||||||
|
debugLogsEnabled
|
||||||
|
gqlDebugLogsEnabled
|
||||||
|
systemTrayEnabled
|
||||||
|
|
||||||
|
# backup
|
||||||
|
backupPath
|
||||||
|
backupTime
|
||||||
|
backupInterval
|
||||||
|
backupTTL
|
||||||
|
|
||||||
|
# local source
|
||||||
|
localSourcePath
|
||||||
|
|
||||||
|
# Cloudflare bypass
|
||||||
|
flareSolverrEnabled
|
||||||
|
flareSolverrUrl
|
||||||
|
flareSolverrTimeout
|
||||||
|
flareSolverrSessionName
|
||||||
|
flareSolverrSessionTtl
|
||||||
|
}
|
||||||
|
`;
|
||||||
@@ -2596,8 +2596,6 @@ export type WebuiUpdateInfoFragment = { __typename?: 'WebUIUpdateInfo', channel:
|
|||||||
|
|
||||||
export type WebuiUpdateStatusFragment = { __typename?: 'WebUIUpdateStatus', progress: number, state: UpdateState, info: { __typename?: 'WebUIUpdateInfo', channel: string, tag: string } };
|
export type WebuiUpdateStatusFragment = { __typename?: 'WebUIUpdateStatus', progress: number, state: UpdateState, info: { __typename?: 'WebUIUpdateInfo', channel: string, tag: string } };
|
||||||
|
|
||||||
export type ServerSettingsFragment = { __typename?: 'SettingsType', ip: string, port: number, socksProxyEnabled: boolean, socksProxyVersion: number, socksProxyHost: string, socksProxyPort: string, socksProxyUsername: string, socksProxyPassword: string, webUIFlavor: WebUiFlavor, initialOpenInBrowserEnabled: boolean, webUIInterface: WebUiInterface, electronPath: string, webUIChannel: WebUiChannel, webUIUpdateCheckInterval: number, downloadAsCbz: boolean, downloadsPath: string, autoDownloadNewChapters: boolean, excludeEntryWithUnreadChapters: boolean, autoDownloadNewChaptersLimit: number, autoDownloadIgnoreReUploads?: boolean | null, extensionRepos: Array<string>, maxSourcesInParallel: number, excludeUnreadChapters: boolean, excludeNotStarted: boolean, excludeCompleted: boolean, globalUpdateInterval: number, updateMangas: boolean, basicAuthEnabled: boolean, basicAuthUsername: string, basicAuthPassword: string, debugLogsEnabled: boolean, gqlDebugLogsEnabled: boolean, systemTrayEnabled: boolean, backupPath: string, backupTime: string, backupInterval: number, backupTTL: number, localSourcePath: string, flareSolverrEnabled: boolean, flareSolverrUrl: string, flareSolverrTimeout: number, flareSolverrSessionName: string, flareSolverrSessionTtl: number };
|
|
||||||
|
|
||||||
export type CategoryBaseFieldsFragment = { __typename?: 'CategoryType', id: number, name: string, default: boolean, order: number };
|
export type CategoryBaseFieldsFragment = { __typename?: 'CategoryType', id: number, name: string, default: boolean, order: number };
|
||||||
|
|
||||||
export type CategoryLibraryFieldsFragment = { __typename?: 'CategoryType', id: number, name: string, default: boolean, order: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } };
|
export type CategoryLibraryFieldsFragment = { __typename?: 'CategoryType', id: number, name: string, default: boolean, order: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } };
|
||||||
@@ -2630,6 +2628,8 @@ export type MangaScreenFieldsFragment = { __typename?: 'MangaType', artist?: str
|
|||||||
|
|
||||||
export type MangaLibraryDuplicateScreenFieldsFragment = { __typename?: 'MangaType', description?: string | null, id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string, unreadCount: number, downloadCount: number, bookmarkCount: number, chapters: { __typename?: 'ChapterNodeList', totalCount: number } };
|
export type MangaLibraryDuplicateScreenFieldsFragment = { __typename?: 'MangaType', description?: string | null, id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string, unreadCount: number, downloadCount: number, bookmarkCount: number, chapters: { __typename?: 'ChapterNodeList', totalCount: number } };
|
||||||
|
|
||||||
|
export type ServerSettingsFragment = { __typename?: 'SettingsType', ip: string, port: number, socksProxyEnabled: boolean, socksProxyVersion: number, socksProxyHost: string, socksProxyPort: string, socksProxyUsername: string, socksProxyPassword: string, webUIFlavor: WebUiFlavor, initialOpenInBrowserEnabled: boolean, webUIInterface: WebUiInterface, electronPath: string, webUIChannel: WebUiChannel, webUIUpdateCheckInterval: number, downloadAsCbz: boolean, downloadsPath: string, autoDownloadNewChapters: boolean, excludeEntryWithUnreadChapters: boolean, autoDownloadNewChaptersLimit: number, autoDownloadIgnoreReUploads?: boolean | null, extensionRepos: Array<string>, maxSourcesInParallel: number, excludeUnreadChapters: boolean, excludeNotStarted: boolean, excludeCompleted: boolean, globalUpdateInterval: number, updateMangas: boolean, basicAuthEnabled: boolean, basicAuthUsername: string, basicAuthPassword: string, debugLogsEnabled: boolean, gqlDebugLogsEnabled: boolean, systemTrayEnabled: boolean, backupPath: string, backupTime: string, backupInterval: number, backupTTL: number, localSourcePath: string, flareSolverrEnabled: boolean, flareSolverrUrl: string, flareSolverrTimeout: number, flareSolverrSessionName: string, flareSolverrSessionTtl: number };
|
||||||
|
|
||||||
export type SourceBaseFieldsFragment = { __typename?: 'SourceType', id: string, name: string, displayName: string };
|
export type SourceBaseFieldsFragment = { __typename?: 'SourceType', id: string, name: string, displayName: string };
|
||||||
|
|
||||||
export type SourceMigratableFieldsFragment = { __typename?: 'SourceType', lang: string, iconUrl: string, id: string, name: string, displayName: string };
|
export type SourceMigratableFieldsFragment = { __typename?: 'SourceType', lang: string, iconUrl: string, id: string, name: string, displayName: string };
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import gql from 'graphql-tag';
|
import gql from 'graphql-tag';
|
||||||
import { SERVER_SETTINGS } from '@/lib/graphql/Fragments';
|
import { SERVER_SETTINGS } from '@/lib/graphql/fragments/SettingsFragments.ts';
|
||||||
|
|
||||||
export const RESET_SERVER_SETTINGS = gql`
|
export const RESET_SERVER_SETTINGS = gql`
|
||||||
${SERVER_SETTINGS}
|
${SERVER_SETTINGS}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import gql from 'graphql-tag';
|
import gql from 'graphql-tag';
|
||||||
import { SERVER_SETTINGS } from '@/lib/graphql/Fragments';
|
import { SERVER_SETTINGS } from '@/lib/graphql/fragments/SettingsFragments.ts';
|
||||||
|
|
||||||
export const GET_SERVER_SETTINGS = gql`
|
export const GET_SERVER_SETTINGS = gql`
|
||||||
${SERVER_SETTINGS}
|
${SERVER_SETTINGS}
|
||||||
|
|||||||
Reference in New Issue
Block a user