diff --git a/src/app/notebook/assistant/assistant.component.html b/src/app/notebook/assistant/assistant.component.html index c1b3e75..9e2b1cb 100644 --- a/src/app/notebook/assistant/assistant.component.html +++ b/src/app/notebook/assistant/assistant.component.html @@ -1,2 +1,2 @@ avatar.png - + diff --git a/src/app/notebook/shell/shell.ts b/src/app/notebook/shell/shell.ts index ba7896c..4e51a7e 100644 --- a/src/app/notebook/shell/shell.ts +++ b/src/app/notebook/shell/shell.ts @@ -81,7 +81,9 @@ export class Shell { ); }); environment.addEventListener('shell.ImportNotebook', async (event: CustomEvent) => { - await this.databaseManager.importDatabase(JSON.parse(await event.detail.file.text())); + const notebook = JSON.parse(await event.detail.file.text()); + await this.databaseManager.bulkInsertBlocks(notebook.blocks); + location.href = `${location.origin}?t=${notebook.blocks[0].topic}`; }); environment.addEventListener('shell.DownloadFile', (event: CustomEvent) => { downloadFile(event.detail.payload.blobParts, event.detail.payload.options);