Split Common/Utils.js

Because admin app doesn't need most of them
This commit is contained in:
djmaze 2020-10-14 19:16:37 +02:00
parent 167e323c72
commit 1d6a636433
25 changed files with 592 additions and 620 deletions

View file

@ -1,4 +1,4 @@
import { encodeHtml } from 'Common/Utils';
import { encodeHtml } from 'Common/UtilsUser';
'use strict';

View file

@ -1,7 +1,8 @@
import ko from 'ko';
import { FilterRulesType, FiltersAction } from 'Common/Enums';
import { pString, delegateRunOnDestroy } from 'Common/Utils';
import { pString } from 'Common/Utils';
import { delegateRunOnDestroy } from 'Common/UtilsUser';
import { i18n } from 'Common/Translator';
import { getFolderFromCacheList } from 'Common/Cache';
@ -114,17 +115,9 @@ class FilterModel extends AbstractModel {
return result;
});
this.regDisposables(
this.name.subscribe((sValue) => {
this.name.error(!sValue);
})
);
this.regDisposables(this.name.subscribe(sValue => this.name.error(!sValue)));
this.regDisposables(
this.actionValue.subscribe((sValue) => {
this.actionValue.error(!sValue);
})
);
this.regDisposables(this.actionValue.subscribe(sValue => this.actionValue.error(!sValue)));
this.regDisposables([this.actionNoStop, this.actionTemplate]);

View file

@ -1,7 +1,7 @@
import ko from 'ko';
import { FolderType } from 'Common/Enums';
import { isPosNumeric } from 'Common/Utils';
import { isPosNumeric } from 'Common/UtilsUser';
import { i18n, trigger as translatorTrigger } from 'Common/Translator';
import { getFolderInboxName } from 'Common/Cache';

View file

@ -3,10 +3,8 @@ import ko from 'ko';
import { MessagePriority, SignedVerifyStatus } from 'Common/Enums';
import { i18n } from 'Common/Translator';
import {
pInt,
encodeHtml
} from 'Common/Utils';
import { pInt } from 'Common/Utils';
import { encodeHtml } from 'Common/UtilsUser';
import { messageViewLink, messageDownloadLink } from 'Common/Links';