diff --git a/internal/ui/add_form.go b/internal/ui/add_form.go index eb3717b..8cbeda4 100644 --- a/internal/ui/add_form.go +++ b/internal/ui/add_form.go @@ -49,7 +49,7 @@ func NewAddForm(hostname string, styles Styles, width, height int, configFile st } } - inputs := make([]textinput.Model, 10) // Increased from 9 to 10 for RequestTTY + inputs := make([]textinput.Model, 11) // Name input inputs[nameInput] = textinput.New() @@ -93,7 +93,7 @@ func NewAddForm(hostname string, styles Styles, width, height int, configFile st // ProxyCommand input inputs[proxyCommandInput] = textinput.New() - inputs[proxyCommandInput].Placeholder = "/usr/local/bin/wssh proxy %h" + inputs[proxyCommandInput].Placeholder = "ssh -W %h:%p Jumphost" inputs[proxyCommandInput].CharLimit = 200 inputs[proxyCommandInput].Width = 50 @@ -408,7 +408,7 @@ func (m *addFormModel) renderGeneralTab() string { {portInput, "Port"}, {identityInput, "Identity File"}, {proxyJumpInput, "ProxyJump"}, - {proxyCommandInput, "ProxyCommand"} + {proxyCommandInput, "ProxyCommand"}, {tagsInput, "Tags (comma-separated)"}, } diff --git a/internal/ui/edit_form.go b/internal/ui/edit_form.go index eacba95..7dfa48d 100644 --- a/internal/ui/edit_form.go +++ b/internal/ui/edit_form.go @@ -91,7 +91,7 @@ func NewEditForm(hostName string, styles Styles, width, height int, configFile s } } - inputs := make([]textinput.Model, 9) // Increased from 8 to 9 for RequestTTY + inputs := make([]textinput.Model, 10) // Hostname input inputs[0] = textinput.New() @@ -130,7 +130,7 @@ func NewEditForm(hostName string, styles Styles, width, height int, configFile s // ProxyCommand input inputs[5] = textinput.New() - inputs[5].Placeholder = "/bin/wssh proxy" + inputs[5].Placeholder = "ssh -W %h:%p Jumphost" inputs[5].CharLimit = 200 inputs[5].Width = 50 inputs[5].SetValue(host.ProxyCommand) @@ -260,19 +260,19 @@ func (m *editFormModel) updateFocus() tea.Cmd { func (m *editFormModel) getPropertiesForCurrentTab() []int { switch m.currentTab { case 0: // General - return []int{0, 1, 2, 3, 4, 5, 6} // hostname, user, port, identity, proxyjump, proxycommand, tags + return []int{0, 1, 2, 3, 4, 5, 7} // hostname, user, port, identity, proxyjump, proxycommand, tags case 1: // Advanced - return []int{5, 7, 8} // options, remotecommand, requesttty + return []int{6, 8, 9} // options, remotecommand, requesttty default: - return []int{0, 1, 2, 3, 4, 6} + return []int{0, 1, 2, 3, 4, 5, 7} } } // getFirstPropertyForTab returns the first property index for a given tab func (m *editFormModel) getFirstPropertyForTab(tab int) int { - properties := []int{0, 1, 2, 3, 4, 6} // General tab + properties := []int{0, 1, 2, 3, 4, 5, 7} // General tab if tab == 1 { - properties = []int{5, 7, 8} // Advanced tab + properties = []int{6, 8, 9} // Advanced tab } if len(properties) > 0 { return properties[0] @@ -587,7 +587,8 @@ func (m *editFormModel) renderEditGeneralTab() string { {2, "Port"}, {3, "Identity File"}, {4, "Proxy Jump"}, - {6, "Tags (comma-separated)"}, + {5, "Proxy Command"}, + {7, "Tags (comma-separated)"}, } for _, field := range fields { @@ -690,7 +691,7 @@ func (m *editFormModel) submitEditForm() tea.Cmd { port := strings.TrimSpace(m.inputs[2].Value()) // portInput identity := strings.TrimSpace(m.inputs[3].Value()) // identityInput proxyJump := strings.TrimSpace(m.inputs[4].Value()) // proxyJumpInput - proxyCommand := strings.TrimSpace(m.inputs[5].Value()) // proxyCommandInput + proxyCommand := strings.TrimSpace(m.inputs[5].Value()) // proxyCommandInput options := strings.TrimSpace(m.inputs[6].Value()) // optionsInput remoteCommand := strings.TrimSpace(m.inputs[8].Value()) // remoteCommandInput requestTTY := strings.TrimSpace(m.inputs[9].Value()) // requestTTYInput