mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 22:35:50 +01:00
client: allow the isNoteReadOnly hook operate on a note and context other of the current one
This commit is contained in:
@@ -101,7 +101,7 @@ function ToggleReadOnlyButton({ note, viewType, isDefaultViewMode }: FloatingBut
|
||||
|
||||
function EditButton({ note, noteContext, isDefaultViewMode }: FloatingButtonContext) {
|
||||
const [animationClass, setAnimationClass] = useState("");
|
||||
const {isReadOnly, enableEditing} = useIsNoteReadOnly();
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user