feat: keyboard shortcuts for primary actions (#2030)

This commit is contained in:
Mo
2022-11-18 09:01:48 -06:00
committed by GitHub
parent 0309912f98
commit f49ba6bd4d
67 changed files with 1296 additions and 555 deletions

View File

@@ -1,4 +1,4 @@
import { confirmDialog, NavigationControllerPersistableValue } from '@standardnotes/ui-services'
import { confirmDialog, CREATE_NEW_TAG_COMMAND, NavigationControllerPersistableValue } from '@standardnotes/ui-services'
import { STRING_DELETE_TAG } from '@/Constants/Strings'
import { MAX_MENU_SIZE_MULTIPLIER, MENU_MARGIN_FROM_APP_BORDER, SMART_TAGS_FEATURE_NAME } from '@/Constants/Constants'
import {
@@ -155,6 +155,15 @@ export class NavigationController
},
),
)
this.disposers.push(
this.application.keyboardService.addCommandHandler({
command: CREATE_NEW_TAG_COMMAND,
onKeyDown: () => {
this.createNewTemplate()
},
}),
)
}
private findAndSetTag = (uuid: UuidString) => {