From f7cd7e7f48b47287490c34a4fc19aadc4577df9b Mon Sep 17 00:00:00 2001 From: Snider Date: Sun, 15 Mar 2026 03:12:02 +0000 Subject: [PATCH] feat: add IDE window and tray menu items Open IDE (1280x800), API Swagger, separator, Quit. Main window hidden by default, opened via tray menu. Co-Authored-By: Virgil --- main.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/main.go b/main.go index 879180e..9b91244 100644 --- a/main.go +++ b/main.go @@ -234,8 +234,33 @@ func main() { }) systray.AttachWindow(trayWindow).WindowOffset(5) + // Main IDE window (hidden initially, opened via tray menu) + ideWindow := app.Window.NewWithOptions(application.WebviewWindowOptions{ + Name: "ide", + Title: "Core IDE", + Width: 1280, + Height: 800, + URL: "/", + Hidden: true, + BackgroundColour: application.NewRGB(26, 27, 38), + }) + // Tray menu trayMenu := app.Menu.New() + trayMenu.Add("Open IDE").OnClick(func(ctx *application.Context) { + ideWindow.Show() + ideWindow.Focus() + }) + trayMenu.Add("API Swagger").OnClick(func(ctx *application.Context) { + app.Window.NewWithOptions(application.WebviewWindowOptions{ + Name: "swagger", + Title: "Core IDE — API", + Width: 1024, + Height: 768, + URL: "http://localhost" + apiAddr + "/swagger/index.html", + }) + }) + trayMenu.AddSeparator() trayMenu.Add("Quit").OnClick(func(ctx *application.Context) { app.Quit() })