wip: refactoring tui

This commit is contained in:
adamdottv
2025-06-13 10:47:51 -05:00
parent 5706c6ad3a
commit 62b9a30a9c
18 changed files with 111 additions and 716 deletions

View File

@@ -49,7 +49,7 @@ type themeDialog struct {
height int
modal *modal.Modal
list components.SimpleList[themeItem]
list components.List[themeItem]
}
func (t *themeDialog) Init() tea.Cmd {
@@ -84,7 +84,7 @@ func (t *themeDialog) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
var cmd tea.Cmd
listModel, cmd := t.list.Update(msg)
t.list = listModel.(components.SimpleList[themeItem])
t.list = listModel.(components.List[themeItem])
return t, cmd
}
@@ -110,7 +110,7 @@ func NewThemeDialog() ThemeDialog {
}
}
list := components.NewSimpleList(
list := components.NewListComponent(
themeItems,
10, // maxVisibleThemes
"No themes available",