mirror of
https://github.com/Gu1llaum-3/sshm.git
synced 2026-01-27 03:04:21 +01:00
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:
@@ -61,8 +61,8 @@ func NewModel(hosts []config.SSHHost, configFile string) Model {
|
||||
columns := []table.Column{
|
||||
{Title: "Name", Width: nameWidth},
|
||||
{Title: "Hostname", Width: 25},
|
||||
{Title: "User", Width: 12},
|
||||
{Title: "Port", Width: 6},
|
||||
// {Title: "User", Width: 12}, // Commented to save space
|
||||
// {Title: "Port", Width: 6}, // Commented to save space
|
||||
{Title: "Tags", Width: tagsWidth},
|
||||
{Title: "Last Login", Width: lastLoginWidth},
|
||||
}
|
||||
@@ -92,8 +92,8 @@ func NewModel(hosts []config.SSHHost, configFile string) Model {
|
||||
rows = append(rows, table.Row{
|
||||
host.Name,
|
||||
host.Hostname,
|
||||
host.User,
|
||||
host.Port,
|
||||
// host.User, // Commented to save space
|
||||
// host.Port, // Commented to save space
|
||||
tagsStr,
|
||||
lastLoginStr,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user