Fetch the repository succeeded.
package main
import (
"chat_project/backend"
"embed"
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/logger"
"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/mac"
"github.com/wailsapp/wails/v2/pkg/options/windows"
)
//go:embed all:frontend/dist
var assets embed.FS
func main() {
// Create an instance of the app structure
app := backend.NewApp()
// Create application with options
err := wails.Run(&options.App{
Title: "HongDouChat",
Width: 1280,
Height: 1000,
MinWidth: 1024,
MinHeight: 768,
MaxWidth: 2560,
MaxHeight: 1440,
AssetServer: &assetserver.Options{
Assets: assets,
},
BackgroundColour: &options.RGBA{R: 255, G: 0, B: 0, A: 128},
OnStartup: app.Startup,
OnShutdown: app.Shutdown,
OnDomReady: app.DomReady,
LogLevel: logger.DEBUG,
LogLevelProduction: logger.ERROR,
WindowStartState: options.Normal,
Bind: []interface{}{
app,
},
Windows: &windows.Options{
// WebviewIsTransparent: true,
// WindowIsTranslucent: false,
// DisableWindowIcon: false,
// DisableFramelessWindowDecorations: false,
// WebviewUserDataPath: "",
// WebviewBrowserPath: "",
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),
},
},
// Mac platform specific options
Mac: &mac.Options{
TitleBar: &mac.TitleBar{
TitlebarAppearsTransparent: false,
HideTitle: true,
HideTitleBar: false,
FullSizeContent: false,
UseToolbar: false,
HideToolbarSeparator: true,
},
Appearance: mac.DefaultAppearance,
WebviewIsTransparent: true,
WindowIsTranslucent: true,
About: &mac.AboutInfo{
Title: "dedao gui downloader",
Message: "https://github.com/yann0917/dedao-gui",
//Icon: icon,
},
},
Linux: &linux.Options{
//Icon: icon,
},
})
if err != nil {
println("Error:", err.Error())
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。