Private
Public Access
1
0

tui: revamp footer (some more)

Simplified layout logic, reorganized elements
This commit is contained in:
2024-10-01 03:38:15 +00:00
parent bb48bc9abd
commit 93c2fb3d1e
6 changed files with 148 additions and 110 deletions

View File

@@ -107,6 +107,28 @@ type Model struct {
elapsed time.Duration
}
func getSpinner() spinner.Model {
return spinner.New(spinner.WithSpinner(
spinner.Spinner{
Frames: []string{
"∙∙∙",
"●∙∙",
"●●∙",
"●●●",
"∙●●",
"∙∙●",
"∙∙∙",
"∙∙●",
"∙●●",
"●●●",
"●●∙",
"●∙∙",
},
FPS: 440 * time.Millisecond,
},
))
}
func Chat(app *model.AppModel) *Model {
m := Model{
App: app,
@@ -121,21 +143,9 @@ func Chat(app *model.AppModel) *Model {
wrap: true,
selectedMessage: -1,
content: viewport.New(0, 0),
input: textarea.New(),
spinner: spinner.New(spinner.WithSpinner(
spinner.Spinner{
Frames: []string{
". ",
".. ",
"...",
".. ",
". ",
" ",
},
FPS: time.Second / 3,
},
)),
content: viewport.New(0, 0),
input: textarea.New(),
spinner: getSpinner(),
replyCursor: cursor.New(),
}