mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
refactor(backend): add darwin no-cgo tray fallback (#1689)
This commit is contained in:
+3
-6
@@ -22,8 +22,6 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"fyne.io/systray"
|
||||
|
||||
"github.com/sipeed/picoclaw/pkg/config"
|
||||
"github.com/sipeed/picoclaw/web/backend/api"
|
||||
"github.com/sipeed/picoclaw/web/backend/launcherconfig"
|
||||
@@ -168,10 +166,10 @@ func main() {
|
||||
}
|
||||
fmt.Println()
|
||||
|
||||
// Set server address for systray
|
||||
// Share the local URL with the launcher runtime.
|
||||
serverAddr = fmt.Sprintf("http://localhost:%s", effectivePort)
|
||||
|
||||
// Auto-open browser will be handled by systray onReady
|
||||
// Auto-open browser will be handled by the launcher runtime.
|
||||
|
||||
// Auto-start gateway after backend starts listening.
|
||||
go func() {
|
||||
@@ -188,6 +186,5 @@ func main() {
|
||||
}
|
||||
}()
|
||||
|
||||
// Start system tray
|
||||
systray.Run(onReady, onExit)
|
||||
runTray()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user