Use hyperscript for rendering notifications

This commit is contained in:
Peter Stockings
2023-07-26 14:23:57 +10:00
parent bc7c15144a
commit 95b89ef9e8
3 changed files with 11 additions and 39 deletions

View File

@@ -87,9 +87,8 @@
hx-post="{{ url_for('create_topset', person_id=workout['PersonId'], workout_id=workout['WorkoutId']) }}"
hx-swap="beforeend" hx-target="#new-workout" _="on htmx:afterOnLoad if #no-workouts add .hidden to #no-workouts end
on htmx:afterRequest
js
displayNotification('Topset added')
end
render #notification-template with (message: 'Topset added') then append it to #notifications-container
then call _hyperscript.processNode(#notifications-container)
then reset() me">
<div class="flex flex-wrap -mx-3 mb-2">