mirror of
https://github.com/misitebao/wails-template-vue
synced 2025-02-23 21:12:14 +08:00
feat: update &options.App
This commit is contained in:
parent
4903a4019d
commit
5230c7f065
28
main.tmpl.go
28
main.tmpl.go
@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/wailsapp/wails/v2"
|
"github.com/wailsapp/wails/v2"
|
||||||
"github.com/wailsapp/wails/v2/pkg/logger"
|
"github.com/wailsapp/wails/v2/pkg/logger"
|
||||||
"github.com/wailsapp/wails/v2/pkg/options"
|
"github.com/wailsapp/wails/v2/pkg/options"
|
||||||
|
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
|
||||||
"github.com/wailsapp/wails/v2/pkg/options/linux"
|
"github.com/wailsapp/wails/v2/pkg/options/linux"
|
||||||
"github.com/wailsapp/wails/v2/pkg/options/mac"
|
"github.com/wailsapp/wails/v2/pkg/options/mac"
|
||||||
"github.com/wailsapp/wails/v2/pkg/options/windows"
|
"github.com/wailsapp/wails/v2/pkg/options/windows"
|
||||||
@ -39,7 +40,6 @@ func main() {
|
|||||||
StartHidden: false,
|
StartHidden: false,
|
||||||
HideWindowOnClose: false,
|
HideWindowOnClose: false,
|
||||||
BackgroundColour: &options.RGBA{R: 255, G: 255, B: 255, A: 0},
|
BackgroundColour: &options.RGBA{R: 255, G: 255, B: 255, A: 0},
|
||||||
Assets: assets,
|
|
||||||
Menu: nil,
|
Menu: nil,
|
||||||
Logger: nil,
|
Logger: nil,
|
||||||
LogLevel: logger.DEBUG,
|
LogLevel: logger.DEBUG,
|
||||||
@ -48,6 +48,11 @@ func main() {
|
|||||||
OnBeforeClose: app.beforeClose,
|
OnBeforeClose: app.beforeClose,
|
||||||
OnShutdown: app.shutdown,
|
OnShutdown: app.shutdown,
|
||||||
WindowStartState: options.Normal,
|
WindowStartState: options.Normal,
|
||||||
|
AssetServer: &assetserver.Options{
|
||||||
|
Assets: assets,
|
||||||
|
Handler: nil,
|
||||||
|
Middleware: nil,
|
||||||
|
},
|
||||||
Bind: []interface{}{
|
Bind: []interface{}{
|
||||||
app,
|
app,
|
||||||
},
|
},
|
||||||
@ -61,27 +66,6 @@ func main() {
|
|||||||
WebviewUserDataPath: "",
|
WebviewUserDataPath: "",
|
||||||
WebviewBrowserPath: "",
|
WebviewBrowserPath: "",
|
||||||
Theme: windows.SystemDefault,
|
Theme: windows.SystemDefault,
|
||||||
CustomTheme: &windows.ThemeSettings{
|
|
||||||
DarkModeTitleBar: windows.RGB(20, 20, 20),
|
|
||||||
DarkModeTitleText: windows.RGB(200, 200, 200),
|
|
||||||
DarkModeBorder: windows.RGB(20, 0, 20),
|
|
||||||
LightModeTitleBar: windows.RGB(200, 200, 200),
|
|
||||||
LightModeTitleText: windows.RGB(20, 20, 20),
|
|
||||||
LightModeBorder: windows.RGB(200, 200, 200),
|
|
||||||
},
|
|
||||||
// User messages that can be customised
|
|
||||||
// Messages: &windows.Messages{
|
|
||||||
// InstallationRequired: "",
|
|
||||||
// UpdateRequired: "",
|
|
||||||
// MissingRequirements: "",
|
|
||||||
// Webview2NotInstalled: "",
|
|
||||||
// Error: "",
|
|
||||||
// FailedToInstall: "",
|
|
||||||
// DownloadPage: "",
|
|
||||||
// PressOKToInstall: "",
|
|
||||||
// ContactAdmin: "",
|
|
||||||
// InvalidFixedWebview2: "",
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
// Mac platform specific options
|
// Mac platform specific options
|
||||||
// Mac平台特定选项
|
// Mac平台特定选项
|
||||||
|
Loading…
Reference in New Issue
Block a user