diff --git a/app/wails/frontend/wailsjs/go/dialog/Support.d.ts b/app/wails/frontend/wailsjs/go/dialog/Support.d.ts index e4b56b4..03801db 100644 --- a/app/wails/frontend/wailsjs/go/dialog/Support.d.ts +++ b/app/wails/frontend/wailsjs/go/dialog/Support.d.ts @@ -2,4 +2,12 @@ // This file is automatically generated. DO NOT EDIT import {frontend} from '../models'; +export function MessageDialog(arg1:frontend.MessageDialogOptions):Promise; + +export function OpenDirectoryDialog(arg1:frontend.OpenDialogOptions):Promise; + export function OpenFileDialog(arg1:frontend.OpenDialogOptions):Promise; + +export function OpenMultipleFilesDialog(arg1:frontend.OpenDialogOptions):Promise>; + +export function SaveFileDialog(arg1:frontend.SaveDialogOptions):Promise; diff --git a/app/wails/frontend/wailsjs/go/dialog/Support.js b/app/wails/frontend/wailsjs/go/dialog/Support.js index 5d897ca..1dfbab3 100644 --- a/app/wails/frontend/wailsjs/go/dialog/Support.js +++ b/app/wails/frontend/wailsjs/go/dialog/Support.js @@ -2,6 +2,22 @@ // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL // This file is automatically generated. DO NOT EDIT +export function MessageDialog(arg1) { + return window['go']['dialog']['Support']['MessageDialog'](arg1); +} + +export function OpenDirectoryDialog(arg1) { + return window['go']['dialog']['Support']['OpenDirectoryDialog'](arg1); +} + export function OpenFileDialog(arg1) { return window['go']['dialog']['Support']['OpenFileDialog'](arg1); } + +export function OpenMultipleFilesDialog(arg1) { + return window['go']['dialog']['Support']['OpenMultipleFilesDialog'](arg1); +} + +export function SaveFileDialog(arg1) { + return window['go']['dialog']['Support']['SaveFileDialog'](arg1); +} diff --git a/app/wails/main.go b/app/wails/main.go index 2177b15..29e8300 100644 --- a/app/wails/main.go +++ b/app/wails/main.go @@ -30,7 +30,8 @@ func main() { Width: 1024, Height: 768, AssetServer: &assetserver.Options{ - Assets: assets, + Assets: assets, + Handler: app.Handler, }, BackgroundColour: &options.RGBA{R: 255, G: 255, B: 255, A: 1}, OnStartup: app.Startup, diff --git a/app/wails/pkg/app/dialog/dialog.go b/app/wails/pkg/app/dialog/dialog.go index fe6a713..c7955c7 100644 --- a/app/wails/pkg/app/dialog/dialog.go +++ b/app/wails/pkg/app/dialog/dialog.go @@ -17,3 +17,23 @@ func (s *Support) OpenFileDialog(dialogOptions runtime.OpenDialogOptions) string path, _ := runtime.OpenFileDialog(s.app.Ctx(), dialogOptions) return path } + +func (s *Support) OpenMultipleFilesDialog(dialogOptions runtime.OpenDialogOptions) []string { + path, _ := runtime.OpenMultipleFilesDialog(s.app.Ctx(), dialogOptions) + return path +} + +func (s *Support) OpenDirectoryDialog(dialogOptions runtime.OpenDialogOptions) string { + path, _ := runtime.OpenDirectoryDialog(s.app.Ctx(), dialogOptions) + return path +} + +func (s *Support) SaveFileDialog(dialogOptions runtime.SaveDialogOptions) string { + path, _ := runtime.SaveFileDialog(s.app.Ctx(), dialogOptions) + return path +} + +func (s *Support) MessageDialog(dialogOptions runtime.MessageDialogOptions) string { + path, _ := runtime.MessageDialog(s.app.Ctx(), dialogOptions) + return path +}