ui: use flatpickr

This commit is contained in:
undefined committed 2022-08-28 18:24:08 +08:00
1 parent f480999c0c
commit 7d67bd3993
6 files changed
+338 -27

No files matched your search

+4 -2
View File
@@ -52,8 +52,10 @@ document.addEventListener('DOMContentLoaded', async () => {
}` : ''}`;
document.body.appendChild(e);
const res = await fetch(`/constant/${UiContext.constantVersion}`, { cache: 'force-cache' });
const data = await res.json();
const [data] = await Promise.all([
(await fetch(`/constant/${UiContext.constantVersion}`, { cache: 'force-cache' })).json(),
await import('./modules'),
]);
eval(data[0]); // eslint-disable-line no-eval
data.shift();
window.Hydro.preload = data;