Skip to content

Commit

Permalink
Handler.Feed: colorize package version diff as well
Browse files Browse the repository at this point in the history
  • Loading branch information
develop7 committed Dec 31, 2017
1 parent 354374b commit 7473c0c
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/Handler/Feed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ getContent sid2 snap = do
<th align=right>Old
<th align=left>New
<tbody>
$forall (pkgname@(PackageName name), VersionChange change) <- toDiffList snapDiff
$forall (pkgname@(PackageName name), VersionChange change, versionDiff) <- toVersionedDiffList snapDiff
<tr>
<th align=right>#{name}
$case change
Expand All @@ -84,10 +84,20 @@ getContent sid2 snap = do
<a href=@{packageUrl name2 pkgname new}#changes>
#{new}
$of These old new
<td align=right>
<a href=@{packageUrl name1 pkgname old}#changes>
#{old}
<td>
<a href=@{packageUrl name2 pkgname new}#changes>
#{new}
$maybe (common, left, right) <- versionDiff
<td align=right>
<a href=@{packageUrl name1 pkgname old}#changes>
#{common}#
<span style="background-color: #fcc">#{left}
<td>
<a href=@{packageUrl name2 pkgname new}#changes>
#{common}#
<span style="background-color: #cfc">#{right}
$nothing
<td align=right>
<a href=@{packageUrl name1 pkgname old}#changes>
#{old}
<td>
<a href=@{packageUrl name2 pkgname new}#changes>
#{new}
|]

0 comments on commit 7473c0c

Please sign in to comment.