feat(view/calendar): add calendar entry to views

This commit is contained in:
Elian Doran 2025-02-13 22:57:30 +02:00
parent e347cdda36
commit 27168b0dc5
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View File

@ -23,6 +23,7 @@ const TPL = `
<select class="view-type-select form-select form-select-sm"> <select class="view-type-select form-select form-select-sm">
<option value="grid">${t("book_properties.grid")}</option> <option value="grid">${t("book_properties.grid")}</option>
<option value="list">${t("book_properties.list")}</option> <option value="list">${t("book_properties.list")}</option>
<option value="calendar">${t("book_properties.calendar")}</option>
</select> </select>
</div> </div>
@ -125,7 +126,7 @@ export default class BookPropertiesWidget extends NoteContextAwareWidget {
return; return;
} }
if (type !== "list" && type !== "grid") { if (![ "list", "grid", "calendar"].includes(type)) {
throw new Error(t("book_properties.invalid_view_type", { type })); throw new Error(t("book_properties.invalid_view_type", { type }));
} }

View File

@ -751,7 +751,8 @@
"collapse": "Collapse", "collapse": "Collapse",
"expand": "Expand", "expand": "Expand",
"book_properties": "Book Properties", "book_properties": "Book Properties",
"invalid_view_type": "Invalid view type '{{type}}'" "invalid_view_type": "Invalid view type '{{type}}'",
"calendar": "Calendar"
}, },
"edited_notes": { "edited_notes": {
"no_edited_notes_found": "No edited notes on this day yet...", "no_edited_notes_found": "No edited notes on this day yet...",