Skip to content

Commit

Permalink
Display scenario for obtained achievement
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Mar 24, 2023
1 parent bde44b4 commit dde34ad
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/Swarm/TUI/View/Achievement.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,20 @@ singleAchievementDetails attainedMap x =
, case M.lookup x attainedMap of
Nothing -> emptyWidget
Just attainment ->
padTop (Pad 1) $
hBox
[ txt "Obtained: "
, withAttr cyanAttr $
str $
formatTime defaultTimeLocale "%l:%M%P on %b %e, %Y" $
attainment ^. obtainedAt
]
padTop (Pad 1) $ vBox [
hBox
[ txt "Obtained: "
, withAttr cyanAttr $
str $
formatTime defaultTimeLocale "%l:%M%P on %b %e, %Y" $
attainment ^. obtainedAt
]
, flip (maybe emptyWidget) (attainment ^. maybeScenarioPath) $ \s -> hBox
[ txt "Scenario: "
, withAttr cyanAttr $
str s
]
]
, padTop (Pad 1) $
hBox
[ txt "Effort: "
Expand Down

0 comments on commit dde34ad

Please sign in to comment.