WIP frontend isn't completely broken now
Still more work left with integrating apalis and need to fully update it. These changes are mostly for fixing the frontend I broke by eagerly updating everything.
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
import htmx from 'htmx.org';
|
||||
|
||||
// import assets so they get named with a content hash that busts caches
|
||||
// import '../css/styles.css';
|
||||
|
||||
import './localTimeController';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
htmx: typeof htmx;
|
||||
@@ -13,5 +8,16 @@ declare global {
|
||||
|
||||
window.htmx = htmx;
|
||||
|
||||
// eslint-disable-next-line import/first
|
||||
import 'htmx.org/dist/ext/sse';
|
||||
// Wait for htmx to be fully initialized before loading extensions
|
||||
document.addEventListener(
|
||||
'htmx:load',
|
||||
() => {
|
||||
import('htmx.org/dist/ext/sse');
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
|
||||
// import assets so they get named with a content hash that busts caches
|
||||
// import '../css/styles.css';
|
||||
|
||||
import './localTimeController';
|
||||
|
||||
Reference in New Issue
Block a user