summaryrefslogtreecommitdiff
path: root/Omni/Jr
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-01 13:33:43 -0500
committerBen Sima <ben@bensima.com>2025-12-01 13:33:43 -0500
commit0873611b69284384ee441d6f236b6455e0d41e2b (patch)
treea72bbb172397457e4b2bc75ea0b1959993081fc3 /Omni/Jr
parent1045882e399309067c77d528dcc4d7cef3e4052c (diff)
Fix task links in Recent Activity inheriting wrong hx-target
Links inside the recent-activity div were inheriting hx-target=#activity-list from the parent, causing page content to be swapped into the list item instead of navigating. Explicitly set hx-target=body on list group items.
Diffstat (limited to 'Omni/Jr')
-rw-r--r--Omni/Jr/Web.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs
index 2b7ba21..2e4ee66 100644
--- a/Omni/Jr/Web.hs
+++ b/Omni/Jr/Web.hs
@@ -932,7 +932,10 @@ renderListGroupItem :: (Monad m) => TaskCore.Task -> Lucid.HtmlT m ()
renderListGroupItem t =
Lucid.a_
[ Lucid.class_ "list-group-item",
- Lucid.href_ ("/tasks/" <> TaskCore.taskId t)
+ Lucid.href_ ("/tasks/" <> TaskCore.taskId t),
+ Lucid.makeAttribute "hx-boost" "true",
+ Lucid.makeAttribute "hx-target" "body",
+ Lucid.makeAttribute "hx-swap" "innerHTML"
]
<| do
Lucid.div_ [Lucid.class_ "list-group-item-content"] <| do