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

@ -2,7 +2,7 @@ import ko from 'ko';
import { pString, defaultOptionsAfterRender } from 'Common/Utils';
import { KeyState } from 'Common/Enums';
import { Scope } from 'Common/Enums';
import { i18n } from 'Common/Translator';
import { PgpUserStore } from 'Stores/User/Pgp';
@ -88,8 +88,6 @@ class ComposeOpenPgpPopupView extends AbstractViewPopup {
}
});
this.sDefaultKeyScope = KeyState.PopupComposeOpenPGP;
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
this.deletePublickKey = this.deletePublickKey.bind(this);
@ -290,8 +288,8 @@ class ComposeOpenPgpPopupView extends AbstractViewPopup {
}
onBuild() {
// shortcuts.add('tab', 'shift', KeyState.PopupComposeOpenPGP, () => {
shortcuts.add('tab', '', KeyState.PopupComposeOpenPGP, () => {
// shortcuts.add('tab', 'shift', Scope.ComposeOpenPgp, () => {
shortcuts.add('tab', '', Scope.ComposeOpenPgp, () => {
let btn = this.querySelector('.inputPassword');
if (btn.matches(':focus')) {
btn = this.querySelector('.buttonDo');