The dragging library I use supports tree like dragging, so all I have to do is implement saving / loading of that structure.
How to:
- folders will be most probably also notes
- on drag -> serialize, compare with original and save those with diff
- serialize is actually flatting a tree into a list where note name is changed to /folder/where/it/is/secret_note.js
- loading will do the opposite -> convert list to tree
- since the tree structure is "saved" in a note name (to keep it encrypted), user would be able to reorder only unlocked notes