mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Replace babel command decorators with proper knockout command decorators
This commit is contained in:
parent
b6d8fa5b3f
commit
540b12ed26
27 changed files with 181 additions and 132 deletions
|
|
@ -3,7 +3,7 @@ import ko from 'ko';
|
|||
import { pString } from 'Common/Utils';
|
||||
import { KeyState } from 'Common/Enums';
|
||||
|
||||
import { command } from 'Knoin/Knoin';
|
||||
import { decorateKoCommands } from 'Knoin/Knoin';
|
||||
import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||
|
||||
class MessageOpenPgpPopupView extends AbstractViewPopup {
|
||||
|
|
@ -21,9 +21,12 @@ class MessageOpenPgpPopupView extends AbstractViewPopup {
|
|||
this.resultCallback = null;
|
||||
|
||||
this.sDefaultKeyScope = KeyState.PopupMessageOpenPGP;
|
||||
|
||||
decorateKoCommands(this, {
|
||||
doCommand: self => !self.submitRequest()
|
||||
});
|
||||
}
|
||||
|
||||
@command((self) => !self.submitRequest())
|
||||
doCommand() {
|
||||
this.submitRequest(true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue