fix: make empty text responsive

Signed-off-by: Hadi <hadi@example.com>
This commit is contained in:
Hadi
2026-05-29 11:13:57 +02:00
parent 1aa4b92bb3
commit 4922f3704d
9 changed files with 22 additions and 14 deletions
+1 -1
View File
@@ -355,7 +355,7 @@ func (m *Model) refreshBody() {
}
if raw == "" {
w, h := m.bodyViewport.Width(), m.bodyViewport.Height()
m.bodyViewport.SetContent(lipgloss.Place(w, h, lipgloss.Center, lipgloss.Center, ilovetui.S.Faint.Render(util.CenterLines("(˘・_・˘)", "no response stored"))))
m.bodyViewport.SetContent(lipgloss.Place(w, h, lipgloss.Center, lipgloss.Center, ilovetui.S.Faint.Render(util.EmptyState(w, "(˘・_・˘)", "no response stored"))))
return
}
m.bodyViewport.SetContent(style.HighlightHTTP(raw))
+2 -2
View File
@@ -82,9 +82,9 @@ func (m *Model) renderList() string {
)
}
if len(m.entries) == 0 {
msg := util.CenterLines("(⌐■_■)", "no history yet")
msg := util.EmptyState(m.listViewport.Width(), "(⌐■_■)", "no history yet")
if m.searchKind != searchKindOff {
msg = util.CenterLines("ʕノ•ᴥ•ʔノ ︵ ┻━┻", "no results")
msg = util.EmptyState(m.listViewport.Width(), "ʕノ•ᴥ•ʔノ ︵ ┻━┻", "no results")
}
return lipgloss.Place(
m.listViewport.Width(), m.listViewport.Height(),