From ca5d40b7ccd8fcc10028dbc263f412a5040d370b Mon Sep 17 00:00:00 2001 From: Bradley Cicenas Date: Fri, 3 Jan 2020 12:07:54 +0000 Subject: [PATCH] truncate id in compact widget --- cwidgets/compact/text.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cwidgets/compact/text.go b/cwidgets/compact/text.go index dfc9f53..4b419a0 100644 --- a/cwidgets/compact/text.go +++ b/cwidgets/compact/text.go @@ -35,6 +35,9 @@ func NewCIDCol() CompactCol { func (w *CIDCol) SetMeta(m models.Meta) { w.Text = m.Get("id") + if len(w.Text) > 12 { + w.Text = w.Text[:12] + } } type NetCol struct {