mirror of
https://github.com/zadam/trilium.git
synced 2025-12-16 21:29:56 +01:00
fix(layout): extra padding when no note title actions
This commit is contained in:
@@ -4,6 +4,8 @@ body.experimental-feature-new-layout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title-actions {
|
.title-actions {
|
||||||
padding: 0.75em 15px;
|
&.visible {
|
||||||
|
padding: 0.75em 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import "./NoteTitleActions.css";
|
import "./NoteTitleActions.css";
|
||||||
|
|
||||||
|
import clsx from "clsx";
|
||||||
|
|
||||||
import FNote from "../../entities/fnote";
|
import FNote from "../../entities/fnote";
|
||||||
import { t } from "../../services/i18n";
|
import { t } from "../../services/i18n";
|
||||||
import CollectionProperties from "../note_bars/CollectionProperties";
|
import CollectionProperties from "../note_bars/CollectionProperties";
|
||||||
@@ -12,10 +14,14 @@ export default function NoteTitleActions() {
|
|||||||
const isHiddenNote = note && note.noteId !== "_search" && note.noteId.startsWith("_");
|
const isHiddenNote = note && note.noteId !== "_search" && note.noteId.startsWith("_");
|
||||||
const noteType = useNoteProperty(note, "type");
|
const noteType = useNoteProperty(note, "type");
|
||||||
|
|
||||||
|
const items = [
|
||||||
|
note && noteType === "search" && <SearchProperties note={note} ntxId={ntxId} />,
|
||||||
|
note && !isHiddenNote && noteType === "book" && <CollectionProperties note={note} />
|
||||||
|
].filter(Boolean);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="title-actions">
|
<div className={clsx("title-actions", items.length > 0 && "visible")}>
|
||||||
{note && noteType === "search" && <SearchProperties note={note} ntxId={ntxId} />}
|
{items}
|
||||||
{note && !isHiddenNote && noteType === "book" && <CollectionProperties note={note} />}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user