mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +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
|
|
@ -16,7 +16,7 @@ import * as Local from 'Storage/Client';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { command, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { decorateKoCommands, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewCenter } from 'Knoin/AbstractViews';
|
||||
|
||||
import { Settings } from 'Common/Globals';
|
||||
|
|
@ -113,13 +113,16 @@ class LoginUserView extends AbstractViewCenter {
|
|||
if (Settings.get('AdditionalLoginError') && !this.submitError()) {
|
||||
this.submitError(Settings.get('AdditionalLoginError'));
|
||||
}
|
||||
|
||||
decorateKoCommands(this, {
|
||||
submitCommand: self => !self.submitRequest()
|
||||
});
|
||||
}
|
||||
|
||||
windowOpenFeatures(wh) {
|
||||
return `left=200,top=100,width=${wh},height=${wh},menubar=no,status=no,resizable=yes,scrollbars=yes`;
|
||||
}
|
||||
|
||||
@command((self) => !self.submitRequest())
|
||||
submitCommand() {
|
||||
this.emailError(false);
|
||||
this.passwordError(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue