update about settings dev version, keep profile switch in sync between ui and tray

This commit is contained in:
Eduard Gert
2026-05-18 10:56:27 +02:00
parent 4e0eb9f2d4
commit 7f7bee630f
5 changed files with 24 additions and 1 deletions

View File

@@ -209,6 +209,8 @@
"settings.troubleshooting.stage.cancelling": "Wird abgebrochen…",
"settings.about.client": "NetBird Client v{version}",
"settings.about.clientName": "NetBird Client",
"settings.about.development": "[Entwicklung]",
"settings.about.gui": "Oberfläche v{version}",
"settings.about.copyright": "© {year} NetBird. Alle Rechte vorbehalten.",
"settings.about.links.imprint": "Impressum",

View File

@@ -209,6 +209,8 @@
"settings.troubleshooting.stage.cancelling": "Cancelling…",
"settings.about.client": "NetBird Client v{version}",
"settings.about.clientName": "NetBird Client",
"settings.about.development": "[Development]",
"settings.about.gui": "GUI v{version}",
"settings.about.copyright": "© {year} NetBird. All Rights Reserved.",
"settings.about.links.imprint": "Imprint",

View File

@@ -209,6 +209,8 @@
"settings.troubleshooting.stage.cancelling": "Megszakítás…",
"settings.about.client": "NetBird Kliens v{version}",
"settings.about.clientName": "NetBird Kliens",
"settings.about.development": "[Fejlesztés]",
"settings.about.gui": "Felület v{version}",
"settings.about.copyright": "© {year} NetBird. Minden jog fenntartva.",
"settings.about.links.imprint": "Impresszum",

View File

@@ -37,7 +37,16 @@ export function SettingsAbout() {
className={"text-sm font-semibold text-nb-gray-100 cursor-default select-none"}
onClick={handleVersionClick}
>
{t("settings.about.client", { version: daemonVersion })}
{daemonVersion === "development" ? (
<span>
{t("settings.about.clientName")}{" "}
<span className={" text-yellow-400 font-mono"}>
{t("settings.about.development")}
</span>
</span>
) : (
t("settings.about.client", { version: daemonVersion })
)}
</p>
<p className={"text-sm text-nb-gray-300"}>
{t("settings.about.gui", { version: guiVersion })}

View File

@@ -136,6 +136,14 @@ func NewTray(app *application.App, window *application.WebviewWindow, svc TraySe
app.Event.On(services.EventStatus, t.onStatusEvent)
app.Event.On(services.EventSystem, t.onSystemEvent)
// Refresh the Profiles submenu when ProfileSwitcher fires the change.
// applyStatus already reloads on status-text transitions, but a
// switch on an idle daemon doesn't drive one — without this hook,
// a React-initiated switch leaves the tray's submenu and active-
// profile label stale.
app.Event.On(services.EventProfileChanged, func(*application.CustomEvent) {
go t.loadProfiles()
})
// Defer the first profile load until the macOS/GTK/Win32 menu impl is
// live — Menu.Update() short-circuits while app.running is false, and
// AppKit's main queue isn't ready earlier either (see d23ef34 InvokeSync