Improve entries navigation readability
This commit is contained in:
@@ -434,13 +434,7 @@ func (u *ui) apiTokenListPanel(gtx layout.Context) layout.Dimensions {
|
||||
layout.Rigid(layout.Spacer{Height: unit.Dp(8)}.Layout),
|
||||
layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
|
||||
if len(tokens) == 0 {
|
||||
text := "No API tokens yet."
|
||||
if strings.TrimSpace(u.search.Text()) != "" {
|
||||
text = "No API tokens match the current filter."
|
||||
}
|
||||
lbl := material.Label(u.theme, unit.Sp(14), text)
|
||||
lbl.Color = mutedColor
|
||||
return lbl.Layout(gtx)
|
||||
return emptyStatePanel(gtx, u.theme, u.listEmptyState())
|
||||
}
|
||||
return material.List(u.theme, &u.list).Layout(gtx, len(tokens), func(gtx layout.Context, i int) layout.Dimensions {
|
||||
return u.apiTokenRow(gtx, &u.apiTokenClicks[i], i, tokens[i])
|
||||
|
||||
Reference in New Issue
Block a user