diff --git a/gdn-app/src/components/CNote.vue b/gdn-app/src/components/CNote.vue index 434f296..ca28302 100644 --- a/gdn-app/src/components/CNote.vue +++ b/gdn-app/src/components/CNote.vue @@ -137,6 +137,29 @@ function onInsertEditorFinish(text: string): void { onInsertEditorClose(); } + +function onInsertEditorMove(): void { + if (!ui.pinned) return; + if (insertIndex.value === undefined) return; + + if (ui.pinned.parentId) { + notes.removeChild(ui.pinned.parentId, ui.pinned.segment); + } + + notes.addChild(segment.id, ui.pinned.segment.id, insertIndex.value); + + onInsertEditorClose(); + ui.unsetPinned(); +} + +function onInsertEditorCopy(): void { + if (!ui.pinned) return; + if (insertIndex.value === undefined) return; + + notes.addChild(segment.id, ui.pinned.segment.id, insertIndex.value); + + onInsertEditorClose(); +} diff --git a/gdn-app/src/components/CNoteEditor.vue b/gdn-app/src/components/CNoteEditor.vue index 908504a..8974f77 100644 --- a/gdn-app/src/components/CNoteEditor.vue +++ b/gdn-app/src/components/CNoteEditor.vue @@ -1,14 +1,15 @@