Commit Graph

2 Commits

Author SHA1 Message Date
Skyline ee0399b26c Improve WireGuard apply flow and shell UI
- Respect tunnel running state when saving config; avoid implicit restart when down
- Optional pending wg.conf when tunnel stopped (WGUI_WGCONF_PENDING_WHEN_TUNNEL_STOPPED)
- wg-quick: best-effort down before up with retry on transient failures
- Dashboard: explicit green/red badges for server active/inactive (light theme)
- Client cards: metadata chips row uses full card width below header row
- Locales and README updates for behavior and troubleshooting
2026-05-01 17:04:03 -06:00
Skyline 1b07fe442d WireGuard UI v2: shell UI, i18n, passkeys, traffic, dashboard, logs
Summary
- Replace single-page flow with fixed shell layout (sidebar, top bar, Apply config
  orchestration) and wgshell.css styling.
- Add English/Spanish UI via embedded locale JSON and template tr() + client WG_T/wgT().

New packages / modules
- locale/: embedded es.json/en.json, T(), MsgMap(), JSONForHTML for shell pages.
- handler/render_helpers.go: renderShell, injectUILang, nav apply-config badge.
- handler/passkeys.go: WebAuthn register/login begin+finish, rename/remove, clear on
  global Passkeys disable; session passkey credential tracking.
- handler/wg_traffic_cache.go: in-memory WireGuard counter sampling, traffic series API.
- handler/wg_status_devices.go: wgctrl device/peer views, dashboard KPI payloads,
  live peer stats for client cards.
- handler/logs_tail.go: optional file tail + systemd/journal sections for Logs page.
- util/wg_quick.go, util/wg_synconf.go: gated wg-quick and wg syncconf after apply.
- util/sysctl_linux.go + sysctl_stub.go: optional IPv4 ip_forward sysctl.
- util/host_uptime.go, util/server_ui.go: host uptime and server UI helpers.

Templates & UX
- New pages: dashboard.html, traffic.html, logs.html; extended global_settings,
  login (passkey), profile, users_settings, base shell, clients card grid with
  peer traffic polling.

Model / routes
- Global settings: session timeout, UI theme/language, realtime stats, Passkeys toggle;
  multi-user CRUD, suspend, revoke sessions, admin role APIs (main.go + routes).

Docs
- README: WireGuard UI v2 section, expanded Features, operator notes, v2 screenshot
  (GitHub user-attachments CDN URL).

Chore
- .gitignore: .DS_Store, wireguard-ui-v2 build artifact; English comments across
  handlers, templates, CSS, helper.js.
2026-04-30 20:51:42 -06:00