mirror of
https://github.com/jixishi/SerialTerminalForWindowsTerminal.git
synced 2026-06-16 00:52:44 +00:00
feat: multi-field forward form with Tab cycling
Replace single-line prompt with form-based forward input: - Separate Type/Host/Port fields - Tab/Shift+Tab cycles focus, Tab on Type field cycles mode values - Address auto-split into host+port for edit - COM port excludes port field - Form render with focused field indicator Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -61,6 +61,13 @@ type Model struct {
|
||||
promptInput textinput.Model
|
||||
promptSubmit func(string)
|
||||
|
||||
formActive bool
|
||||
formTitle string
|
||||
formFields []textinput.Model
|
||||
formLabels []string
|
||||
formFocus int
|
||||
formSubmit func([]string)
|
||||
|
||||
completionActive bool
|
||||
completionBase string
|
||||
completionCandidates []string
|
||||
@@ -262,6 +269,10 @@ func (m *Model) View() string {
|
||||
return fillScreen(m.width, m.height, base)
|
||||
}
|
||||
|
||||
if m.formActive {
|
||||
return renderCenteredModalContent(m.width, m.height, m.renderForm())
|
||||
}
|
||||
|
||||
if m.promptActive {
|
||||
return renderCenteredModalContent(m.width, m.height, m.renderPrompt())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user