feat: add IDE window and tray menu items
Some checks failed
Security Scan / security (push) Successful in 12s
Test / test (push) Failing after 3m5s

Open IDE (1280x800), API Swagger, separator, Quit.
Main window hidden by default, opened via tray menu.

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-03-15 03:12:02 +00:00
parent 1ef9ac8c8d
commit f7cd7e7f48

25
main.go
View file

@ -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()
})