Show new versions in bright white

This commit is contained in:
Julian Ospald 2020-10-11 21:44:11 +02:00
parent ea58465240
commit 97d568ddd6
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
1 changed files with 6 additions and 3 deletions

View File

@ -144,8 +144,12 @@ ui AppState { appData = AppData {..}, appSettings = as@(AppSettings {..}), ..}
dim = if lNoBindist
then updateAttrMap (const dimAttributes) . withAttr "no-bindist"
else id
hooray
| elem Latest lTag && not lInstalled =
withAttr "hooray"
| otherwise = id
active = if b then forceAttr "active" else id
in active $ dim
in hooray $ active $ dim
( marks
<+> (( padLeft (Pad 2)
$ minHSize 6
@ -288,6 +292,7 @@ defaultAttributes = attrMap
, ("compiled" , Vty.defAttr `Vty.withForeColor` Vty.blue)
, ("stray" , Vty.defAttr `Vty.withForeColor` Vty.blue)
, ("help" , Vty.defAttr `Vty.withStyle` Vty.italic)
, ("hooray" , Vty.defAttr `Vty.withForeColor` Vty.brightWhite)
]
@ -298,8 +303,6 @@ dimAttributes = attrMap
, ("no-bindist", Vty.defAttr `Vty.withStyle` Vty.dim)
]
eventHandler :: AppState -> BrickEvent n e -> EventM n (Next AppState)
eventHandler st (VtyEvent (Vty.EvResize _ _)) = continue st
eventHandler st (VtyEvent (Vty.EvKey (Vty.KChar 'q') _)) = halt st