Add conditional menu items and disable sticky notes at root

This commit is contained in:
Idrees Hassan
2025-11-14 00:28:14 -05:00
parent 7639c7c36a
commit 1175c40fa2
11 changed files with 144 additions and 58 deletions

View File

@@ -129,6 +129,9 @@ export function drawStickyNotes(stickyNotes, onSave, onDelete) {
* @param {(note: StickyNote) => void} onDelete
*/
export function createNewStickyNote(stickyNotes, onSave, onDelete) {
if (getContext().areStickyNotesEnabled() === false) {
return;
}
const id = Date.now().toString();
const site = getContext().getPath();
const stickyNote = new StickyNote(id, site, "");