diff --git a/v3/pkg/application/application.go b/v3/pkg/application/application.go index 0b7d9ee12..9f9b6e83b 100644 --- a/v3/pkg/application/application.go +++ b/v3/pkg/application/application.go @@ -1,7 +1,9 @@ package application import ( + "embed" "encoding/json" + "io" "log" "log/slog" "net/http" @@ -23,8 +25,16 @@ import ( "github.com/wailsapp/wails/v3/pkg/events" ) +//go:embed assets/* +var alphaAssets embed.FS + var globalApplication *App +// AlphaAssets is the default assets for the alpha application +var AlphaAssets = AssetOptions{ + FS: alphaAssets, +} + func init() { runtime.LockOSThread() } @@ -47,8 +57,12 @@ func New(appOptions Options) *App { result := newApplication(appOptions) globalApplication = result - if result.isDebugMode && result.Logger == nil { - result.Logger = DefaultLogger(result.options.LogLevel) + if result.Logger == nil { + if result.isDebugMode { + result.Logger = DefaultLogger(result.options.LogLevel) + } else { + result.Logger = slog.New(slog.NewTextHandler(io.Discard, nil)) + } } result.logStartup() diff --git a/v3/pkg/application/assets/alpha/index.html b/v3/pkg/application/assets/alpha/index.html new file mode 100644 index 000000000..c9dbea1f5 --- /dev/null +++ b/v3/pkg/application/assets/alpha/index.html @@ -0,0 +1,79 @@ + + +
+ +