mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Cosmetic changes
This commit is contained in:
@@ -2,13 +2,13 @@ package main
|
||||
|
||||
import (
|
||||
wails "github.com/wailsapp/wails/v2"
|
||||
"github.com/wailsapp/wails/v2/internal/runtime"
|
||||
)
|
||||
|
||||
type MyStruct struct {
|
||||
runtime *wails.Runtime
|
||||
}
|
||||
|
||||
// ShowPlatformHelp shows specific help for the platform
|
||||
func (l *MyStruct) ShowPlatformHelp() {
|
||||
l.runtime.Browser.Open("https://wails.app/gettingstarted/" + runtime.System.Platform())
|
||||
l.runtime.Browser.Open("https://wails.app/gettingstarted/" + l.runtime.System.Platform())
|
||||
}
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
package main
|
||||
|
||||
import wails "github.com/wailsapp/wails/v2"
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
wails "github.com/wailsapp/wails/v2"
|
||||
)
|
||||
|
||||
type MyStruct struct {
|
||||
runtime *wails.Runtime
|
||||
}
|
||||
|
||||
type Notes struct {
|
||||
lines []string
|
||||
}
|
||||
|
||||
func (m *MyStruct) WailsInit(runtime *wails.Runtime) error {
|
||||
|
||||
runtime.Events.On("notes updated", func(optionalData ...interface{}) {
|
||||
// Get notes
|
||||
notes := optionalData[0].(*Notes)
|
||||
// Save the notes to disk
|
||||
fmt.Printf("%+v\n", notes)
|
||||
})
|
||||
|
||||
m.runtime = runtime
|
||||
|
||||
Reference in New Issue
Block a user