Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(collection/presentation): add new view type
Elian Dorand9906a4a4751
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 4a59d0a618..092f30221b 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -767,6 +767,7 @@"table": "Table","geo-map": "Geo Map","board": "Board",+ "presentation": "Presentation","include_archived_notes": "Show archived notes"},"edited_notes": {diff --git a/apps/client/src/widgets/collections/interface.ts b/apps/client/src/widgets/collections/interface.tsindex 0b2fdb22da..91b9f301b7 100644--- a/apps/client/src/widgets/collections/interface.ts+++ b/apps/client/src/widgets/collections/interface.ts@@ -1,6 +1,6 @@import FNote from "../../entities/fnote";-export const allViewTypes = ["list", "grid", "calendar", "table", "geoMap", "board"] as const;+export const allViewTypes = ["list", "grid", "calendar", "table", "geoMap", "board", "presentation"] as const;export type ViewTypeOptions = typeof allViewTypes[number];export interface ViewModeProps<T extends object> {diff --git a/apps/client/src/widgets/ribbon/CollectionPropertiesTab.tsx b/apps/client/src/widgets/ribbon/CollectionPropertiesTab.tsxindex 8960fe46d5..3ff2835893 100644--- a/apps/client/src/widgets/ribbon/CollectionPropertiesTab.tsx+++ b/apps/client/src/widgets/ribbon/CollectionPropertiesTab.tsx@@ -19,7 +19,8 @@ const VIEW_TYPE_MAPPINGS: Record<ViewTypeOptions, string> = {calendar: t("book_properties.calendar"),table: t("book_properties.table"),geoMap: t("book_properties.geo-map"),- board: t("book_properties.board")+ board: t("book_properties.board"),+ presentation: t("book_properties.presentation")};export default function CollectionPropertiesTab({ note }: TabContext) {diff --git a/apps/client/src/widgets/ribbon/collection-properties-config.ts b/apps/client/src/widgets/ribbon/collection-properties-config.tsindex 93dbc10760..bb4dd405b3 100644--- a/apps/client/src/widgets/ribbon/collection-properties-config.ts+++ b/apps/client/src/widgets/ribbon/collection-properties-config.ts@@ -159,6 +159,9 @@ export const bookPropertiesConfig: Record<ViewTypeOptions, BookConfig> = {},board: {properties: []+ },+ presentation: {+ properties: []}};