mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-02 19:18:13 -05:00
🐛 Fix: showFileExplorer result bug
This commit is contained in:
parent
5f1fb08368
commit
b6b2eeae6b
@ -69,7 +69,7 @@ class GuiApi implements IGuiApi {
|
|||||||
async showFileExplorer (options: IShowFileExplorerOption = {}) {
|
async showFileExplorer (options: IShowFileExplorerOption = {}) {
|
||||||
this.windowId = await getWindowId()
|
this.windowId = await getWindowId()
|
||||||
const res = await dialog.showOpenDialog(BrowserWindow.fromId(this.windowId)!, options)
|
const res = await dialog.showOpenDialog(BrowserWindow.fromId(this.windowId)!, options)
|
||||||
return res.filePaths?.[0]
|
return res.filePaths || []
|
||||||
}
|
}
|
||||||
|
|
||||||
async upload (input: IUploadOption) {
|
async upload (input: IUploadOption) {
|
||||||
|
2
src/universal/types/types.d.ts
vendored
2
src/universal/types/types.d.ts
vendored
@ -193,7 +193,7 @@ type IDispose = () => void
|
|||||||
// GuiApi
|
// GuiApi
|
||||||
interface IGuiApi {
|
interface IGuiApi {
|
||||||
showInputBox: (options: IShowInputBoxOption) => Promise<string>
|
showInputBox: (options: IShowInputBoxOption) => Promise<string>
|
||||||
showFileExplorer: (options: IShowFileExplorerOption) => Promise<string>
|
showFileExplorer: (options: IShowFileExplorerOption) => Promise<string[]>
|
||||||
upload: (input: IUploadOption) => Promise<ImgInfo[]>
|
upload: (input: IUploadOption) => Promise<ImgInfo[]>
|
||||||
showNotification: (options?: IShowNotificationOption) => void
|
showNotification: (options?: IShowNotificationOption) => void
|
||||||
showMessageBox: (options?: IShowMessageBoxOption) => Promise<IShowMessageBoxResult>
|
showMessageBox: (options?: IShowMessageBoxOption) => Promise<IShowMessageBoxResult>
|
||||||
|
Loading…
Reference in New Issue
Block a user