mirror of
https://github.com/zadam/trilium.git
synced 2025-12-15 12:49:53 +01:00
feat(status_bar): hide note paths in hidden notes
This commit is contained in:
@@ -42,6 +42,7 @@ export default function StatusBar() {
|
|||||||
const [ attributesShown, setAttributesShown ] = useState(false);
|
const [ attributesShown, setAttributesShown ] = useState(false);
|
||||||
const context: StatusBarContext | undefined | null = note && noteContext && { note, notePath, noteContext, viewScope, hoistedNoteId };
|
const context: StatusBarContext | undefined | null = note && noteContext && { note, notePath, noteContext, viewScope, hoistedNoteId };
|
||||||
const attributesContext: AttributesProps | undefined | null = context && { ...context, attributesShown, setAttributesShown };
|
const attributesContext: AttributesProps | undefined | null = context && { ...context, attributesShown, setAttributesShown };
|
||||||
|
const isHiddenNote = note?.isInHiddenSubtree();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="status-bar">
|
<div className="status-bar">
|
||||||
@@ -53,7 +54,7 @@ export default function StatusBar() {
|
|||||||
|
|
||||||
<div className="actions-row">
|
<div className="actions-row">
|
||||||
<LanguageSwitcher {...context} />
|
<LanguageSwitcher {...context} />
|
||||||
<NotePaths {...context} />
|
{!isHiddenNote && <NotePaths {...context} />}
|
||||||
<AttributesButton {...attributesContext} />
|
<AttributesButton {...attributesContext} />
|
||||||
<AttachmentCount {...context} />
|
<AttachmentCount {...context} />
|
||||||
<BacklinksBadge {...context} />
|
<BacklinksBadge {...context} />
|
||||||
|
|||||||
Reference in New Issue
Block a user