mirror of
https://github.com/Gu1llaum-3/sshm.git
synced 2025-10-21 18:37:23 +02:00
Merge 4d82a7b7ba6baea11badd4a7a7463e2066e66ee6 into 825c534ebe1b5683a57522329e26ad37a182bead
This commit is contained in:
commit
060286d61e
@ -275,11 +275,29 @@ func (m *addFormModel) handleNavigation(key string) tea.Cmd {
|
|||||||
currentPos++
|
currentPos++
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrap around within current tab
|
// Handle transitions between tabs
|
||||||
if currentPos >= len(currentTabInputs) {
|
if currentPos >= len(currentTabInputs) {
|
||||||
currentPos = 0
|
// Move to next tab
|
||||||
|
if m.currentTab == tabGeneral {
|
||||||
|
// Move to advanced tab
|
||||||
|
m.currentTab = tabAdvanced
|
||||||
|
m.focused = m.getFirstInputForTab(tabAdvanced)
|
||||||
|
return m.updateFocus()
|
||||||
|
} else {
|
||||||
|
// Wrap around to first field of current tab
|
||||||
|
currentPos = 0
|
||||||
|
}
|
||||||
} else if currentPos < 0 {
|
} else if currentPos < 0 {
|
||||||
currentPos = len(currentTabInputs) - 1
|
// Move to previous tab
|
||||||
|
if m.currentTab == tabAdvanced {
|
||||||
|
// Move to general tab
|
||||||
|
m.currentTab = tabGeneral
|
||||||
|
currentTabInputs = m.getInputsForCurrentTab()
|
||||||
|
currentPos = len(currentTabInputs) - 1
|
||||||
|
} else {
|
||||||
|
// Wrap around to last field of current tab
|
||||||
|
currentPos = len(currentTabInputs) - 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m.focused = currentTabInputs[currentPos]
|
m.focused = currentTabInputs[currentPos]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user