mirror of
https://github.com/zadam/trilium.git
synced 2025-10-02 11:35:41 +08:00
List note titles in delete confirmation (#619)
* list note titles in delete confirmation * typo
This commit is contained in:
parent
d1d8e54d20
commit
fbb77d3e55
1 changed files with 8 additions and 1 deletions
|
@ -83,7 +83,14 @@ async function moveToNode(nodesToMove, toNode) {
|
|||
async function deleteNodes(nodes) {
|
||||
nodes = await filterRootNote(nodes);
|
||||
|
||||
if (nodes.length === 0 || !await confirmDialog.confirm('Are you sure you want to delete select note(s) and all the sub-notes?')) {
|
||||
if (nodes.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const nodeTitles = nodes.map((node) => node.title);
|
||||
const confirmText = 'This will delete the following notes and their sub-notes: ' + nodeTitles.join(', ');
|
||||
|
||||
if (!await confirmDialog.confirm(confirmText)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue