Commit Graph

4 Commits

Author SHA1 Message Date
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
d2dc361620 fix: change back navigation to 'b' key and improve deletion confirmation with name verification
- Changed 'q' key to 'b' for back navigation in client details
- Added 'esc' key binding for back navigation
- Updated help text to reflect new key bindings
- Created new DeleteConfirmModal component with name verification
- User must type exact client name to confirm deletion (safety feature)
- Improved modal styling with visual feedback (red/green indicators)
- Case-sensitive name matching to prevent accidental deletions

Fixes: wg-admin-az7
2026-01-12 22:17:27 +01:00
Calmcacil
26120b8bc2 Add WireGuard TUI implementation
- Add Go TUI with bubbletea for WireGuard management
- Implement client CRUD operations with QR code generation
- Add configuration and validation modules
- Install/update scripts for client setup
- Update Makefile to build binaries to bin/ directory
- Add .gitignore for Go projects
2026-01-12 19:03:35 +01:00