diff options
Diffstat (limited to 'Omni')
| -rw-r--r-- | Omni/Jr/Web.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs index 107df95..4fd77b6 100644 --- a/Omni/Jr/Web.hs +++ b/Omni/Jr/Web.hs @@ -211,9 +211,7 @@ instance Lucid.ToHtml ReadyQueuePage where Lucid.style_ readyStyles Lucid.body_ <| do Lucid.p_ <| Lucid.a_ [Lucid.href_ "/"] "← Back to Dashboard" - Lucid.h1_ <| do - "Ready Queue " - Lucid.span_ [Lucid.class_ "count-badge"] (Lucid.toHtml (tshow (length tasks))) + Lucid.h1_ <| Lucid.toHtml ("Ready Queue (" <> tshow (length tasks) <> " tasks)") if null tasks then Lucid.p_ [Lucid.class_ "empty-msg"] "No tasks are ready for work." else Lucid.div_ [Lucid.class_ "task-list"] <| traverse_ renderTask tasks @@ -693,7 +691,8 @@ server = readyQueueHandler :: Servant.Handler ReadyQueuePage readyQueueHandler = do readyTasks <- liftIO TaskCore.getReadyTasks - pure (ReadyQueuePage readyTasks) + let sortedTasks = List.sortBy (compare `on` TaskCore.taskPriority) readyTasks + pure (ReadyQueuePage sortedTasks) taskListHandler :: Servant.Handler TaskListPage taskListHandler = do |
