Encapsulate note store more
This commit is contained in:
parent
c2b4592bc9
commit
3628fa260b
3 changed files with 22 additions and 27 deletions
|
|
@ -11,8 +11,10 @@ const repos = useReposStore();
|
|||
const notes = useNotesStore();
|
||||
const ui = useUiStore();
|
||||
|
||||
function mkNote(id: string, ...children: string[]): Note {
|
||||
return notes.addNote({ id, text: id, children });
|
||||
function mkNote(text: string, ...children: string[]): Note {
|
||||
const note = notes.createNote(text);
|
||||
children.forEach((it) => note.children.push(it));
|
||||
return note;
|
||||
}
|
||||
|
||||
function createSomeNotes() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue