fix(tui): revert centering, fix demo GIF pacing
Revert upper-third centering — inconsistent start positions across tabs felt jumpy. Back to standard top-align with consistent table placement. Demo GIF now pauses on Nodes tab (cluster view is a selling point) and skips Maint/Users quickly instead of sprinting through all three.
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 804 KiB After Width: | Height: | Size: 959 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 214 KiB After Width: | Height: | Size: 213 KiB |
|
Before Width: | Height: | Size: 214 KiB After Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 215 KiB |
|
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 282 KiB |
@@ -181,18 +181,7 @@ func (m Model) viewDashboard() string {
|
|||||||
if contentHeight < 1 {
|
if contentHeight < 1 {
|
||||||
contentHeight = 1
|
contentHeight = 1
|
||||||
}
|
}
|
||||||
|
paddedContent := lipgloss.NewStyle().Height(contentHeight).MaxHeight(contentHeight).Render(content)
|
||||||
contentLines := lipgloss.Height(content)
|
|
||||||
var paddedContent string
|
|
||||||
if contentLines < contentHeight {
|
|
||||||
topPad := (contentHeight - contentLines) / 3
|
|
||||||
paddedContent = lipgloss.NewStyle().
|
|
||||||
PaddingTop(topPad).
|
|
||||||
Height(contentHeight).MaxHeight(contentHeight).
|
|
||||||
Render(content)
|
|
||||||
} else {
|
|
||||||
paddedContent = lipgloss.NewStyle().Height(contentHeight).MaxHeight(contentHeight).Render(content)
|
|
||||||
}
|
|
||||||
|
|
||||||
return outerPad.Render(lipgloss.JoinVertical(lipgloss.Top, header, paddedContent, footer))
|
return outerPad.Render(lipgloss.JoinVertical(lipgloss.Top, header, paddedContent, footer))
|
||||||
}
|
}
|
||||||
|
|||||||