mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19: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
|
|
@ -5,7 +5,7 @@ import { getNotification } from 'Common/Translator';
|
|||
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import { command } from 'Knoin/Knoin';
|
||||
import { decorateKoCommands } from 'Knoin/Knoin';
|
||||
import { AbstractViewCenter } from 'Knoin/AbstractViews';
|
||||
|
||||
class LoginAdminView extends AbstractViewCenter {
|
||||
|
|
@ -38,9 +38,12 @@ class LoginAdminView extends AbstractViewCenter {
|
|||
|
||||
passwordError: v => this.formError(!!v)
|
||||
});
|
||||
|
||||
decorateKoCommands(this, {
|
||||
submitCommand: self => !self.submitRequest()
|
||||
});
|
||||
}
|
||||
|
||||
@command((self) => !self.submitRequest())
|
||||
submitCommand() {
|
||||
this.loginError(false);
|
||||
this.passwordError(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue