Cleanup constants

This commit is contained in:
djmaze 2020-09-30 14:07:03 +02:00
parent 87e214aef7
commit 0a95e2c6dc
11 changed files with 40 additions and 104 deletions

View file

@ -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',

View file

@ -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);