Skip to content

Build your personal knowledge base with Trilium Notes

Fix broken test

BeatLink6f4de0524956
diff --git a/apps/client/src/widgets/collections/calendar/index.tsx b/apps/client/src/widgets/collections/calendar/index.tsx
index e0ca3a8c1c..cc79ed8e40 100644
--- a/apps/client/src/widgets/collections/calendar/index.tsx
+++ b/apps/client/src/widgets/collections/calendar/index.tsx
@@ -40,15 +40,6 @@ interface CalendarViewData {
nextText: string;
}
-export const CALENDAR_SLOT_DURATIONS = {
- "00:01:00": "1 Minute",
- "00:05:00": "5 Minutes",
- "00:10:00": "10 Minutes",
- "00:20:00": "20 Minutes",
- "00:30:00": "30 Minutes",
- "01:00:00": "1 Hour"
-};
-
const CALENDAR_VIEWS = [
{
diff --git a/apps/client/src/widgets/ribbon/collection-properties-config.tsx b/apps/client/src/widgets/ribbon/collection-properties-config.tsx
index ff28a7b4d4..cc0cdff103 100644
--- a/apps/client/src/widgets/ribbon/collection-properties-config.tsx
+++ b/apps/client/src/widgets/ribbon/collection-properties-config.tsx
@@ -3,7 +3,6 @@ import { t } from "i18next";
import Component from "../../components/component";
import FNote from "../../entities/fnote";
import attributes from "../../services/attributes";
-import { CALENDAR_SLOT_DURATIONS } from "../collections/calendar/index";
import { DEFAULT_MAP_LAYER_NAME, MAP_LAYERS, type MapLayer } from "../collections/geomap/map_layer";
import { ViewTypeOptions } from "../collections/interface";
import { DEFAULT_THEME, getPresentationThemes } from "../collections/presentation/themes";
@@ -66,20 +65,28 @@ export const bookPropertiesConfig: Record<ViewTypeOptions, BookConfig> = {
icon: "bx bx-time",
type: "combobox",
bindToLabel: "calendar:slotDuration",
- options: Object.entries(CALENDAR_SLOT_DURATIONS).map(([durationId, durationLabel]) => ({
- value: durationId,
- label: durationLabel
- }))
+ options: [
+ { value: "00:01:00", label: "1 Minute" },
+ { value: "00:05:00", label: "5 Minutes" },
+ { value: "00:10:00", label: "10 Minutes" },
+ { value: "00:20:00", label: "20 Minutes" },
+ { value: "00:30:00", label: "30 Minutes" },
+ { value: "01:00:00", label: "1 Hour" }
+ ]
},
{
label: t("calendar_view.set_slot_label_interval"),
icon: "bx bx-time",
type: "combobox",
bindToLabel: "calendar:slotLabelInterval",
- options: Object.entries(CALENDAR_SLOT_DURATIONS).map(([durationId, durationLabel]) => ({
- value: durationId,
- label: durationLabel
- }))
+ options: [
+ { value: "00:01:00", label: "1 Minute" },
+ { value: "00:05:00", label: "5 Minutes" },
+ { value: "00:10:00", label: "10 Minutes" },
+ { value: "00:20:00", label: "20 Minutes" },
+ { value: "00:30:00", label: "30 Minutes" },
+ { value: "01:00:00", label: "1 Hour" }
+ ]
},
]
},