refactored TabContext => NoteContext

This commit is contained in:
zadam
2021-05-22 12:26:45 +02:00
parent 29e4e2afbb
commit 274cf7312c
54 changed files with 470 additions and 459 deletions

View File

@@ -27,7 +27,7 @@ async function setupActionsForElement(scope, $el, component) {
for (const action of actions) {
for (const shortcut of action.effectiveShortcuts) {
utils.bindElShortcut($el, shortcut, () => component.triggerCommand(action.actionName, {tabId: appContext.tabManager.activeTabId}));
utils.bindElShortcut($el, shortcut, () => component.triggerCommand(action.actionName, {ntxId: appContext.tabManager.activeTabId}));
}
}
}
@@ -35,7 +35,7 @@ async function setupActionsForElement(scope, $el, component) {
getActionsForScope("window").then(actions => {
for (const action of actions) {
for (const shortcut of action.effectiveShortcuts) {
utils.bindGlobalShortcut(shortcut, () => appContext.triggerCommand(action.actionName, {tabId: appContext.tabManager.activeTabId}));
utils.bindGlobalShortcut(shortcut, () => appContext.triggerCommand(action.actionName, {ntxId: appContext.tabManager.activeTabId}));
}
}
});
@@ -43,7 +43,7 @@ getActionsForScope("window").then(actions => {
server.get('keyboard-shortcuts-for-notes').then(shortcutForNotes => {
for (const shortcut in shortcutForNotes) {
utils.bindGlobalShortcut(shortcut, async () => {
appContext.tabManager.getActiveTabContext().setNote(shortcutForNotes[shortcut]);
appContext.tabManager.getActiveNoteContext().setNote(shortcutForNotes[shortcut]);
});
}
});