mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Cleanup constants
This commit is contained in:
parent
87e214aef7
commit
0a95e2c6dc
11 changed files with 40 additions and 104 deletions
|
|
@ -17,8 +17,6 @@ import {
|
|||
pInt
|
||||
} from 'Common/Utils';
|
||||
|
||||
import { CONTACTS_PER_PAGE } from 'Common/Consts';
|
||||
|
||||
import { Selector } from 'Common/Selector';
|
||||
import { exportContactsVcf, exportContactsCsv, uploadContacts } from 'Common/Links';
|
||||
import { i18n, getNotification } from 'Common/Translator';
|
||||
|
|
@ -35,7 +33,8 @@ import { ContactPropertyModel } from 'Model/ContactProperty';
|
|||
import { popup, command, showScreenPopup, hideScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
||||
const trim = text => null == text ? "" : (text + "").trim();
|
||||
const trim = text => null == text ? "" : (text + "").trim(),
|
||||
CONTACTS_PER_PAGE = 50;
|
||||
|
||||
@popup({
|
||||
name: 'View/Popup/Contacts',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { StorageResultType, ServerSecure, Ports, Notification } from 'Common/Enums';
|
||||
import { IMAP_DEFAULT_PORT, SIEVE_DEFAULT_PORT, SMTP_DEFAULT_PORT } from 'Common/Consts';
|
||||
import { pInt, pString } from 'Common/Utils';
|
||||
import { i18n } from 'Common/Translator';
|
||||
|
||||
|
|
@ -48,16 +47,16 @@ class DomainPopupView extends AbstractViewNext {
|
|||
this.name = ko.observable('');
|
||||
|
||||
this.imapServer = ko.observable('');
|
||||
this.imapPort = ko.observable('' + IMAP_DEFAULT_PORT);
|
||||
this.imapPort = ko.observable('143');
|
||||
this.imapSecure = ko.observable(ServerSecure.None);
|
||||
this.imapShortLogin = ko.observable(false);
|
||||
this.useSieve = ko.observable(false);
|
||||
this.sieveAllowRaw = ko.observable(false);
|
||||
this.sieveServer = ko.observable('');
|
||||
this.sievePort = ko.observable('' + SIEVE_DEFAULT_PORT);
|
||||
this.sievePort = ko.observable('4190');
|
||||
this.sieveSecure = ko.observable(ServerSecure.None);
|
||||
this.smtpServer = ko.observable('');
|
||||
this.smtpPort = ko.observable('' + SMTP_DEFAULT_PORT);
|
||||
this.smtpPort = ko.observable('25');
|
||||
this.smtpSecure = ko.observable(ServerSecure.None);
|
||||
this.smtpShortLogin = ko.observable(false);
|
||||
this.smtpAuth = ko.observable(true);
|
||||
|
|
@ -368,18 +367,18 @@ class DomainPopupView extends AbstractViewNext {
|
|||
this.name('');
|
||||
|
||||
this.imapServer('');
|
||||
this.imapPort('' + IMAP_DEFAULT_PORT);
|
||||
this.imapPort('143');
|
||||
this.imapSecure(ServerSecure.None);
|
||||
this.imapShortLogin(false);
|
||||
|
||||
this.useSieve(false);
|
||||
this.sieveAllowRaw(false);
|
||||
this.sieveServer('');
|
||||
this.sievePort('' + SIEVE_DEFAULT_PORT);
|
||||
this.sievePort('4190');
|
||||
this.sieveSecure(ServerSecure.None);
|
||||
|
||||
this.smtpServer('');
|
||||
this.smtpPort('' + SMTP_DEFAULT_PORT);
|
||||
this.smtpPort('25');
|
||||
this.smtpSecure(ServerSecure.None);
|
||||
this.smtpShortLogin(false);
|
||||
this.smtpAuth(true);
|
||||
|
|
|
|||
|
|
@ -336,18 +336,12 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
if (this.newMoveToFolder() && this.mobileCheckedStateShow()) {
|
||||
if (vm && event && event.preventDefault) {
|
||||
event.preventDefault();
|
||||
if (event.stopPropagation) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
if (moveAction()) {
|
||||
AppStore.focusedState(Focused.MessageList);
|
||||
moveAction(false);
|
||||
} else {
|
||||
AppStore.focusedState(Focused.FolderList);
|
||||
moveAction(true);
|
||||
}
|
||||
let b = moveAction();
|
||||
AppStore.focusedState(b ? Focused.MessageList : Focused.FolderList);
|
||||
moveAction(!b);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -378,10 +372,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
|
||||
clearTimeout(this.iGoToUpUpOrDownDownTimeout);
|
||||
this.iGoToUpUpOrDownDownTimeout = setTimeout(() => {
|
||||
let prev = null,
|
||||
next = null,
|
||||
temp = null,
|
||||
current = null;
|
||||
let prev, next, temp, current;
|
||||
|
||||
this.messageListPagenator().find(item => {
|
||||
if (item) {
|
||||
|
|
@ -420,15 +411,9 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
useAutoSelect() {
|
||||
if (this.messageListDisableAutoSelect()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (/is:unseen/.test(this.mainMessageListSearch())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return Layout.NoPreview !== SettingsStore.layout();
|
||||
return !this.messageListDisableAutoSelect()
|
||||
&& !/is:unseen/.test(this.mainMessageListSearch())
|
||||
&& Layout.NoPreview !== SettingsStore.layout();
|
||||
}
|
||||
|
||||
searchEnterAction() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue