Skip to content

Build your personal knowledge base with Trilium Notes

client/floating buttons: hide the "Edit note" button for the moment

Adorian Doran1a55d3433df3
diff --git a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx
index 0eb5e8e46b..9ae07b9771 100644
--- a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx
+++ b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx
@@ -99,12 +99,12 @@ function ToggleReadOnlyButton({ note, viewType, isDefaultViewMode }: FloatingBut
/>
}
-function EditButton({ note, noteContext, isDefaultViewMode }: FloatingButtonContext) {
+function EditButton({ note, noteContext }: FloatingButtonContext) {
const [animationClass, setAnimationClass] = useState("");
const {isReadOnly, enableEditing} = useIsNoteReadOnly(note, noteContext);
- // make the edit button stand out on the first display, otherwise
- // it's difficult to notice that the note is readonly
+ const isReadOnlyInfoBarDismissed = false; // TODO
+
useEffect(() => {
if (isReadOnly) {
setAnimationClass("bx-tada bx-lg");
@@ -114,7 +114,7 @@ function EditButton({ note, noteContext, isDefaultViewMode }: FloatingButtonCont
}
}, [ isReadOnly ]);
- return isReadOnly && <FloatingButton
+ return !!isReadOnly && isReadOnlyInfoBarDismissed && <FloatingButton
text={t("edit_button.edit_this_note")}
icon="bx bx-pencil"
className={animationClass}