feat: add app entry point, password toggle, and schedule modules
This commit is contained in:
13
static/schedule.ts
Normal file
13
static/schedule.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { onReady } from "./utils";
|
||||
|
||||
const scheduleTimezone = (): string => Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
|
||||
|
||||
const initScheduleLoader = (): void => {
|
||||
onReady(() => {
|
||||
const loader = document.querySelector<HTMLElement>("[data-schedule-loader]");
|
||||
if (!loader) return;
|
||||
loader.setAttribute("hx-vals", JSON.stringify({ timezone: scheduleTimezone() }));
|
||||
});
|
||||
};
|
||||
|
||||
initScheduleLoader();
|
||||
Reference in New Issue
Block a user