mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 14:26:46 +00:00
There is no blank line at the end of status
This commit is contained in:
@@ -98,7 +98,10 @@ func (m model) View() string {
|
||||
|
||||
if m.width <= 80 {
|
||||
var rendered []string
|
||||
for _, c := range cards {
|
||||
for i, c := range cards {
|
||||
if i > 0 {
|
||||
rendered = append(rendered, "")
|
||||
}
|
||||
rendered = append(rendered, renderCard(c, cardWidth, 0))
|
||||
}
|
||||
return header + "\n" + lipgloss.JoinVertical(lipgloss.Left, rendered...)
|
||||
|
||||
@@ -585,7 +585,7 @@ func renderCard(data cardData, width int, height int) string {
|
||||
lineLen = 4
|
||||
}
|
||||
header := titleStyle.Render(titleText) + " " + lineStyle.Render(strings.Repeat("─", lineLen))
|
||||
content := header + "\n" + strings.Join(data.lines, "\n") + "\n"
|
||||
content := header + "\n" + strings.Join(data.lines, "\n")
|
||||
|
||||
// Pad to target height
|
||||
lines := strings.Split(content, "\n")
|
||||
@@ -765,7 +765,16 @@ func renderTwoColumns(cards []cardData, width int) string {
|
||||
rows = append(rows, left)
|
||||
}
|
||||
}
|
||||
return lipgloss.JoinVertical(lipgloss.Left, rows...)
|
||||
|
||||
// Add empty lines between rows for separation
|
||||
var spacedRows []string
|
||||
for i, r := range rows {
|
||||
if i > 0 {
|
||||
spacedRows = append(spacedRows, "")
|
||||
}
|
||||
spacedRows = append(spacedRows, r)
|
||||
}
|
||||
return lipgloss.JoinVertical(lipgloss.Left, spacedRows...)
|
||||
}
|
||||
|
||||
func maxInt(a, b int) int {
|
||||
|
||||
Reference in New Issue
Block a user