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
This commit is contained in:
31
internal/tui/screens/interface.go
Normal file
31
internal/tui/screens/interface.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package screens
|
||||
|
||||
import (
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
)
|
||||
|
||||
// Screen represents a UI screen (list, add, detail, etc.)
|
||||
type Screen interface {
|
||||
Init() tea.Cmd
|
||||
Update(tea.Msg) (Screen, tea.Cmd)
|
||||
View() string
|
||||
}
|
||||
|
||||
// ClientSelectedMsg is sent when a client is selected from the list
|
||||
type ClientSelectedMsg struct {
|
||||
Client ClientWithStatus
|
||||
}
|
||||
|
||||
// ClientDeletedMsg is sent when a client is successfully deleted
|
||||
type ClientDeletedMsg struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
// CloseDetailScreenMsg signals to close detail screen
|
||||
type CloseDetailScreenMsg struct{}
|
||||
|
||||
// RestoreCompletedMsg is sent when a restore operation completes
|
||||
type RestoreCompletedMsg struct {
|
||||
Err error
|
||||
SafetyBackupPath string
|
||||
}
|
||||
Reference in New Issue
Block a user