mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
frontend: Fix missing getTimezones import in create-calendar-form
fixes #141
This commit is contained in:
@@ -2,6 +2,7 @@ import { html, LitElement } from "lit";
|
|||||||
import { customElement, property } from "lit/decorators.js";
|
import { customElement, property } from "lit/decorators.js";
|
||||||
import { Ref, createRef, ref } from 'lit/directives/ref.js';
|
import { Ref, createRef, ref } from 'lit/directives/ref.js';
|
||||||
import { escapeXml } from ".";
|
import { escapeXml } from ".";
|
||||||
|
import { getTimezones } from "./timezones.ts";
|
||||||
|
|
||||||
@customElement("create-calendar-form")
|
@customElement("create-calendar-form")
|
||||||
export class CreateCalendarForm extends LitElement {
|
export class CreateCalendarForm extends LitElement {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { i, x } from "./lit-DkXrt_Iv.mjs";
|
|||||||
import { n as n$1, t } from "./property-B8WoKf1Y.mjs";
|
import { n as n$1, t } from "./property-B8WoKf1Y.mjs";
|
||||||
import { e, n } from "./ref-BwbQvJBB.mjs";
|
import { e, n } from "./ref-BwbQvJBB.mjs";
|
||||||
import { e as escapeXml } from "./index-_IB1wMbZ.mjs";
|
import { e as escapeXml } from "./index-_IB1wMbZ.mjs";
|
||||||
|
import { g as getTimezones } from "./timezones-B0vBBzCP.mjs";
|
||||||
var __defProp = Object.defineProperty;
|
var __defProp = Object.defineProperty;
|
||||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||||
var __decorateClass = (decorators, target, key, kind) => {
|
var __decorateClass = (decorators, target, key, kind) => {
|
||||||
|
|||||||
@@ -2,18 +2,7 @@ import { i, x } from "./lit-DkXrt_Iv.mjs";
|
|||||||
import { n as n$1, t } from "./property-B8WoKf1Y.mjs";
|
import { n as n$1, t } from "./property-B8WoKf1Y.mjs";
|
||||||
import { e, n } from "./ref-BwbQvJBB.mjs";
|
import { e, n } from "./ref-BwbQvJBB.mjs";
|
||||||
import { e as escapeXml } from "./index-_IB1wMbZ.mjs";
|
import { e as escapeXml } from "./index-_IB1wMbZ.mjs";
|
||||||
let timezonesPromise = null;
|
import { g as getTimezones } from "./timezones-B0vBBzCP.mjs";
|
||||||
async function getTimezones() {
|
|
||||||
timezonesPromise ||= new Promise(async (resolve, reject) => {
|
|
||||||
try {
|
|
||||||
let response = await fetch("/frontend/_timezones.json");
|
|
||||||
resolve(await response.json());
|
|
||||||
} catch (e2) {
|
|
||||||
reject(e2);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return await timezonesPromise;
|
|
||||||
}
|
|
||||||
var __defProp = Object.defineProperty;
|
var __defProp = Object.defineProperty;
|
||||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||||
var __decorateClass = (decorators, target, key, kind) => {
|
var __decorateClass = (decorators, target, key, kind) => {
|
||||||
|
|||||||
15
crates/frontend/public/assets/js/timezones-B0vBBzCP.mjs
Normal file
15
crates/frontend/public/assets/js/timezones-B0vBBzCP.mjs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
let timezonesPromise = null;
|
||||||
|
async function getTimezones() {
|
||||||
|
timezonesPromise ||= new Promise(async (resolve, reject) => {
|
||||||
|
try {
|
||||||
|
let response = await fetch("/frontend/_timezones.json");
|
||||||
|
resolve(await response.json());
|
||||||
|
} catch (e) {
|
||||||
|
reject(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return await timezonesPromise;
|
||||||
|
}
|
||||||
|
export {
|
||||||
|
getTimezones as g
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user