mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
cleanup some code
This commit is contained in:
parent
df1d0fc8d6
commit
662e6b3466
4 changed files with 28 additions and 70 deletions
|
|
@ -79,39 +79,23 @@ class LoginUserView extends AbstractViewNext {
|
|||
this.additionalCode.visibility(false);
|
||||
});
|
||||
|
||||
this.password.subscribe(() => {
|
||||
this.passwordError(false);
|
||||
});
|
||||
this.password.subscribe(() => this.passwordError(false));
|
||||
|
||||
this.additionalCode.subscribe(() => {
|
||||
this.additionalCode.error(false);
|
||||
});
|
||||
this.additionalCode.subscribe(() => this.additionalCode.error(false));
|
||||
|
||||
this.additionalCode.visibility.subscribe(() => {
|
||||
this.additionalCode.error(false);
|
||||
});
|
||||
this.additionalCode.visibility.subscribe(() => this.additionalCode.error(false));
|
||||
|
||||
this.emailError.subscribe((bV) => {
|
||||
this.emailErrorAnimation(!!bV);
|
||||
});
|
||||
this.emailError.subscribe(bV => this.emailErrorAnimation(!!bV));
|
||||
|
||||
this.passwordError.subscribe((bV) => {
|
||||
this.passwordErrorAnimation(!!bV);
|
||||
});
|
||||
this.passwordError.subscribe(bV => this.passwordErrorAnimation(!!bV));
|
||||
|
||||
this.additionalCode.error.subscribe((bV) => {
|
||||
this.additionalCode.errorAnimation(!!bV);
|
||||
});
|
||||
this.additionalCode.error.subscribe(bV => this.additionalCode.errorAnimation(!!bV));
|
||||
|
||||
this.submitRequest = ko.observable(false);
|
||||
this.submitError = ko.observable('');
|
||||
this.submitErrorAddidional = ko.observable('');
|
||||
|
||||
this.submitError.subscribe((value) => {
|
||||
if (!value) {
|
||||
this.submitErrorAddidional('');
|
||||
}
|
||||
});
|
||||
this.submitError.subscribe(value => value || this.submitErrorAddidional(''));
|
||||
|
||||
this.allowLanguagesOnLogin = AppStore.allowLanguagesOnLogin;
|
||||
|
||||
|
|
@ -125,9 +109,7 @@ class LoginUserView extends AbstractViewNext {
|
|||
|
||||
this.signMeType = ko.observable(LoginSignMeType.Unused);
|
||||
|
||||
this.signMeType.subscribe((iValue) => {
|
||||
this.signMe(LoginSignMeType.DefaultOn === iValue);
|
||||
});
|
||||
this.signMeType.subscribe(iValue => this.signMe(LoginSignMeType.DefaultOn === iValue));
|
||||
|
||||
this.signMeVisibility = ko.computed(() => LoginSignMeType.Unused !== this.signMeType());
|
||||
|
||||
|
|
|
|||
|
|
@ -55,13 +55,13 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
|
||||
let lastEmail = '';
|
||||
|
||||
const createCommandReplyHelper = (type) =>
|
||||
const createCommandReplyHelper = type =>
|
||||
createCommand(() => {
|
||||
this.lastReplyAction(type);
|
||||
this.replyOrforward(type);
|
||||
}, this.canBeRepliedOrForwarded);
|
||||
}, this.canBeRepliedOrForwarded),
|
||||
|
||||
const createCommandActionHelper = (folderType, useFolder) =>
|
||||
createCommandActionHelper = (folderType, useFolder) =>
|
||||
createCommand(() => {
|
||||
const message = this.message();
|
||||
if (message && this.allowMessageListActions) {
|
||||
|
|
@ -209,10 +209,8 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
this.viewFromDkimStatusTitle = ko.computed(() => {
|
||||
const status = this.viewFromDkimData();
|
||||
if (Array.isNotEmpty(status)) {
|
||||
if (status[0] && status[1]) {
|
||||
return status[1];
|
||||
} else if (status[0]) {
|
||||
return 'DKIM: ' + status[0];
|
||||
if (status[0]) {
|
||||
return status[1] || 'DKIM: ' + status[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue