Fix export of SSEManager for SSE connection

This commit is contained in:
Eli Ribble 2026-03-21 15:08:37 +00:00
parent cee76ddd53
commit 303b4b826b
No known key found for this signature in database
4 changed files with 163 additions and 7 deletions

View file

@ -12,10 +12,12 @@
{{ block "extraheader" . }}{{ end }}
<script>
const USER = {{ .User.AsJSON|json }};
SSEManager.subscribe("*", function (e) {
if (e.type != "heartbeat") {
updateUserState();
}
document.addEventListener("DOMContentLoaded", () => {
SSEManager.subscribe("*", function (e) {
if (e.type != "heartbeat") {
updateUserState();
}
});
});
document.addEventListener("alpine:init", () => {
Alpine.store("user", USER);