Skip to content

Commit

Permalink
Display scenario for obtained achievement (#1175)
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo authored Mar 24, 2023
1 parent 7d7f291 commit d52c36d
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/Swarm/TUI/View/Achievement.hs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,20 @@ singleAchievementDetails attainedMap x =
Nothing -> emptyWidget
Just attainment ->
padTop (Pad 1) $
hBox
[ txt "Obtained: "
, withAttr cyanAttr $
str $
formatTime defaultTimeLocale "%l:%M%P on %b %e, %Y" $
attainment ^. obtainedAt
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
Expand Down

0 comments on commit d52c36d

Please sign in to comment.