def best_line

cswap-bend-cli@0.1.0.0 · tui/view.bend:237

import cswap-bend-cli@0.1.0.0/tui/view.bend as View
import Base
import cswap-bend-cli@0.1.0.0/tui/fmt.bend as F
import cswap-bend-cli@0.1.0.0/tui/card.bend as C

237def best_line(+m: Maybe<&2, Best>) -> List<&2, F.Seg>:
238  match m:
239    case None{}:
240      [C.muted("next best  none (no other account has a reading)")]
241    case Some{b}:
242      [C.muted("next best  "), F.sg(best_name(b), F.RAccent{}), C.muted(" · " ++ pct_label(best_free(b)) ++ "% free")]

Uses (11)

Used by (1)