mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Cleanup unused login error animations
This commit is contained in:
parent
111455054e
commit
325f3c8eea
4 changed files with 12 additions and 23 deletions
|
|
@ -31,19 +31,16 @@ class LoginAdminView extends AbstractViewCenter {
|
|||
submitError: ''
|
||||
});
|
||||
|
||||
this.loginErrorAnimation = ko.observable(false).extend({ 'falseTimeout': 500 });
|
||||
this.passwordErrorAnimation = ko.observable(false).extend({ 'falseTimeout': 500 });
|
||||
|
||||
this.formError = ko.computed(() => this.loginErrorAnimation() || this.passwordErrorAnimation());
|
||||
this.formError = ko.observable(false).extend({ 'falseTimeout': 500 });
|
||||
|
||||
this.addSubscribables({
|
||||
login: () => this.loginError(false),
|
||||
|
||||
password: () => this.passwordError(false),
|
||||
|
||||
loginError: v => this.loginErrorAnimation(!!v),
|
||||
loginError: v => this.formError(!!v),
|
||||
|
||||
passwordError: v => this.passwordErrorAnimation(!!v)
|
||||
passwordError: v => this.formError(!!v)
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,16 +69,13 @@ class LoginUserView extends AbstractViewCenter {
|
|||
signMeType: LoginSignMeType.Unused
|
||||
});
|
||||
|
||||
this.additionalCodeErrorAnimation = ko.observable(false).extend({ falseTimeout: 500 });
|
||||
|
||||
this.mobile = !!Settings.app('mobile');
|
||||
this.mobileDevice = !!Settings.app('mobileDevice');
|
||||
|
||||
this.forgotPasswordLinkUrl = Settings.app('forgotPasswordLinkUrl');
|
||||
this.registrationLinkUrl = Settings.app('registrationLinkUrl');
|
||||
|
||||
this.emailErrorAnimation = ko.observable(false).extend({ falseTimeout: 500 });
|
||||
this.passwordErrorAnimation = ko.observable(false).extend({ falseTimeout: 500 });
|
||||
this.formError = ko.observable(false).extend({ falseTimeout: 500 });
|
||||
|
||||
this.allowLanguagesOnLogin = !!Settings.get('AllowLanguagesOnLogin');
|
||||
|
||||
|
|
@ -88,11 +85,6 @@ class LoginUserView extends AbstractViewCenter {
|
|||
this.bSendLanguage = false;
|
||||
|
||||
this.addComputables({
|
||||
formError:
|
||||
() =>
|
||||
this.emailErrorAnimation() ||
|
||||
this.passwordErrorAnimation() ||
|
||||
(this.additionalCodeVisibility() && this.additionalCodeErrorAnimation()),
|
||||
|
||||
languageFullName: () => convertLangName(this.language()),
|
||||
|
||||
|
|
@ -109,12 +101,12 @@ class LoginUserView extends AbstractViewCenter {
|
|||
password: () => this.passwordError(false),
|
||||
|
||||
additionalCode: () => this.additionalCodeError(false),
|
||||
additionalCodeError: bV => this.additionalCodeErrorAnimation(!!bV),
|
||||
additionalCodeError: bV => this.formError(!!bV),
|
||||
additionalCodeVisibility: () => this.additionalCodeError(false),
|
||||
|
||||
emailError: bV => this.emailErrorAnimation(!!bV),
|
||||
emailError: bV => this.formError(!!bV),
|
||||
|
||||
passwordError: bV => this.passwordErrorAnimation(!!bV),
|
||||
passwordError: bV => this.formError(!!bV),
|
||||
|
||||
submitError: value => value || this.submitErrorAddidional(''),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue