diff --git a/main.go b/main.go index 2f3fede..db92845 100644 --- a/main.go +++ b/main.go @@ -113,21 +113,6 @@ func main() { astilog.Fatal(errors.Wrap(err, "starting failed")) } - // Create Admin window - var wAdmin *astilectron.Window - if wAdmin, err = a.NewWindow("http://" + SiteConf.Interface + "/admin", &astilectron.WindowOptions{ - Center: astilectron.PtrBool(true), - Height: astilectron.PtrInt(700), - Width: astilectron.PtrInt(1200), - }); err != nil { - fmt.Println(err) - astilog.Fatal(errors.Wrap(err, "new window failed")) - } - if err = wAdmin.Create(); err != nil { - fmt.Println(err) - astilog.Fatal(errors.Wrap(err, "creating window failed")) - } - // Create Frontend window var wFrontend *astilectron.Window wFrontend, err = a.NewWindow("http://" + SiteConf.Interface, &astilectron.WindowOptions{ @@ -152,6 +137,21 @@ func main() { wFrontend.Maximize() } + // Create Admin window + var wAdmin *astilectron.Window + if wAdmin, err = a.NewWindow("http://" + SiteConf.Interface + "/admin", &astilectron.WindowOptions{ + Center: astilectron.PtrBool(true), + Height: astilectron.PtrInt(700), + Width: astilectron.PtrInt(1200), + }); err != nil { + fmt.Println(err) + astilog.Fatal(errors.Wrap(err, "new window failed")) + } + if err = wAdmin.Create(); err != nil { + fmt.Println(err) + astilog.Fatal(errors.Wrap(err, "creating window failed")) + } + // Blocking pattern a.Wait()