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
fix(collections): collection properties not shown if there are no children
Elian Doranf0d91d45f438
diff --git a/apps/client/src/widgets/note_bars/CollectionProperties.css b/apps/client/src/widgets/note_bars/CollectionProperties.cssindex 99700f77a7..c8802a42a0 100644--- a/apps/client/src/widgets/note_bars/CollectionProperties.css+++ b/apps/client/src/widgets/note_bars/CollectionProperties.css@@ -5,7 +5,7 @@align-items: center;width: 100%;max-width: unset;- font-size: 0.8em;+ font-size: 0.8rem;.dropdown-menu {input.form-control {diff --git a/apps/client/src/widgets/type_widgets/Book.tsx b/apps/client/src/widgets/type_widgets/Book.tsxindex 8dd1030c5d..6d07f5fbe3 100644--- a/apps/client/src/widgets/type_widgets/Book.tsx+++ b/apps/client/src/widgets/type_widgets/Book.tsx@@ -1,11 +1,14 @@+import "./Book.css";++import { useEffect, useState } from "preact/hooks";+import { t } from "../../services/i18n";+import { ViewTypeOptions } from "../collections/interface";+import CollectionProperties from "../note_bars/CollectionProperties";import Alert from "../react/Alert";import { useNoteLabelWithDefault, useTriliumEvent } from "../react/hooks";import RawHtml from "../react/RawHtml";import { TypeWidgetProps } from "./type_widget";-import "./Book.css";-import { useEffect, useState } from "preact/hooks";-import { ViewTypeOptions } from "../collections/interface";const VIEW_TYPES: ViewTypeOptions[] = [ "list", "grid", "presentation" ];@@ -27,10 +30,14 @@ export default function Book({ note }: TypeWidgetProps) {return (<>{shouldDisplayNoChildrenWarning && (- <Alert type="warning" className="note-detail-book-empty-help">- <RawHtml html={t("book.no_children_help")} />- </Alert>+ <>+ <CollectionProperties note={note} />++ <Alert type="warning" className="note-detail-book-empty-help">+ <RawHtml html={t("book.no_children_help")} />+ </Alert>+ </>)}</>- )+ );}