tui: add border above input
This commit is contained in:
parent
a669313a0b
commit
3e24a54d0a
|
@ -204,7 +204,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||||
m.width = msg.Width
|
m.width = msg.Width
|
||||||
m.height = msg.Height
|
m.height = msg.Height
|
||||||
m.content.Width = msg.Width
|
m.content.Width = msg.Width
|
||||||
m.input.SetWidth(msg.Width - 1)
|
m.input.SetWidth(msg.Width)
|
||||||
m.rebuildMessageCache()
|
m.rebuildMessageCache()
|
||||||
m.updateContent()
|
m.updateContent()
|
||||||
case msgConversationLoaded:
|
case msgConversationLoaded:
|
||||||
|
@ -461,10 +461,17 @@ func initialModel(ctx *lmcli.Context, convShortname string) model {
|
||||||
m.input.CharLimit = 0
|
m.input.CharLimit = 0
|
||||||
m.input.Placeholder = "Enter a message"
|
m.input.Placeholder = "Enter a message"
|
||||||
|
|
||||||
m.input.FocusedStyle.CursorLine = lipgloss.NewStyle()
|
|
||||||
m.input.ShowLineNumbers = false
|
m.input.ShowLineNumbers = false
|
||||||
m.input.SetHeight(4)
|
m.input.SetHeight(4)
|
||||||
m.input.Focus()
|
m.input.Focus()
|
||||||
|
m.input.FocusedStyle.CursorLine = lipgloss.NewStyle()
|
||||||
|
m.input.FocusedStyle.Base = lipgloss.NewStyle().
|
||||||
|
BorderTop(true).
|
||||||
|
BorderStyle(lipgloss.NormalBorder())
|
||||||
|
m.input.BlurredStyle.Base = lipgloss.NewStyle().
|
||||||
|
Faint(true).
|
||||||
|
BorderTop(true).
|
||||||
|
BorderStyle(lipgloss.NormalBorder())
|
||||||
|
|
||||||
m.spinner = spinner.New(spinner.WithSpinner(
|
m.spinner = spinner.New(spinner.WithSpinner(
|
||||||
spinner.Spinner{
|
spinner.Spinner{
|
||||||
|
|
Loading…
Reference in New Issue