Feature: add tencent-cos options for url

ISSUES CLOSED: #862, #863, #865, #524, #845, #732
This commit is contained in:
PiEgg
2022-04-04 19:22:30 +08:00
parent f1c8507927
commit af291e4f11
13 changed files with 68 additions and 27 deletions

View File

@@ -41,7 +41,7 @@ export const uploadClipboardFiles = async (): Promise<string> => {
trayWindow?.webContents?.send('clipboardFiles', [])
trayWindow?.webContents?.send('uploadFiles', img)
if (windowManager.has(IWindowList.SETTING_WINDOW)) {
windowManager.get(IWindowList.SETTING_WINDOW)!.webContents.send('updateGallery')
windowManager.get(IWindowList.SETTING_WINDOW)!.webContents?.send('updateGallery')
}
return handleUrlEncode(img[0].imgUrl as string)
} else {
@@ -81,7 +81,7 @@ export const uploadChoosedFiles = async (webContents: WebContents, files: IFileW
// trayWindow just be created in mac/windows, not in linux
windowManager.get(IWindowList.TRAY_WINDOW)?.webContents?.send('uploadFiles', imgs)
if (windowManager.has(IWindowList.SETTING_WINDOW)) {
windowManager.get(IWindowList.SETTING_WINDOW)!.webContents.send('updateGallery')
windowManager.get(IWindowList.SETTING_WINDOW)!.webContents?.send('updateGallery')
}
return result
} else {