mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 22:35:50 +01:00
fix(react/floating_buttons): backlinks affecting show/hide button
This commit is contained in:
@@ -100,6 +100,10 @@
|
||||
margin-left: 5px !important;
|
||||
}
|
||||
|
||||
.close-floating-buttons:first-child {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.close-floating-buttons-button {
|
||||
border: 1px solid transparent;
|
||||
color: var(--button-text-color);
|
||||
|
||||
@@ -331,7 +331,7 @@ function InAppHelpButton({ note }: FloatingButtonContext) {
|
||||
|
||||
function Backlinks({ note }: FloatingButtonContext) {
|
||||
let [ backlinkCount, setBacklinkCount ] = useState(0);
|
||||
let [ popupOpen, setPopupOpen ] = useState(true);
|
||||
let [ popupOpen, setPopupOpen ] = useState(false);
|
||||
const backlinksContainerRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -351,9 +351,8 @@ function Backlinks({ note }: FloatingButtonContext) {
|
||||
}
|
||||
}, [ popupOpen, windowHeight ]);
|
||||
|
||||
return (
|
||||
return (backlinkCount > 0 &&
|
||||
<div className="backlinks-widget has-overflow">
|
||||
{backlinkCount > 0 && <>
|
||||
<div
|
||||
className="backlinks-ticker"
|
||||
onClick={() => setPopupOpen(!popupOpen)}
|
||||
@@ -366,7 +365,6 @@ function Backlinks({ note }: FloatingButtonContext) {
|
||||
<BacklinksList noteId={note.noteId} />
|
||||
</div>
|
||||
)}
|
||||
</>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user