Improve probo-agent tray icon and enrollment menu

Replace the placeholder orange-circle tray icon with the monochrome
Probo logo used in auditor-mode. On macOS, show the icon only (no
menu bar title); keep the title on Windows.

Restructure the context menu: status rows with colored indicators,
an Enroll via… submenu for region selection, and a clearer About
label. Surface enrollment errors in native dialogs instead of stderr.

Fix self-hosted enrollment on macOS by reading the hostname from
osascript's returned value; the default dialog output order broke
URL parsing and silently skipped opening the browser.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-07-15 19:10:44 +02:00
parent ae769f52a1
commit 4a56be2e3e
13 changed files with 108 additions and 12 deletions

View File

@@ -24,7 +24,6 @@ package tray
import (
"fmt"
"os"
"go.probo.inc/probo/pkg/deviceagent"
)
@@ -32,12 +31,12 @@ import (
func openConsoleEnroll(serverURL string) {
enrollURL, err := deviceagent.ConsoleEnrollURL(serverURL)
if err != nil {
fmt.Fprintf(os.Stderr, "cannot open enrollment page: %v\n", err)
showEnrollmentError(fmt.Sprintf("Cannot open enrollment page: %v", err))
return
}
if err := openBrowser(enrollURL); err != nil {
fmt.Fprintf(os.Stderr, "cannot open browser: %v\n", err)
showEnrollmentError(fmt.Sprintf("Cannot open browser: %v", err))
}
}
@@ -49,7 +48,7 @@ func openSelfHostedEnroll() {
normalized, err := deviceagent.NormalizeServerURL(hostname)
if err != nil {
fmt.Fprintf(os.Stderr, "invalid hostname: %v\n", err)
showEnrollmentError(fmt.Sprintf("Invalid hostname: %v", err))
return
}