Cleanup AppUserStore

Simplify KeyState/Focused as Scope enum
This commit is contained in:
djmaze 2021-03-16 16:06:16 +01:00
parent 62cb918180
commit eff92c3152
27 changed files with 177 additions and 232 deletions

View file

@ -1,7 +1,7 @@
import ko from 'ko';
import { pString } from 'Common/Utils';
import { KeyState } from 'Common/Enums';
import { Scope } from 'Common/Enums';
import { decorateKoCommands } from 'Knoin/Knoin';
import { AbstractViewPopup } from 'Knoin/AbstractViews';
@ -20,8 +20,6 @@ class MessageOpenPgpPopupView extends AbstractViewPopup {
this.resultCallback = null;
this.sDefaultKeyScope = KeyState.PopupMessageOpenPGP;
decorateKoCommands(this, {
doCommand: self => !self.submitRequest()
});
@ -77,8 +75,8 @@ class MessageOpenPgpPopupView extends AbstractViewPopup {
}
onBuild(oDom) {
// shortcuts.add('tab', 'shift', KeyState.PopupMessageOpenPGP, () => {
shortcuts.add('tab', '', KeyState.PopupMessageOpenPGP, () => {
// shortcuts.add('tab', 'shift', Scope.MessageOpenPgp, () => {
shortcuts.add('tab', '', Scope.MessageOpenPgp, () => {
let btn = this.querySelector('.inputPassword');
if (btn.matches(':focus')) {
btn = this.querySelector('.buttonDo');