Commit Graph

1353 Commits

Author SHA1 Message Date
Eduard Gert
ecee7df5d8 Merge remote-tracking branch 'origin/ui-refactor' into ui-refactor 2026-05-26 11:27:17 +02:00
Eduard Gert
1d783c33d9 adjust left offset in ip and fqdn 2026-05-26 11:26:51 +02:00
Eduard Gert
b14feef1d7 add copy to clipboard 2026-05-26 11:23:08 +02:00
Zoltán Papp
0935a5675d tray: move session-expiry row under profile email, hide separator when daemon unavailable
- Relocate the session-expiry row from below the status item to below the
  profile email so active profile, email, and session deadline form one block.
- Rename the label to "Expires in {remaining}" (en/hu/de).
- Capture the Connect/Disconnect separator via lastMenuItem and hide it when
  both action rows are hidden (daemon unavailable), avoiding two adjacent
  separators with nothing between them.
2026-05-26 10:59:36 +02:00
Eduard Gert
4818599a93 sort peers 2026-05-26 09:50:18 +02:00
Eduard Gert
f8c107b087 update peers filter, fix duplicate url open in dev 2026-05-26 09:35:03 +02:00
Eduard Gert
d624c2db74 fix i18n label 2026-05-22 16:36:07 +02:00
Eduard Gert
513ecd456c remove mock peers 2026-05-22 16:28:24 +02:00
Eduard Gert
8f957ff41a fix scroll in settings 2026-05-22 16:09:55 +02:00
Eduard Gert
598fcbd817 remove unused lang icons, disable text selection 2026-05-22 15:59:27 +02:00
Eduard Gert
17a365926d update auto update wordings, add update available into ui 2026-05-22 13:04:04 +02:00
Eduard Gert
577ce6deb5 fix connect flow in tray 2026-05-22 10:16:13 +02:00
Eduard Gert
580cfa0dc5 add default and advanced resize 2026-05-22 09:53:08 +02:00
Zoltán Papp
8d4f35352f skip About-row brand mark on macOS
NSMenuItem.setImage stretches the row to the leading image's pixel
size regardless of the surrounding rows, so any non-empty bitmap on
the About entry made it visibly taller than the rest of the tray
menu — leaving 16, 18 or 22 px versions all looking wrong next to
the unadorned rows above and below.

Drop the macOS brand mark and gate the SetBitmap call on a non-empty
byte slice; iconMenuNetbird is now nil on macOS, so the About row
falls back to text only. Windows and Linux still ship the brand mark
through their per-platform embed files.
2026-05-21 17:01:08 +02:00
Zoltán Papp
85029898a5 per-platform tray menu icons and Windows-specific status row
The Windows menu renderer paints leading bitmaps into the Win32
check-mark slot (SetMenuItemBitmaps), which differs from how Cocoa
and GTK handle NSMenuItem.image / menu-row icons:

  - SM_CXMENUCHECK sizing: Windows expects ~16x16 at 100% DPI in the
    check-mark slot and visually overflows the row for anything bigger.
  - Disabled-state mask: Windows desaturates both the row text and the
    bitmap when MFS_DISABLED is set, so a disabled informational row
    renders the coloured status dot in greyscale.

Per the platform icon guidelines:

  Platform | Size           | Notes
  ---------|----------------|-----------------------------------------
  Windows  | 16x16          | check-mark slot, status row stays enabled
  macOS    | 22x22 (18-22)  | NSMenuItem leading image, HIG
  Linux    | 24x24 (22-48)  | GTK4 menu-row icon channel

Changes:

  * Split the menu-row icon embeds into icons_menu_{windows,darwin,linux}.go
    so each platform pulls its own size; the brand mark is rendered from
    assets/svg/netbird-menu.svg (new vector source) at 16/22/24 px with
    Inkscape, and the Windows status dots ship as 8x8 content centred on
    a 16x16 transparent canvas (the renderer upscales the bitmap, so the
    padding keeps the dot visually proportional to the row text).

  * Introduce statusRowEnabled() in tray_status_enabled_{windows,other}.go:
    true on Windows so the disabled-state mask does not strip the dot's
    colour; false on macOS/Linux where disabled menu rows fade the label
    without desaturating the leading bitmap, signalling that the row is
    informational.

  * Add an icon to the About submenu using the same brand mark.
2026-05-21 16:41:52 +02:00
Zoltán Papp
c3aeb5be15 force dark window theme on Windows 2026-05-21 14:59:00 +02:00
Eduard Gert
df61f22d96 add error msg to profile context and auto update 2026-05-21 09:49:32 +02:00
Eduard Gert
32df29bbd4 Merge remote-tracking branch 'origin/ui-refactor' into ui-refactor
# Conflicts:
#	client/ui/frontend/src/screens/Update.tsx
2026-05-21 09:34:45 +02:00
Zoltán Papp
0a458ead8b port xembed tray popup menu from gtk3 to gtk4 2026-05-20 19:53:24 +02:00
Zoltan Papp
aab8274b1a clear connect-action latch when external disconnect cancels Connecting
The main-window toggle stayed visually stuck on "Connecting" when the
user clicked Connect in the UI and then clicked Disconnect in the
tray (or the daemon was otherwise cancelled mid-Connecting).

Repro: open the main window, click the toggle to Connect, then while
the daemon is still in Connecting click Disconnect in the tray menu.
The tray and daemon agree the session is Idle, but the React toggle
keeps painting "Connecting" until the next manual interaction.

Root cause is in ConnectionStatusSwitch.tsx. The component holds an
`action` latch ("connect" | "logging-in" | "disconnect" | null) so the
toggle can show an optimistic transitional state while the daemon
catches up. The connState memo treats `action === "connect"` plus any
non-Connected daemon state as Connecting:

    if ((action === "connect" || action === "logging-in") &&
        daemonState !== "Connected") {
        return ConnectionState.Connecting;
    }

The effect that releases the latch only cleared it on `Connected` or
`DaemonUnavailable`. There was no branch for "the connect flow was
cancelled externally and the daemon is back at Idle", so the latch
remained set forever and the optimistic Connecting state never
collapsed.

Fix: add a `sawConnectingRef` that flips to true the first time the
daemon reports Connecting during an active "connect" action, and
resets when `action` returns to null. When `action === "connect"` and
the daemon flips from a state we'd observed as Connecting back to
Idle, clear the latch so connState falls through to Disconnected.

Other paths are untouched:
- Successful connect still clears on Connected.
- NeedsLogin still hands off to driveLogin.
- DaemonUnavailable still clears via the `unreachable` branch.
- The `"logging-in"` action is intentionally not handled here; Login's
  internal Down flaps the daemon through Idle and driveLogin's
  .finally remains the sole clearer for that latch.
- The `"disconnect"` action's Idle/Disconnected/unreachable clear is
  unchanged.
2026-05-20 19:44:02 +02:00
Zoltan Papp
d3b660afba classify daemon login errors and surface localised dialogs
The daemon returns gRPC errors whose message is a wrapped mgm + JWT
stack (e.g. "invalid jwt token, err: token could not be parsed: ...").
Showing that in a native dialog is unreadable. Connection now maps the
substrings it recognises to a ClientError{code, short, long} so the UI
can render a localised summary plus a Details: block carrying the raw
daemon text. formatErrorMessage on the TS side reads the structured
payload from Wails' Error.cause (or the JSON-stringified Error.message)
and falls back to plain Error.message for callers not yet migrated.

Also bumps Wails to v3.0.0-alpha.95.
2026-05-20 19:13:13 +02:00
Zoltán Papp
341848b1ae fix lint issues in session watcher tests and status humaniser 2026-05-20 18:46:56 +02:00
Eduard Gert
414e7815e4 update default view icon, remove capitalize from profile name 2026-05-20 16:45:06 +02:00
Zoltán Papp
ef6b4f7538 add SSO session extend flow
Adds an end-to-end SSO session-extension feature: the management server
publishes per-peer session deadlines on every Login/Sync, a new
ExtendAuthSession RPC refreshes the deadline using a fresh JWT without
tearing down the tunnel, and the daemon tracks the deadline locally so
the UI can fire a T-10min warning toast with an interactive "Extend now"
action.
2026-05-20 16:43:14 +02:00
Eduard Gert
a7b26e3c0d add updating dialog 2026-05-20 16:20:40 +02:00
Eduard Gert
42534b24c5 fix scrollarea inside settings 2026-05-20 13:43:18 +02:00
Eduard Gert
620233a7ac update dropdown ui padding, remove unused stuff 2026-05-20 13:38:23 +02:00
Eduard Gert
1c15e9976b add profiles tab to settings 2026-05-20 13:17:13 +02:00
Eduard Gert
b79b62bee4 add default and advanced view items into dropdown 2026-05-20 09:39:35 +02:00
Eduard Gert
bec4eb326a update new profile modal 2026-05-19 18:53:19 +02:00
Eduard Gert
8748f3810d update profile ui 2026-05-19 18:27:05 +02:00
Eduard Gert
1c5254cb31 update profile ui 2026-05-19 14:21:14 +02:00
Eduard Gert
ca48de549e make dialogs draggable, disable selecting text 2026-05-18 16:34:38 +02:00
Eduard Gert
5b71a4f2ad update dialogs, hide main window on browser login, keep state as disconnected when needslogin 2026-05-18 16:31:59 +02:00
Eduard Gert
741ce8581d fix open settings in tray, prevent loading profiles when daemon is down 2026-05-18 13:07:34 +02:00
Zoltan Papp
6b44d65cac report daemon-down as DaemonUnavailable on initial Peers.Get and gate UI
- Peers.Get returns Status{Status: DaemonUnavailable} on Unavailable
  instead of an error so the React useStatus initial refresh picks up
  the same string the live event stream emits — the overlay no longer
  depends on receiving the synthetic event during boot.
- ProfileContext.refresh swallows Unavailable so the redundant
  "Load Profiles Failed" popup does not overlap the overlay.
- Tray Profiles submenu is disabled while the daemon is unavailable,
  matching the existing settings/debug/connect gating.
- gRPC client uses a 5s ConnectParams MaxDelay; the default 120s cap
  was keeping the SubChannel in backoff for tens of seconds after the
  daemon came back, masking the recovery.
2026-05-18 12:33:46 +02:00
Eduard Gert
f84b1df857 remove unused import 2026-05-18 11:37:55 +02:00
Eduard Gert
c24349e4f1 add overlay when daemon not available 2026-05-18 11:37:42 +02:00
Eduard Gert
7f7bee630f update about settings dev version, keep profile switch in sync between ui and tray 2026-05-18 10:56:27 +02:00
Eduard Gert
4e0eb9f2d4 Merge remote-tracking branch 'origin/ui-refactor' into ui-refactor 2026-05-18 10:41:12 +02:00
Eduard Gert
38a367e0cd update markdown files 2026-05-18 10:39:39 +02:00
Eduard Gert
78fb15e327 update profile context 2026-05-18 10:39:32 +02:00
Eduard Gert
35e58a2796 update connection switch 2026-05-18 10:39:22 +02:00
Eduard Gert
a6278936af replace openRoute with Event.Emit for needsLogin 2026-05-18 10:39:03 +02:00
Eduard Gert
32f62f3ed8 add profile switched event 2026-05-18 10:38:13 +02:00
Zoltán Papp
7fae703a27 [client/ui] Port IPv6 toggle and paired default-route filter to Wails UI
Brings two main-side PRs' UI behavior across the Fyne→Wails rewrite:

- #5631 (IPv6 overlay support): add "Enable IPv6" row to the polished
  SettingsNetwork tab; the legacy screens/Settings.tsx already had it,
  but modules/settings/SettingsNetwork.tsx (the user-visible Settings
  window) was missing the toggle.
- #6150 (mirror v4 exit selection onto v6 pair): replace the literal
  "0.0.0.0/0" || "::/0" filter in screens/Networks.tsx with an
  isDefaultRoute() helper that handles the daemon's merged-range
  display string (e.g. "0.0.0.0/0, ::/0"), so paired v4/v6 exit
  nodes are classified correctly.
2026-05-18 10:25:18 +02:00
Zoltán Papp
f468f15a30 Merge branch 'main' into ui-refactor
# Conflicts:
#	client/ui/network.go
2026-05-18 10:24:31 +02:00
Viktor Liu
3f91f49277 Clean up legacy 32-bit and HKCU registry entries on Windows install (#6176) 2026-05-16 16:52:57 +02:00
Viktor Liu
9ed2e2a5b4 [client] Drop DNS probes for passive health projection (#5971) 2026-05-15 17:07:38 +02:00
Viktor Liu
2ccae7ec47 [client] Mirror v4 exit selection onto v6 pair and honour SkipAutoApply per route (#6150) 2026-05-15 16:58:47 +02:00