renamed shortcuts to launchers

This commit is contained in:
zadam
2022-12-01 10:16:57 +01:00
parent b55c2d3dbc
commit 1a6c9be065
16 changed files with 164 additions and 164 deletions

View File

@@ -110,16 +110,16 @@ function getAndValidateParent(params) {
throw new Error(`Parent note "${params.parentNoteId}" not found.`);
}
if (parentNote.type === 'shortcut') {
throw new Error(`Shortcuts should not have child notes.`);
if (parentNote.type === 'launcher') {
throw new Error(`Launchers should not have child notes.`);
}
if (!params.ignoreForbiddenParents && ['lb_root'].includes(parentNote.noteId)) {
throw new Error(`Creating child notes into '${parentNote.noteId}' is not allowed.`);
}
if (['lb_availableshortcuts', 'lb_visibleshortcuts'].includes(parentNote.noteId) && params.type !== 'shortcut') {
throw new Error(`Creating child notes into '${parentNote.noteId}' is only possible for type 'shortcut'.`);
if (['lb_availablelaunchers', 'lb_visiblelaunchers'].includes(parentNote.noteId) && params.type !== 'launcher') {
throw new Error(`Creating child notes into '${parentNote.noteId}' is only possible for type 'launcher'.`);
}
return parentNote;