🚧 WIP: add support for URL uploading

This commit is contained in:
Molunerfinn
2020-02-21 22:25:48 +08:00
parent 024d9cf41e
commit 23ba2338c6
9 changed files with 104 additions and 39 deletions
+5 -2
View File
@@ -12,6 +12,9 @@ import {
getWindowId,
getSettingWindowId
} from '~/main/apis/bus'
import {
SHOW_INPUT_BOX
} from '~/universal/events/constants'
class GuiApi implements IGuiApi {
private windowId: number = -1
@@ -40,9 +43,9 @@ class GuiApi implements IGuiApi {
}) {
await this.showSettingWindow()
this.getWebcontentsByWindowId(this.settingWindowId)
.send('showInputBox', options)
.send(SHOW_INPUT_BOX, options)
return new Promise<string>((resolve, reject) => {
ipcMain.once('showInputBox', (event: Event, value: string) => {
ipcMain.once(SHOW_INPUT_BOX, (event: Event, value: string) => {
resolve(value)
})
})