mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-05 15:37:21 +08:00
🚧 WIP: add support for URL uploading
This commit is contained in:
@@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user