feat: refactor TUI with read-only info view and optimized layout

- Add new 'i' command for read-only host information display
- Implement info view with option to switch to edit mode (e/Enter)
- Hide User and Port columns to optimize table space usage
- Improve table height calculation for better host visibility
- Add proper message handling for info view navigation
- Interface optimization
This commit is contained in:
2025-09-04 16:47:07 +02:00
parent 2ade315ddc
commit 1cea3795e4
8 changed files with 469 additions and 52 deletions

View File

@@ -35,7 +35,9 @@ const (
ViewList ViewMode = iota
ViewAdd
ViewEdit
ViewInfo
ViewPortForward
ViewHelp
)
// PortForwardType defines the type of port forwarding
@@ -77,7 +79,9 @@ type Model struct {
viewMode ViewMode
addForm *addFormModel
editForm *editFormModel
infoForm *infoFormModel
portForwardForm *portForwardModel
helpForm *helpModel
// Terminal size and styles
width int