chore(docs): commit contents of the demo zip for diffing changes

This commit is contained in:
Elian Doran
2025-03-30 21:37:36 +03:00
parent 293314b8ef
commit 4605f9f38f
168 changed files with 15652 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
module.exports = function (note, categoryRootNote, assignedCategories, labelName, isTaskDone) {
const found = {};
for (const categoryNote of categoryRootNote.getChildNotes()) {
const label = categoryNote.getLabel(labelName);
if (label) {
found[label.value] = !isTaskDone && assignedCategories.includes(label.value);
api.toggleNoteInParent(found[label.value], note.noteId, categoryNote.noteId);
}
}
if (!isTaskDone) {
for (const assignedCategory of assignedCategories) {
if (!found[assignedCategory]) {
const categoryNote = api.createTextNote(categoryRootNote.noteId, assignedCategory, "").note;
categoryNote.addLabel(labelName, assignedCategory);
api.ensureNoteIsPresentInParent(note.noteId, categoryNote.noteId);
}
}
}
}