mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-05 07:28:42 +08:00
🐛 Fix: showFileExplorer result bug
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Vendored
+1
-1
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user