Удаление ненужных сообщений, удаление дублирования кода update viewport final, исправление приведени типов, работа над viewport form, исправление динамических секций
This commit is contained in:
parent
300afb5d26
commit
ecc89e34c5
11 changed files with 168 additions and 142 deletions
|
|
@ -2,7 +2,6 @@ package fields
|
|||
|
||||
import (
|
||||
"bubble/setup/ui"
|
||||
"bubble/types"
|
||||
"fmt"
|
||||
"github.com/charmbracelet/bubbles/textinput"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
|
|
@ -92,15 +91,9 @@ func (m *FileSelectModel) Update(msg tea.Msg) (FieldModel, tea.Cmd) {
|
|||
m.file = fullPath
|
||||
m.input.SetValue(fullPath)
|
||||
m.open = false
|
||||
selected := types.SelectedFileMsg{
|
||||
Filename: fileName,
|
||||
Index: m.focus,
|
||||
}
|
||||
m.input.CursorEnd()
|
||||
m.focus = 0
|
||||
return m, func() tea.Msg {
|
||||
return selected
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue