mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-31 03:52:01 +08: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(''),
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
<div class="wrapper-parent">
|
||||
<form class="wrapper submitting-pane loginForm" action="#/" data-bind="submit: submitForm, css: {'errorAnimated': formError, 'submitting': submitRequest()}">
|
||||
<div class="controls" data-bind="css: {'error': loginError, 'animated': loginErrorAnimation}">
|
||||
<div class="controls" data-bind="css: {'error': loginError}">
|
||||
<div class="input-append">
|
||||
<input type="text" class="input-block-level inputLogin"
|
||||
name="RainLoopAdminLogin" id="RainLoopAdminLogin"
|
||||
|
@ -18,7 +18,7 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls" data-bind="css: {'error': passwordError, 'animated': passwordErrorAnimation}">
|
||||
<div class="controls" data-bind="css: {'error': passwordError}">
|
||||
<div class="input-append">
|
||||
<input type="password" class="input-block-level inputPassword"
|
||||
placeholder="Password" name="RainLoopAdminPassword" id="RainLoopAdminPassword"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<form class="wrapper submitting-pane loginForm" action="#/"
|
||||
data-bind="submit: submitForm, css: {'errorAnimated': formError, 'submitting': submitRequest()}">
|
||||
<div class="controls plugin-mark-Login-TopControlGroup"
|
||||
data-bind="css: {'error': emailError, 'animated': emailErrorAnimation}">
|
||||
data-bind="css: {'error': emailError}">
|
||||
<div class="input-append">
|
||||
<input type="email" class="i18n input-block-level inputEmail"
|
||||
name="RainLoopEmail" id="RainLoopEmail"
|
||||
|
@ -29,7 +29,7 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls" data-bind="css: {'error': passwordError, 'animated': passwordErrorAnimation}">
|
||||
<div class="controls" data-bind="css: {'error': passwordError}">
|
||||
<div class="input-append">
|
||||
<input type="password" class="i18n input-block-level inputPassword"
|
||||
name="RainLoopPassword" id="RainLoopPassword"
|
||||
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="controls"
|
||||
data-bind="visible: additionalCodeVisibility(), css: {'error': additionalCodeError, 'animated': additionalCodeErrorAnimation}">
|
||||
data-bind="visible: additionalCodeVisibility(), css: {'error': additionalCodeError}">
|
||||
<div class="input-append">
|
||||
<input type="text" class="i18n input-block-level inputAdditionalCode" autocomplete="off"
|
||||
autocorrect="off" autocapitalize="off" spellcheck="false" style="padding-right: 35px;"
|
||||
|
|
Loading…
Reference in a new issue