Added plugin reload
This commit is contained in:
parent
ac437b7409
commit
18604ec5a6
5 changed files with 247 additions and 36 deletions
7
main.go
7
main.go
|
|
@ -37,9 +37,14 @@ func main() {
|
|||
appMenu.Append(menu.AppMenu()) // On macOS platform, this must be done right after `NewMenu()`
|
||||
}
|
||||
fileMenu := appMenu.AddSubmenu("File")
|
||||
fileMenu.AddText("Reload Plugins", keys.Combo("r", keys.CmdOrCtrlKey, keys.ShiftKey), func(_ *menu.CallbackData) {
|
||||
app.ReloadPlugins()
|
||||
})
|
||||
fileMenu.AddSeparator()
|
||||
fileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) {
|
||||
// `rt` is an alias of "github.com/wailsapp/wails/v2/pkg/runtime" to prevent collision with standard package
|
||||
rt.Quit(app.ctx)
|
||||
_, _, ctx := app.current()
|
||||
rt.Quit(ctx)
|
||||
})
|
||||
|
||||
if runtime.GOOS == "darwin" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue