Add calendar toolbox with weekly and monthly scheduling
All checks were successful
Deploy Sokko G / deploy (push) Successful in 14s

This commit is contained in:
Shinuwa 2026-08-20 15:48:24 +02:00
parent 4f73e0068b
commit 992665f4ea
39 changed files with 4331 additions and 36 deletions

View file

@ -329,6 +329,77 @@ export function validateSiteContent(site) {
"toolboxes.modules.timer.emptyCountdowns",
"toolboxes.modules.timer.renameTitle",
"toolboxes.modules.timer.deleteTitle",
"toolboxes.modules.calendar.init.title",
"toolboxes.modules.calendar.init.weekly",
"toolboxes.modules.calendar.init.weeklyDescription",
"toolboxes.modules.calendar.init.monthly",
"toolboxes.modules.calendar.init.monthlyDescription",
"toolboxes.modules.calendar.init.soon",
"toolboxes.modules.calendar.gridLabel",
"toolboxes.modules.calendar.monthGridLabel",
"toolboxes.modules.calendar.titleLabel",
"toolboxes.modules.calendar.titlePlaceholder",
"toolboxes.modules.calendar.dayLabel",
"toolboxes.modules.calendar.startDayLabel",
"toolboxes.modules.calendar.endDayLabel",
"toolboxes.modules.calendar.startLabel",
"toolboxes.modules.calendar.endLabel",
"toolboxes.modules.calendar.alertModeTitle",
"toolboxes.modules.calendar.alertTypeLabel",
"toolboxes.modules.calendar.alertOffTitle",
"toolboxes.modules.calendar.alertVisibleTitle",
"toolboxes.modules.calendar.alertSiteTitle",
"toolboxes.modules.calendar.alertOffsetLabel",
"toolboxes.modules.calendar.alertOffset10",
"toolboxes.modules.calendar.alertOffset5",
"toolboxes.modules.calendar.alertOffset0",
"toolboxes.modules.calendar.alertMessage",
"toolboxes.modules.calendar.resumeAlertMessage",
"toolboxes.modules.calendar.colorLabel",
"toolboxes.modules.calendar.colorViolet",
"toolboxes.modules.calendar.colorGold",
"toolboxes.modules.calendar.colorCyan",
"toolboxes.modules.calendar.colorPink",
"toolboxes.modules.calendar.colorGreen",
"toolboxes.modules.calendar.colorGray",
"toolboxes.modules.calendar.repeatableTitle",
"toolboxes.modules.calendar.repeatLabel",
"toolboxes.modules.calendar.repeatNone",
"toolboxes.modules.calendar.repeatWeekly",
"toolboxes.modules.calendar.repeatMonthly",
"toolboxes.modules.calendar.monthlyRepeatLabel",
"toolboxes.modules.calendar.monthlyRepeatMonthDay",
"toolboxes.modules.calendar.monthlyRepeatWeekday",
"toolboxes.modules.calendar.monthDatePickerLabel",
"toolboxes.modules.calendar.previousMonthTitle",
"toolboxes.modules.calendar.nextMonthTitle",
"toolboxes.modules.calendar.currentMonthTitle",
"toolboxes.modules.calendar.previousShortLabel",
"toolboxes.modules.calendar.nextShortLabel",
"toolboxes.modules.calendar.hideEmptyHoursLabel",
"toolboxes.modules.calendar.importPlaceholder",
"toolboxes.modules.calendar.importOpenButton",
"toolboxes.modules.calendar.exportOpenButton",
"toolboxes.modules.calendar.importModalTitle",
"toolboxes.modules.calendar.exportModalTitle",
"toolboxes.modules.calendar.importButton",
"toolboxes.modules.calendar.exportButton",
"toolboxes.modules.calendar.exportInfo",
"toolboxes.modules.calendar.importSuccess",
"toolboxes.modules.calendar.exportSuccess",
"toolboxes.modules.calendar.importError",
"toolboxes.modules.calendar.addButton",
"toolboxes.modules.calendar.saveButton",
"toolboxes.modules.calendar.cancelButton",
"toolboxes.modules.calendar.editTitle",
"toolboxes.modules.calendar.copyTitle",
"toolboxes.modules.calendar.copiedTitle",
"toolboxes.modules.calendar.pastedTitle",
"toolboxes.modules.calendar.deleteTitle",
"toolboxes.modules.calendar.deleteOccurrenceTitle",
"toolboxes.modules.calendar.deleteSeriesTitle",
"toolboxes.modules.calendar.requiredError",
"toolboxes.modules.calendar.invalidRangeError",
"toolboxes.modules.taskPlanner.settingsTitle",
"toolboxes.modules.taskPlanner.settingsButtonLabel",
"toolboxes.modules.taskPlanner.hideCompletedTitle",
@ -484,7 +555,7 @@ export function validateSiteContent(site) {
});
const libraryToolDocs = valueAt(site, "library.toolDocs");
["notepad", "checklist", "counters", "images", "imageAnnotation", "links", "calculator", "table", "timer", "taskPlanner", "combos", "equipmentPlanner"].forEach((toolType) => {
["notepad", "checklist", "counters", "images", "imageAnnotation", "links", "calculator", "table", "timer", "calendar", "taskPlanner", "combos", "equipmentPlanner"].forEach((toolType) => {
const docs = libraryToolDocs?.[toolType];
assert.equal(typeof docs, "object", `library.toolDocs.${toolType} must be an object`);
assert.ok(Array.isArray(docs.controls), `library.toolDocs.${toolType}.controls must be an array`);
@ -515,9 +586,11 @@ export function validateSiteContent(site) {
});
}
});
assert.equal(typeof docs.importFormat, "object", `library.toolDocs.${toolType}.importFormat must be an object`);
assertNonEmptyString({ importFormat: docs.importFormat }, "importFormat.text");
assertNonEmptyString({ importFormat: docs.importFormat }, "importFormat.example");
if (docs.importFormat !== undefined) {
assert.equal(typeof docs.importFormat, "object", `library.toolDocs.${toolType}.importFormat must be an object`);
assertNonEmptyString({ importFormat: docs.importFormat }, "importFormat.text");
assertNonEmptyString({ importFormat: docs.importFormat }, "importFormat.example");
}
});
const aboutLimits = valueAt(site, "about.limits");
@ -695,7 +768,7 @@ export function validateLibraryData(payload) {
assert.deepEqual(new Set(twoColumnIds), moduleIds, "library.toolbox.moduleOrder.two must contain every module exactly once");
assert.equal(twoColumnIds.length, moduleIds.size, "library.toolbox.moduleOrder.two must not contain duplicate modules");
["notepad", "checklist", "images", "links", "counters", "combos", "calculator", "table", "timer", "taskPlanner", "equipmentPlanner", "imageAnnotation"].forEach((type) => {
["notepad", "checklist", "images", "links", "counters", "combos", "calculator", "table", "timer", "calendar", "taskPlanner", "equipmentPlanner", "imageAnnotation"].forEach((type) => {
assert.ok(payload.toolbox.modules.some((module) => module.type === type), `library must include a ${type} example`);
});