launchbar WIP

This commit is contained in:
zadam
2022-08-07 13:23:03 +02:00
parent 8d608c3c1c
commit fc920becac
6 changed files with 50 additions and 5 deletions

View File

@@ -1508,4 +1508,32 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
noteCreateService.duplicateSubtree(nodeToDuplicate.data.noteId, branch.parentNoteId);
}
}
moveShortcutToVisibleCommand({node, selectedOrActiveBranchIds}) {
branchService.moveToParentNote(selectedOrActiveBranchIds, 'lb_visibleshortcuts');
}
moveShortcutToAvailableCommand({node, selectedOrActiveBranchIds}) {
branchService.moveToParentNote(selectedOrActiveBranchIds, 'lb_availableshortcuts');
}
addNoteShortcutCommand({node}) {
this.createShortcutNote(node, 'note');
}
addWidgetShortcutCommand({node}) {
this.createShortcutNote(node, 'widget');
}
addSpacerShortcutCommand({node}) {
this.createShortcutNote(node, 'spacer');
}
async createShortcutNote(node, type) {
const resp = await server.post(`special-notes/shortcuts/${node.data.noteId}/${type}`);
if (!resp.success) {
alert(resp.message);
}
}
}