mirror of
https://github.com/zadam/trilium.git
synced 2026-02-19 12:14:23 +01:00
fix(collections): collection properties not shown if there are no children
This commit is contained in:
parent
cc097c5414
commit
70aa115933
@ -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 {
|
||||
|
||||
@ -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>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user