mirror of
https://github.com/zadam/trilium.git
synced 2025-12-21 06:44:24 +01:00
fix(status_bar): unable to dismiss panes
This commit is contained in:
parent
764607314c
commit
b370512893
@ -43,17 +43,17 @@ interface StatusBarContext {
|
|||||||
|
|
||||||
export default function StatusBar() {
|
export default function StatusBar() {
|
||||||
const { note, notePath, noteContext, viewScope, hoistedNoteId } = useActiveNoteContext();
|
const { note, notePath, noteContext, viewScope, hoistedNoteId } = useActiveNoteContext();
|
||||||
const [ activePane, setActivePane ] = useState<"attributes" | "similar-notes" | null>(null);
|
const [ activePane, setActivePane ] = useState<"attributes" | "similar-notes" | false>(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 && {
|
const attributesContext: AttributesProps | undefined | null = context && {
|
||||||
...context,
|
...context,
|
||||||
attributesShown: activePane === "attributes",
|
attributesShown: activePane === "attributes",
|
||||||
setAttributesShown: () => setActivePane("attributes")
|
setAttributesShown: (shown) => setActivePane(shown && "attributes")
|
||||||
};
|
};
|
||||||
const noteInfoContext: NoteInfoContext | undefined | null = context && {
|
const noteInfoContext: NoteInfoContext | undefined | null = context && {
|
||||||
...context,
|
...context,
|
||||||
similarNotesShown: activePane === "similar-notes",
|
similarNotesShown: activePane === "similar-notes",
|
||||||
setSimilarNotesShown: () => setActivePane("similar-notes")
|
setSimilarNotesShown: (shown) => setActivePane(shown && "similar-notes")
|
||||||
};
|
};
|
||||||
const isHiddenNote = note?.isInHiddenSubtree();
|
const isHiddenNote = note?.isInHiddenSubtree();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user