mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
using dynamic import for dialogs and widgets to speed up initial load
This commit is contained in:
@@ -6,7 +6,6 @@ import treeCache from "./tree_cache.js";
|
||||
import treeUtils from "./tree_utils.js";
|
||||
import hoistedNoteService from "./hoisted_note.js";
|
||||
import noteDetailService from "./note_detail.js";
|
||||
import confirmDialog from "../dialogs/confirm.js";
|
||||
|
||||
async function moveBeforeNode(nodesToMove, beforeNode) {
|
||||
nodesToMove = await filterRootNote(nodesToMove);
|
||||
@@ -90,6 +89,8 @@ async function deleteNodes(nodes) {
|
||||
const nodeTitles = $("<ul>").append(...nodes.map(node => $("<li>").text(node.title)));
|
||||
const confirmText = $("<div>").text('This will delete the following notes and their sub-notes: ').append(nodeTitles);
|
||||
|
||||
const confirmDialog = await import('../dialogs/confirm.js');
|
||||
|
||||
if (!await confirmDialog.confirm(confirmText)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user