aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/live_notifications_updater.php
diff options
context:
space:
mode:
authorwinter2025-01-19 22:17:12 +0000
committerwinter2025-01-19 22:17:12 +0000
commit8c6dad8c48d5d730b102d9de0079fee9752b0d35 (patch)
tree2cfe07a8c7958f78c767fd0d1444c3f8fef70511 /templates/live_notifications_updater.php
parent2d9bd87fb1c565ee161f93219ce2533e8dbffe06 (diff)
implement notifications
Diffstat (limited to 'templates/live_notifications_updater.php')
-rw-r--r--templates/live_notifications_updater.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/live_notifications_updater.php b/templates/live_notifications_updater.php
new file mode 100644
index 0000000..bbf31b4
--- /dev/null
+++ b/templates/live_notifications_updater.php
@@ -0,0 +1,4 @@
+<form hidden id="liveNotificationsUpdater" hx-trigger="load delay:10s, update" hx-get="/notifications/partial"
+ hx-target="next .items" hx-swap="afterbegin" <?= ($isUpdate ?? false) ? 'hx-swap-oob="true"' : '' ?>>
+ <input type="hidden" name="since" value="<?= $since->format('c') ?>">
+</form> \ No newline at end of file