Skip to content

Commit 86e3681

Browse files
gitcoder89431claude
andcommitted
feat: remove checkmark badge from in-sync files on dashboard
Only show badges when actionable: ↻ syncing, ! conflict. Clean files show just the name and timestamp with no prefix clutter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a5c94d2 commit 86e3681

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

internal/screens/dashboard.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,18 @@ func (d Dashboard) fileRow(f syncthing.FileEntry, selected bool, width int) stri
232232
name += "/"
233233
}
234234

235-
badge, badgeStyle := "", d.theme.Success
235+
badge, badgeStyle := "", d.theme.Success
236236
if f.IsConflict {
237237
badge, badgeStyle = "!", d.theme.Error
238238
} else if !f.InSync {
239239
badge, badgeStyle = "↻", d.theme.Warn
240240
}
241241

242242
timeStr := formatModTime(f.ModTime)
243-
right := badge + " " + timeStr
243+
right := timeStr
244+
if badge != "" {
245+
right = badge + " " + timeStr
246+
}
244247
rightW := lipgloss.Width(right)
245248
nameW := max(8, width-rightW-2)
246249
nameStr := truncateD(name, nameW)
@@ -255,9 +258,15 @@ func (d Dashboard) fileRow(f syncthing.FileEntry, selected bool, width int) stri
255258
colored := func(s string, st lipgloss.Style) string {
256259
return lipgloss.NewStyle().Foreground(st.GetForeground()).Background(selBg).Render(s)
257260
}
258-
return plain(nameStr+trailing+" ") + colored(badge, badgeStyle) + plain(" "+timeStr)
261+
if badge != "" {
262+
return plain(nameStr+trailing+" ") + colored(badge, badgeStyle) + plain(" "+timeStr)
263+
}
264+
return plain(nameStr+trailing+" ") + plain(timeStr)
265+
}
266+
if badge != "" {
267+
return d.theme.Text.Render(nameStr+trailing+" ") + badgeStyle.Render(badge) + d.theme.Muted.Render(" "+timeStr)
259268
}
260-
return d.theme.Text.Render(nameStr+trailing+" ") + badgeStyle.Render(badge) + d.theme.Muted.Render(" "+timeStr)
269+
return d.theme.Text.Render(nameStr+trailing+" ") + d.theme.Muted.Render(timeStr)
261270
}
262271

263272
func (d Dashboard) Devices() []syncthing.Device { return d.devices }

0 commit comments

Comments
 (0)