|
|
@ -168,7 +168,6 @@ export class EditorService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async savePage(page: PageRecord): Promise<void> {
|
|
|
|
async savePage(page: PageRecord): Promise<void> {
|
|
|
|
console.log('saving page', page);
|
|
|
|
|
|
|
|
await new Promise(async (res, rej) => {
|
|
|
|
await new Promise(async (res, rej) => {
|
|
|
|
const existingLocalPage = await this.db.pages.where({ UUID: page.UUID }).first() as Page;
|
|
|
|
const existingLocalPage = await this.db.pages.where({ UUID: page.UUID }).first() as Page;
|
|
|
|
const saveData = page.toSave();
|
|
|
|
const saveData = page.toSave();
|
|
|
@ -381,7 +380,6 @@ export class EditorService {
|
|
|
|
|
|
|
|
|
|
|
|
if ( localPage ) {
|
|
|
|
if ( localPage ) {
|
|
|
|
localPage.NodeIds.push(result.data.UUID);
|
|
|
|
localPage.NodeIds.push(result.data.UUID);
|
|
|
|
console.log('saving local page data', result.data.UUID);
|
|
|
|
|
|
|
|
await localPage.save();
|
|
|
|
await localPage.save();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -446,7 +444,6 @@ export class EditorService {
|
|
|
|
baseHost.PageId = this.currentPage.UUID;
|
|
|
|
baseHost.PageId = this.currentPage.UUID;
|
|
|
|
|
|
|
|
|
|
|
|
const host = await this.saveNodeToPage(this.currentPage, baseHost);
|
|
|
|
const host = await this.saveNodeToPage(this.currentPage, baseHost);
|
|
|
|
console.log('added node to page', host);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let placed = false;
|
|
|
|
let placed = false;
|
|
|
|
if ( position === 'before' && positionNodeId ) {
|
|
|
|
if ( position === 'before' && positionNodeId ) {
|
|
|
|