mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-16 11:39:57 +00:00
- **Wails v3 application** (`client/ui`) with a React + TypeScript + Tailwind frontend replacing the Fyne UI: main connection view, exit-node switcher, networks/peers browser with detail panels, profile management, settings (general, network, SSH, security, troubleshooting, appearance), debug-bundle creation, and a first-run welcome flow. - **Internationalization**: go-i18n bundle with 9 locales (en, de, es, fr, hu, it, pt, ru, zh-CN) shared between the tray and the frontend. - **New system tray** implementation with per-platform theme-aware icons, including a native XEmbed host for Linux (`xembed_tray_linux.c`) and a Linux theme watcher. - **Session handling**: auth session watcher (`client/internal/auth/sessionwatch`), pending login flow, session-expiration dialog and tray notifications, and `netbird login` improvements. - **Daemon API extensions** (`daemon.proto`): status stream subscription, event stream, networks/exit-node selection endpoints, and richer full status — with probe throttling on the daemon side to protect against UI-driven request storms. - **UI preferences store** persisted per profile, autostart management via the daemon (single source of truth in HKCU on Windows). - **Build system**: Taskfile-based builds per platform (macOS, Linux, Windows), Docker cross-compilation images, MSIX/NSIS/nfpm/AppImage packaging, and a new `frontend-ui` CI workflow. Co-authored-by: Zoltan Papp <zoltan.pmail@gmail.com> Co-authored-by: Eduard Gert <kontakt@eduardgert.de> Co-authored-by: braginini <bangvalo@gmail.com> Co-authored-by: Pascal Fischer <32096965+pascal-fischer@users.noreply.github.com> Co-authored-by: riccardom <riccardomanfrin@gmail.com>
45 lines
1.4 KiB
Go
45 lines
1.4 KiB
Go
//go:build js
|
|
|
|
package internal
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/netbirdio/netbird/client/internal/peer"
|
|
)
|
|
|
|
// noopSessionWatcher is the js/wasm stand-in for sessionwatch.Watcher. The
|
|
// wasm client never runs the engine's session-warning flow (the interactive
|
|
// T-WarningLead notification and the T-FinalWarningLead fallback dialog live
|
|
// in the desktop UI), so linking the full sessionwatch package (timers, event
|
|
// composition) would only bloat the binary.
|
|
//
|
|
// It still mirrors the deadline into the status recorder so the SubscribeStatus
|
|
// / Status snapshot the UI consumes stays correct — only the timer-driven
|
|
// warnings are dropped.
|
|
type noopSessionWatcher struct {
|
|
recorder *peer.Status
|
|
}
|
|
|
|
func newSessionWatcher(recorder *peer.Status) sessionDeadlineWatcher {
|
|
return noopSessionWatcher{recorder: recorder}
|
|
}
|
|
|
|
// Update mirrors the real watcher's recorder propagation without the timers or
|
|
// sanity-check sentinels: a valid deadline is exposed on the status snapshot,
|
|
// the zero time clears it.
|
|
func (w noopSessionWatcher) Update(deadline time.Time) error {
|
|
if w.recorder != nil {
|
|
w.recorder.SetSessionExpiresAt(deadline)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (noopSessionWatcher) Dismiss() {
|
|
// No-op: only suppresses the timer-driven final-warning, which this stub never arms.
|
|
}
|
|
|
|
func (noopSessionWatcher) Close() {
|
|
// No-op: no timers to stop and no state to unwind; the recorder is cleared via Update(zero).
|
|
}
|