Commit Graph

46 Commits

Author SHA1 Message Date
Calmcacil
5136484cd2 bd sync: 2026-01-12 23:03:09 2026-01-12 23:03:09 +01:00
Calmcacil
8b49fbfd3a bd sync: 2026-01-12 23:02:08 2026-01-12 23:02:08 +01:00
Calmcacil
707464e61e Fix help screen documentation - incorrect key binding for viewing details 2026-01-12 23:00:16 +01:00
Calmcacil
153c001483 bd sync: 2026-01-12 22:57:05 2026-01-12 22:57:05 +01:00
Calmcacil
23d1cae737 bd sync: 2026-01-12 22:54:34 2026-01-12 22:54:34 +01:00
Calmcacil
3f60ab8355 fix: add background dimming to config display modal
Config display modal now dims background content before showing,
following the same pattern as delete confirmation modal.
This provides visual consistency across all modals and makes
it clear to users when a modal is active.

Fixes: wg-admin-bfe
2026-01-12 22:44:11 +01:00
Calmcacil
fd0a1c45e7 feat: replace clipboard copy with config display for SSH sessions
Created ConfigDisplay component that shows full client configuration
in a scrollable modal window, replacing non-functional clipboard copy.

Benefits:
- Works over SSH sessions (no clipboard API needed)
- Shows complete configuration, not just public key
- Scrollable for long configs with keyboard navigation
- Users can select and copy text directly in terminal

Changes:
- Created internal/tui/components/config-display.go
- Updated detail.go to replace copyPublicKey with loadConfig
- Removed clipboard-related fields and message type
- Updated help text: 'c' now shows config
- Key bindings for scrolling: ↑↓, pgup/pgdn, g/G, Esc/q to close

Fixes: wg-admin-qtb
2026-01-12 22:36:40 +01:00
Calmcacil
8fb3fe7031 fix: critical navigation bug - users trapped in detail and restore screens
Changed return value from 'return s, nil' to 'return nil, nil' in:
- detail.go (line 116): Back navigation from client details
- restore.go (line 101): Back navigation from restore screen

Root cause: Main model's navigation logic checks if newScreen == nil.
When screens returned (s, nil), the check failed and screen never changed.
Now properly returns (nil, nil) to signal screen change to parent.

Fixes: wg-admin-rfo
2026-01-12 22:27:16 +01:00
Calmcacil
0798b72858 bd sync: 2026-01-12 22:17:09 2026-01-12 22:17:09 +01:00
Calmcacil
f1712b5f9e bd sync: 2026-01-12 21:41:27 2026-01-12 21:41:27 +01:00
Calmcacil
5d129562e2 fix: Properly parse compound handshake time and fix q key handling
- Fix parseHandshake to correctly parse number-unit pairs from '14 hours, 24 minutes, 40 seconds ago'
  Previous logic tried to parse unit words instead of finding associated numbers
  Now correctly accumulates all time units (hours, minutes, seconds)
- Fix q key handling to properly check screen type before quitting
  Only quit application when 'q' is pressed on list screen
  Other screens (detail, add, help) now handle 'q' to navigate back

Note: q key navigation may still need investigation for edge cases
2026-01-12 19:27:21 +01:00
Calmcacil
e0f8210c17 fix: Fix 'q' key handling and connectivity status issues
- Fix 'q' key in detail/add/help screens to return to list instead of quitting
- Only quit application with 'q' when on main list screen
- Fix parseHandshake to accumulate all time units instead of returning early
  This resolves handshake timing discrepancy with wg show output
- Increase connection status threshold from 3 to 5 minutes
  Allows ~12 missed keepalive intervals (25s each)
  Improves connectivity status accuracy for peers with marginal connections
2026-01-12 19:17:51 +01:00
Calmcacil
85f2e521c9 feat: Add Dracula and Everforest color themes, set Everforest as default
- Add DraculaTheme with official Dracula color palette
- Add EverforestTheme with natural Everforest dark color scheme
- Set Everforest as default theme (was 'default')
- Update README with theming documentation and THEME env var usage
- Build verified successfully
2026-01-12 19:10:46 +01:00
Calmcacil
aeea977884 bd sync: 2026-01-12 18:06:59 2026-01-12 18:06:59 +01:00
Calmcacil
a55629bb7f bd sync: 2026-01-12 18:06:08 2026-01-12 18:06:08 +01:00
Calmcacil
900cbad4cd bd sync: 2026-01-12 18:05:24 2026-01-12 18:05:24 +01:00
Calmcacil
c638800137 bd sync: 2026-01-12 18:04:46 2026-01-12 18:04:46 +01:00
Calmcacil
88d4ca79d1 bd sync: 2026-01-12 17:59:34 2026-01-12 17:59:34 +01:00
Calmcacil
427e3b402c bd sync: 2026-01-12 17:56:53 2026-01-12 17:56:53 +01:00
Calmcacil
9c7990c192 bd sync: 2026-01-12 17:54:28 2026-01-12 17:54:28 +01:00
Calmcacil
acab9f95b4 bd sync: 2026-01-12 17:51:29 2026-01-12 17:51:29 +01:00
Calmcacil
e86f968c5f bd sync: 2026-01-12 17:51:02 2026-01-12 17:51:02 +01:00
Calmcacil
cb7844c730 bd sync: 2026-01-12 17:48:32 2026-01-12 17:48:32 +01:00
Calmcacil
09a3524a71 bd sync: 2026-01-12 17:47:26 2026-01-12 17:47:26 +01:00
Calmcacil
b53e1af96a bd sync: 2026-01-12 17:46:34 2026-01-12 17:46:34 +01:00
Calmcacil
efb8b5da72 bd sync: 2026-01-12 17:46:25 2026-01-12 17:46:25 +01:00
Calmcacil
f58bf18cf1 bd sync: 2026-01-12 17:42:41 2026-01-12 17:42:41 +01:00
Calmcacil
5982a5ddfb bd sync: 2026-01-12 17:41:35 2026-01-12 17:41:35 +01:00
Calmcacil
a393e64d20 bd sync: 2026-01-12 17:40:18 2026-01-12 17:40:18 +01:00
Calmcacil
e66de51d6d bd sync: 2026-01-12 17:38:49 2026-01-12 17:38:49 +01:00
Calmcacil
429bce1484 bd sync: 2026-01-12 17:34:30 2026-01-12 17:34:30 +01:00
Calmcacil
b9f781f548 bd sync: 2026-01-12 17:32:36 2026-01-12 17:32:36 +01:00
Calmcacil
6c9ee6ef3e bd sync: 2026-01-12 17:29:26 2026-01-12 17:29:26 +01:00
Calmcacil
718432911b bd sync: 2026-01-12 17:21:52 2026-01-12 17:21:52 +01:00
Calmcacil
1c76b64e2f bd sync: 2026-01-12 17:20:35 2026-01-12 17:20:35 +01:00
Calmcacil
b7e7454711 bd sync: 2026-01-12 17:16:28 2026-01-12 17:16:28 +01:00
Calmcacil
69f73516c5 bd sync: 2026-01-12 17:13:13 2026-01-12 17:13:13 +01:00
Calmcacil
fc4aa2a577 bd sync: 2026-01-12 17:11:08 2026-01-12 17:11:08 +01:00
Calmcacil
21e5608ef0 bd sync: 2026-01-12 17:05:01 2026-01-12 17:05:01 +01:00
Calmcacil
375fcba7eb bd sync: 2026-01-12 16:50:43 2026-01-12 16:50:43 +01:00
Calmcacil
c499fce077 bd sync: 2026-01-12 16:48:58 2026-01-12 16:48:58 +01:00
Calmcacil
ac87dcdb9d bd sync: 2026-01-12 16:44:13 2026-01-12 16:44:13 +01:00
Calmcacil
8f12aa36e2 bd sync: 2026-01-12 16:43:17 2026-01-12 16:43:17 +01:00
Calmcacil
719ce14235 bd sync: 2026-01-12 16:34:12 2026-01-12 16:34:12 +01:00
Calmcacil
3e856702e3 bd sync: 2026-01-12 16:32:54 2026-01-12 16:32:54 +01:00
Calmcacil
140957857a bd sync: 2026-01-12 15:57:12 2026-01-12 15:57:12 +01:00