From 8962a46e85d8a12d572c2db6a20cf6bf84a4078d Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Wed, 31 Jul 2024 11:21:55 +0800 Subject: [PATCH] :sparkles: Feature(custom): support secondary picbed upload ISSUES CLOSED: #226 --- public/i18n/en.yml | 3 + public/i18n/zh-CN.yml | 3 + public/i18n/zh-TW.yml | 3 + src/main/apis/app/system/index.ts | 3 +- src/main/apis/app/uploader/apis.ts | 65 +++++++++++ src/main/apis/gui/index.ts | 2 + src/main/events/remotes/menu.ts | 57 +++++++++- src/main/events/rpc/index.ts | 8 -- src/main/events/rpc/routes/system/window.ts | 18 ++- src/main/utils/handleUploaderConfig.ts | 19 ++++ src/renderer/pages/PicGoSetting.vue | 22 +++- src/universal/types/enum.ts | 1 + src/universal/types/i18n.d.ts | 3 + src/universal/types/view.d.ts | 117 ++++++++++---------- src/universal/utils/configPaths.ts | 6 +- 15 files changed, 257 insertions(+), 73 deletions(-) diff --git a/public/i18n/en.yml b/public/i18n/en.yml index 38f9735..888250a 100644 --- a/public/i18n/en.yml +++ b/public/i18n/en.yml @@ -25,6 +25,7 @@ NO_MORE_NOTICE: No More Notice SHOW_DEVTOOLS: Show Devtools FEEDBACK: Feedback CURRENT_PICBED: Current Picbed +CURRENT_SECOND_PICBED: Current Second Picbed START_WATCH_CLIPBOARD: Start Watch Clipboard STOP_WATCH_CLIPBOARD: Stop Watch Clipboard OPEN_TOOLBOX: Open Toolbox @@ -183,6 +184,8 @@ SETTINGS_TIMESTAMP_RENAME: Timestamp Rename SETTINGS_ADVANCED_RENAME: Advanced Rename SETTINGS_ADVANCED_RENAME_ENABLE: Enable Advanced Rename SETTINGS_ADVANCED_RENAME_FORMAT: Advanced Rename Format +SETTINGS_ENABLE_SECOND_PICBED: Enable Second Picbed +SETTINGS_SET_SECOND_PICBED: Set Second Picbed SETTINGS_OPEN_UPLOAD_TIPS: Open Upload Tips SETTINGS_OPEN_UPLOAD_RESULT_TIPS: Open Upload Result Tips SETTINGS_MINI_WINDOW_ON_TOP: Mini Window On Top diff --git a/public/i18n/zh-CN.yml b/public/i18n/zh-CN.yml index e27cb18..e60931a 100644 --- a/public/i18n/zh-CN.yml +++ b/public/i18n/zh-CN.yml @@ -25,6 +25,7 @@ NO_MORE_NOTICE: 以后不再提醒 SHOW_DEVTOOLS: 打开开发者工具 FEEDBACK: 反馈问题 CURRENT_PICBED: 当前图床 +CURRENT_SECOND_PICBED: 当前第二图床 START_WATCH_CLIPBOARD: 开始监听剪贴板 STOP_WATCH_CLIPBOARD: 停止监听剪贴板 OPEN_TOOLBOX: 打开修复工具箱 @@ -185,6 +186,8 @@ SETTINGS_TIMESTAMP_RENAME: 时间戳重命名 SETTINGS_ADVANCED_RENAME: 高级重命名 SETTINGS_ADVANCED_RENAME_ENABLE: 开启高级重命名 SETTINGS_ADVANCED_RENAME_FORMAT: 重命名格式 +SETTINGS_ENABLE_SECOND_PICBED: 启用第二图床同步上传 +SETTINGS_SET_SECOND_PICBED: 设置第二图床 SETTINGS_OPEN_UPLOAD_TIPS: 开启上传进度提示 SETTINGS_OPEN_UPLOAD_RESULT_TIPS: 开启上传结果提示 SETTINGS_MINI_WINDOW_ON_TOP: Mini窗口置顶 diff --git a/public/i18n/zh-TW.yml b/public/i18n/zh-TW.yml index a58d687..1c88f00 100644 --- a/public/i18n/zh-TW.yml +++ b/public/i18n/zh-TW.yml @@ -25,6 +25,7 @@ NO_MORE_NOTICE: 以後不再提醒 SHOW_DEVTOOLS: 開啟開發者工具 FEEDBACK: 問題反饋 CURRENT_PICBED: 當前圖床 +CURRENT_SECOND_PICBED: 當前第二圖床 START_WATCH_CLIPBOARD: 開始監聽剪貼簿 STOP_WATCH_CLIPBOARD: 停止監聽剪貼簿 OPEN_TOOLBOX: 開啟修復工具箱 @@ -183,6 +184,8 @@ SETTINGS_TIMESTAMP_RENAME: 以時間戳命名 SETTINGS_ADVANCED_RENAME: 高級命名 SETTINGS_ADVANCED_RENAME_ENABLE: 啟用高級命名 SETTINGS_ADVANCED_RENAME_FORMAT: 高級命名格式 +SETTINGS_ENABLE_SECOND_PICBED: 啟用第二圖床同步上傳 +SETTINGS_SET_SECOND_PICBED: 設定第二圖床 SETTINGS_OPEN_UPLOAD_TIPS: 開啟上傳提示 SETTINGS_OPEN_UPLOAD_RESULT_TIPS: 開啟上傳結果提示 SETTINGS_MINI_WINDOW_ON_TOP: Mini視窗置頂 diff --git a/src/main/apis/app/system/index.ts b/src/main/apis/app/system/index.ts index 5454f71..bc3b2a3 100644 --- a/src/main/apis/app/system/index.ts +++ b/src/main/apis/app/system/index.ts @@ -16,7 +16,7 @@ import db, { GalleryDB } from '@core/datastore' import picgo from '@core/picgo' import uploader from 'apis/app/uploader' -import { uploadClipboardFiles } from 'apis/app/uploader/apis' +import { handleSecondaryUpload, uploadClipboardFiles } from 'apis/app/uploader/apis' import windowManager from 'apis/app/window/windowManager' import { buildPicBedListMenu } from '~/events/remotes/menu' @@ -309,6 +309,7 @@ export function createTray(tooltip: string) { const pasteStyle = db.get(configPaths.settings.pasteStyle) || IPasteStyle.MARKDOWN const rawInput = cloneDeep(files) const trayWindow = windowManager.get(IWindowList.TRAY_WINDOW)! + await handleSecondaryUpload(trayWindow.webContents, files, 'tray') const imgs = await uploader.setWebContents(trayWindow.webContents).upload(files) const deleteLocalFile = db.get(configPaths.settings.deleteLocalFile) || false if (imgs !== false) { diff --git a/src/main/apis/app/uploader/apis.ts b/src/main/apis/app/uploader/apis.ts index a8a4ac8..59b5764 100644 --- a/src/main/apis/app/uploader/apis.ts +++ b/src/main/apis/app/uploader/apis.ts @@ -14,6 +14,7 @@ import pasteTemplate from '~/utils/pasteTemplate' import { IPasteStyle, IWindowList } from '#/types/enum' import { configPaths } from '#/utils/configPaths' +import { changeCurrentUploader } from '~/utils/handleUploaderConfig' const handleClipboardUploading = async (): Promise => { const useBuiltinClipboard = @@ -28,6 +29,7 @@ const handleClipboardUploading = async (): Promise => { } export const uploadClipboardFiles = async (): Promise => { + await handleSecondaryUpload(undefined, undefined, 'clipboard') const img = await handleClipboardUploading() if (img !== false) { if (img.length > 0) { @@ -84,6 +86,7 @@ export const uploadChoosedFiles = async ( ): Promise => { const input = files.map(item => item.path) const rawInput = cloneDeep(input) + await handleSecondaryUpload(webContents, input) const imgs = await uploader.setWebContents(webContents).upload(input) const result = [] if (imgs !== false) { @@ -132,3 +135,65 @@ export const uploadChoosedFiles = async ( return [] } } + +export const handleSecondaryUpload = async ( + webContents?: WebContents, + input?: string[], + uploadType: 'clipboard' | 'file' | 'tray' = 'file' +): Promise => { + const enableSecondUploader = db.get(configPaths.settings.enableSecondUploader) || false + let currentPicBedType = '' + let currentPicBedConfig = {} as IStringKeyMap + let currentPicBedConfigId = '' + let needRestore = false + if (enableSecondUploader) { + const secondUploader = db.get(configPaths.picBed.secondUploader) + const secondUploaderConfig = db.get(configPaths.picBed.secondUploaderConfig) + const secondUploaderId = db.get(configPaths.picBed.secondUploaderId) + const currentPicBed = db.get('picBed') || ({} as IStringKeyMap) + currentPicBedType = currentPicBed.uploader || currentPicBed.current || 'smms' + currentPicBedConfig = currentPicBed[currentPicBedType] || ({} as IStringKeyMap) + currentPicBedConfigId = currentPicBedConfig._id + if ( + secondUploader === currentPicBedType && + secondUploaderConfig._configName === currentPicBedConfig._configName && + secondUploaderId === currentPicBedConfigId + ) { + picgo.log.info('second uploader is the same as current uploader') + } else { + needRestore = true + let secondImgs: ImgInfo[] | false = false + changeCurrentUploader(secondUploader, secondUploaderConfig, secondUploaderId) + if (uploadType === 'clipboard') { + secondImgs = await handleClipboardUploading() + } else { + secondImgs = await uploader.setWebContents(webContents!).upload(input) + } + if (secondImgs !== false) { + const trayWindow = windowManager.get(IWindowList.TRAY_WINDOW) + if (uploadType === 'clipboard') { + if (secondImgs.length > 0) { + await GalleryDB.getInstance().insert(secondImgs[0]) + trayWindow?.webContents?.send('clipboardFiles', []) + trayWindow?.webContents?.send('uploadFiles', secondImgs) + } + } else { + for (let i = 0; i < secondImgs.length; i++) { + await GalleryDB.getInstance().insert(secondImgs[i]) + } + if (uploadType === 'tray') { + trayWindow?.webContents?.send('dragFiles', secondImgs) + } else { + trayWindow?.webContents?.send('uploadFiles', secondImgs) + } + } + if (windowManager.has(IWindowList.SETTING_WINDOW) && uploadType !== 'tray') { + windowManager.get(IWindowList.SETTING_WINDOW)!.webContents?.send('updateGallery') + } + } + } + } + if (needRestore) { + changeCurrentUploader(currentPicBedType, currentPicBedConfig, currentPicBedConfigId) + } +} diff --git a/src/main/apis/gui/index.ts b/src/main/apis/gui/index.ts index 50991c1..25930bb 100644 --- a/src/main/apis/gui/index.ts +++ b/src/main/apis/gui/index.ts @@ -17,6 +17,7 @@ import pasteTemplate from '~/utils/pasteTemplate' import { SHOW_INPUT_BOX } from '#/events/constants' import { IPasteStyle } from '#/types/enum' import { configPaths } from '#/utils/configPaths' +import { handleSecondaryUpload } from '../app/uploader/apis' // Cross-process support may be required in the future class GuiApi implements IGuiApi { @@ -78,6 +79,7 @@ class GuiApi implements IGuiApi { this.windowId = await getWindowId() const webContents = this.getWebcontentsByWindowId(this.windowId) const rawInput = cloneDeep(input) + await handleSecondaryUpload(webContents!, input) const imgs = await uploader.setWebContents(webContents!).upload(input) if (imgs !== false) { const pasteStyle = db.get(configPaths.settings.pasteStyle) || IPasteStyle.MARKDOWN diff --git a/src/main/events/remotes/menu.ts b/src/main/events/remotes/menu.ts index a2558c8..c268c31 100644 --- a/src/main/events/remotes/menu.ts +++ b/src/main/events/remotes/menu.ts @@ -13,7 +13,7 @@ import { T } from '~/i18n' import clipboardPoll from '~/utils/clipboardPoll' import { setTrayToolTip } from '~/utils/common' import getPicBeds from '~/utils/getPicBeds' -import { changeCurrentUploader } from '~/utils/handleUploaderConfig' +import { changeCurrentUploader, changeSecondUploader } from '~/utils/handleUploaderConfig' import { PICGO_CONFIG_PLUGIN, @@ -139,6 +139,59 @@ const buildMainPageMenu = (win: BrowserWindow) => { return Menu.buildFromTemplate(template) } +const buildSecondPicBedMenu = () => { + const picBeds = getPicBeds() + const secondUploader = picgo.getConfig(configPaths.picBed.secondUploader) + const defaultSecondUploaderId = picgo.getConfig(configPaths.picBed.secondUploaderId) + const currentPicBedName = picBeds.find(item => item.type === secondUploader)?.name + const picBedConfigList = picgo.getConfig('uploader') + const currentPicBedMenuItem = [ + { + label: `${T('CURRENT_SECOND_PICBED')} - ${currentPicBedName || 'None'}`, + enabled: false + }, + { + type: 'separator' + } + ] + let submenu = picBeds + .filter(item => item.visible) + .map(item => { + const configList = picBedConfigList?.[item.type]?.configList + const hasSubmenu = !!configList + return { + label: item.name, + type: !hasSubmenu ? 'checkbox' : undefined, + checked: !hasSubmenu ? secondUploader === item.type : undefined, + submenu: hasSubmenu + ? configList.map(config => { + return { + label: config._configName || 'Default', + // if only one config, use checkbox, or radio will checked as default + // see: https://github.com/electron/electron/issues/21292 + type: 'checkbox', + checked: config._id === defaultSecondUploaderId && item.type === secondUploader, + click: function () { + changeSecondUploader(item.type, config, config._id) + } + } + }) + : undefined, + click: !hasSubmenu + ? function () { + picgo.saveConfig({ + [configPaths.picBed.secondUploader]: item.type + }) + } + : undefined + } + }) + // @ts-expect-error submenu type + submenu = currentPicBedMenuItem.concat(submenu) + // @ts-expect-error submenu type + return Menu.buildFromTemplate(submenu) +} + const buildPicBedListMenu = () => { const picBeds = getPicBeds() const currentPicBed = picgo.getConfig(configPaths.picBed.uploader) @@ -339,4 +392,4 @@ const buildPluginPageMenu = (plugin: IPicGoPlugin) => { return Menu.buildFromTemplate(menu) } -export { buildMiniPageMenu, buildMainPageMenu, buildPicBedListMenu, buildPluginPageMenu } +export { buildMiniPageMenu, buildMainPageMenu, buildPicBedListMenu, buildPluginPageMenu, buildSecondPicBedMenu } diff --git a/src/main/events/rpc/index.ts b/src/main/events/rpc/index.ts index 12bc314..abae4bb 100644 --- a/src/main/events/rpc/index.ts +++ b/src/main/events/rpc/index.ts @@ -15,17 +15,12 @@ import { manageRouter } from '~/events/rpc/routes/manage' import { IRPCActionType, IRPCType } from '#/types/enum' import { RPC_ACTIONS, RPC_ACTIONS_INVOKE } from '#/events/constants' -const isDevelopment = process.env.NODE_ENV !== 'production' - class RPCServer implements IRPCServer { private routes: IRPCRoutes = new Map() private routesWithResponse: IRPCRoutes = new Map() private rpcEventHandler = async (event: IpcMainEvent, action: IRPCActionType, args: any[]) => { try { - if (isDevelopment) { - console.log(`action: ${action} args: ${JSON.stringify(args)}`) - } const route = this.routes.get(action) await route?.handler?.(event, args) } catch (e: any) { @@ -35,9 +30,6 @@ class RPCServer implements IRPCServer { private rpcEventHandlerWithResponse = async (event: IpcMainInvokeEvent, action: IRPCActionType, args: any[]) => { try { - if (isDevelopment) { - console.log(`action: ${action} args: ${JSON.stringify(args)}`) - } const route = this.routesWithResponse.get(action) return await route?.handler?.(event, args) } catch (e: any) { diff --git a/src/main/events/rpc/routes/system/window.ts b/src/main/events/rpc/routes/system/window.ts index fe5f88a..dd9cd3c 100644 --- a/src/main/events/rpc/routes/system/window.ts +++ b/src/main/events/rpc/routes/system/window.ts @@ -2,7 +2,13 @@ import { app, BrowserWindow } from 'electron' import windowManager from 'apis/app/window/windowManager' -import { buildMainPageMenu, buildMiniPageMenu, buildPicBedListMenu, buildPluginPageMenu } from '~/events/remotes/menu' +import { + buildMainPageMenu, + buildMiniPageMenu, + buildPicBedListMenu, + buildPluginPageMenu, + buildSecondPicBedMenu +} from '~/events/remotes/menu' import { openMiniWindow } from '~/utils/windowHelper' import { IRPCActionType, IWindowList } from '#/types/enum' @@ -83,6 +89,16 @@ export default [ }) } }, + { + action: IRPCActionType.SHOW_SECOND_UPLOADER_MENU, + handler: async () => { + const window = windowManager.get(IWindowList.SETTING_WINDOW)! + const menu = buildSecondPicBedMenu() + menu.popup({ + window + }) + } + }, { action: IRPCActionType.SHOW_PLUGIN_PAGE_MENU, handler: async (_: IIPCEvent, args: [plugin: IPicGoPlugin]) => { diff --git a/src/main/utils/handleUploaderConfig.ts b/src/main/utils/handleUploaderConfig.ts index 07ad164..e9f919f 100644 --- a/src/main/utils/handleUploaderConfig.ts +++ b/src/main/utils/handleUploaderConfig.ts @@ -56,6 +56,25 @@ export const getPicBedConfig = (type: string) => { } } +export const changeSecondUploader = (type: string, config?: IStringKeyMap, id?: string) => { + if (!type) { + return + } + if (id) { + picgo.saveConfig({ + [configPaths.picBed.secondUploaderId]: id + }) + } + if (config) { + picgo.saveConfig({ + [configPaths.picBed.secondUploaderConfig]: config + }) + } + picgo.saveConfig({ + [configPaths.picBed.secondUploader]: type + }) +} + export const changeCurrentUploader = (type: string, config?: IStringKeyMap, id?: string) => { if (!type) { return diff --git a/src/renderer/pages/PicGoSetting.vue b/src/renderer/pages/PicGoSetting.vue index c79daab..eece303 100644 --- a/src/renderer/pages/PicGoSetting.vue +++ b/src/renderer/pages/PicGoSetting.vue @@ -215,6 +215,18 @@ + + + + + + {{ $T('SETTINGS_CLICK_TO_SET') }} + + ({ registry: '', proxy: '', mainWindowWidth: 1200, - mainWindowHeight: 800 + mainWindowHeight: 800, + enableSecondUploader: false }) const proxy = ref('') @@ -1080,7 +1093,8 @@ const autoWatchKeys = [ 'proxy', 'autoCopy', 'encodeOutputURL', - 'useShortUrl' + 'useShortUrl', + 'enableSecondUploader' ] const addWatch = () => { @@ -1259,6 +1273,10 @@ function initArray(arrayT: string | string[], defaultValue: string[]) { return arrayT } +async function handleChangeSecondPicBed() { + sendRPC(IRPCActionType.SHOW_SECOND_UPLOADER_MENU) +} + function openFile(file: string) { sendRPC(IRPCActionType.PICLIST_OPEN_FILE, file) } diff --git a/src/universal/types/enum.ts b/src/universal/types/enum.ts index ba5e51a..d72c20a 100644 --- a/src/universal/types/enum.ts +++ b/src/universal/types/enum.ts @@ -96,6 +96,7 @@ export enum IRPCActionType { SHOW_MINI_PAGE_MENU = 'SHOW_MINI_PAGE_MENU', SHOW_MAIN_PAGE_MENU = 'SHOW_MAIN_PAGE_MENU', SHOW_UPLOAD_PAGE_MENU = 'SHOW_UPLOAD_PAGE_MENU', + SHOW_SECOND_UPLOADER_MENU = 'SHOW_SECOND_UPLOADER_MENU', SHOW_PLUGIN_PAGE_MENU = 'SHOW_PLUGIN_PAGE_MENU', SET_MINI_WINDOW_POS = 'SET_MINI_WINDOW_POS', MINI_WINDOW_ON_TOP = 'MINI_WINDOW_ON_TOP', diff --git a/src/universal/types/i18n.d.ts b/src/universal/types/i18n.d.ts index 506a714..a47561d 100644 --- a/src/universal/types/i18n.d.ts +++ b/src/universal/types/i18n.d.ts @@ -26,6 +26,7 @@ interface ILocales { SHOW_DEVTOOLS: string FEEDBACK: string CURRENT_PICBED: string + CURRENT_SECOND_PICBED: string START_WATCH_CLIPBOARD: string STOP_WATCH_CLIPBOARD: string OPEN_TOOLBOX: string @@ -178,6 +179,8 @@ interface ILocales { SETTINGS_ADVANCED_RENAME: string SETTINGS_ADVANCED_RENAME_ENABLE: string SETTINGS_ADVANCED_RENAME_FORMAT: string + SETTINGS_ENABLE_SECOND_PICBED: string + SETTINGS_SET_SECOND_PICBED: string SETTINGS_OPEN_UPLOAD_TIPS: string SETTINGS_OPEN_UPLOAD_RESULT_TIPS: string SETTINGS_MINI_WINDOW_ON_TOP: string diff --git a/src/universal/types/view.d.ts b/src/universal/types/view.d.ts index 5a09793..5ef4d13 100644 --- a/src/universal/types/view.d.ts +++ b/src/universal/types/view.d.ts @@ -1,58 +1,59 @@ -interface ISettingForm { - showUpdateTip: boolean - autoStart: boolean - rename: boolean - autoRename: boolean - uploadNotification: boolean - uploadResultNotification: boolean - miniWindowOntop: boolean - autoCloseMiniWindow: boolean - autoCloseMainWindow: boolean - logLevel: string[] - autoCopy: boolean - useBuiltinClipboard: boolean - logFileSizeLimit: number - deleteCloudFile: boolean - isCustomMiniIcon: boolean - customMiniIcon: string - isHideDock: boolean - autoImport: boolean - autoImportPicBed: string[] - encodeOutputURL: boolean - isAutoListenClipboard: boolean - useShortUrl: boolean - shortUrlServer: string - c1nToken: string - yourlsDomain: string - yourlsSignature: string - cfWorkerHost: string - deleteLocalFile: boolean - serverKey: string - aesPassword: string - enableWebServer: boolean - webServerHost: string - webServerPort: number - webServerPath: string - registry: string - proxy: string - mainWindowWidth: number - mainWindowHeight: number -} - -interface IShortKeyMap { - [propName: string]: string -} - -interface IToolboxItem { - title: string - status: import('#/types/enum').IToolboxItemCheckStatus - msg?: string - value?: any // for handler - hasNoFixMethod?: boolean - handler?: (value: any) => Promise | void - handlerText?: string -} - -type IToolboxMap = { - [id in import('#/types/enum').IToolboxItemType]: IToolboxItem -} +interface ISettingForm { + showUpdateTip: boolean + autoStart: boolean + rename: boolean + autoRename: boolean + uploadNotification: boolean + uploadResultNotification: boolean + miniWindowOntop: boolean + autoCloseMiniWindow: boolean + autoCloseMainWindow: boolean + logLevel: string[] + autoCopy: boolean + useBuiltinClipboard: boolean + logFileSizeLimit: number + deleteCloudFile: boolean + isCustomMiniIcon: boolean + customMiniIcon: string + isHideDock: boolean + autoImport: boolean + autoImportPicBed: string[] + encodeOutputURL: boolean + isAutoListenClipboard: boolean + useShortUrl: boolean + shortUrlServer: string + c1nToken: string + yourlsDomain: string + yourlsSignature: string + cfWorkerHost: string + deleteLocalFile: boolean + serverKey: string + aesPassword: string + enableWebServer: boolean + webServerHost: string + webServerPort: number + webServerPath: string + registry: string + proxy: string + mainWindowWidth: number + mainWindowHeight: number + enableSecondUploader: boolean +} + +interface IShortKeyMap { + [propName: string]: string +} + +interface IToolboxItem { + title: string + status: import('#/types/enum').IToolboxItemCheckStatus + msg?: string + value?: any // for handler + hasNoFixMethod?: boolean + handler?: (value: any) => Promise | void + handlerText?: string +} + +type IToolboxMap = { + [id in import('#/types/enum').IToolboxItemType]: IToolboxItem +} diff --git a/src/universal/utils/configPaths.ts b/src/universal/utils/configPaths.ts index 7283016..64cbb9d 100644 --- a/src/universal/utils/configPaths.ts +++ b/src/universal/utils/configPaths.ts @@ -107,6 +107,9 @@ export const configPaths = { picBed: { current: 'picBed.current', uploader: 'picBed.uploader', + secondUploader: 'picBed.secondUploader', + secondUploaderId: 'picBed.secondUploaderId', + secondUploaderConfig: 'picBed.secondUploaderConfig', proxy: 'picBed.proxy', transformer: 'picBed.transformer', list: 'picBed.list' @@ -165,7 +168,8 @@ export const configPaths = { useBuiltinClipboard: 'settings.useBuiltinClipboard', autoStart: 'settings.autoStart', autoImport: 'settings.autoImport', - autoImportPicBed: 'settings.autoImportPicBed' + autoImportPicBed: 'settings.autoImportPicBed', + enableSecondUploader: 'settings.enableSecondUploader' }, needReload: 'needReload', picgoPlugins: 'picgoPlugins',