mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Update ckeditor
Move e2e tests Code refactoring
This commit is contained in:
parent
9993432c7b
commit
e5af98b04b
122 changed files with 617 additions and 561 deletions
|
|
@ -48,4 +48,4 @@ class AccountUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new AccountUserStore();
|
||||
export default new AccountUserStore();
|
||||
|
|
|
|||
|
|
@ -69,4 +69,4 @@ class AppUserStore extends AbstractAppStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new AppUserStore();
|
||||
export default new AppUserStore();
|
||||
|
|
|
|||
|
|
@ -30,4 +30,4 @@ class ContactUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new ContactUserStore();
|
||||
export default new ContactUserStore();
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@ class FilterUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new FilterUserStore();
|
||||
export default new FilterUserStore();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import {UNUSED_OPTION_VALUE} from 'Common/Consts';
|
|||
import {isArray, folderListOptionsBuilder} from 'Common/Utils';
|
||||
import {getFolderInboxName, getFolderFromCacheList} from 'Common/Cache';
|
||||
|
||||
import {momentNowUnix} from 'Common/Momentor';
|
||||
|
||||
class FolderUserStore
|
||||
{
|
||||
constructor() {
|
||||
|
|
@ -157,7 +159,7 @@ class FolderUserStore
|
|||
const
|
||||
result = [],
|
||||
limit = 5,
|
||||
utc = require('Common/Momentor').momentNowUnix(),
|
||||
utc = momentNowUnix(),
|
||||
timeout = utc - 60 * 5,
|
||||
timeouts = [],
|
||||
inboxFolderName = getFolderInboxName(),
|
||||
|
|
@ -208,4 +210,4 @@ class FolderUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new FolderUserStore();
|
||||
export default new FolderUserStore();
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ class IdentityUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new IdentityUserStore();
|
||||
export default new IdentityUserStore();
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import {MESSAGE_BODY_CACHE_LIMIT} from 'Common/Consts';
|
|||
import {data as GlobalsData, $div} from 'Common/Globals';
|
||||
import {mailBox, notificationMailIcon} from 'Common/Links';
|
||||
import {i18n, getNotification} from 'Common/Translator';
|
||||
import {momentNowUnix} from 'Common/Momentor';
|
||||
|
||||
import * as MessageHelper from 'Helper/Message';
|
||||
import {MessageModel} from 'Model/Message';
|
||||
|
|
@ -42,9 +43,11 @@ import {MessageModel} from 'Model/Message';
|
|||
import {setHash} from 'Knoin/Knoin';
|
||||
|
||||
import AppStore from 'Stores/User/App';
|
||||
import AccountStore from 'Stores/User/Account';
|
||||
import FolderStore from 'Stores/User/Folder';
|
||||
import PgpStore from 'Stores/User/Pgp';
|
||||
import SettingsStore from 'Stores/User/Settings';
|
||||
import NotificationStore from 'Stores/User/Notification';
|
||||
|
||||
import {getApp} from 'Helper/Apps/User';
|
||||
|
||||
|
|
@ -253,21 +256,18 @@ class MessageUserStore
|
|||
{
|
||||
if (isArray(newMessages) && 0 < newMessages.length)
|
||||
{
|
||||
const
|
||||
len = newMessages.length,
|
||||
NotificationStore = require('Stores/User/Notification');
|
||||
|
||||
_.each(newMessages, (item) => {
|
||||
addNewMessageCache(folder, item.Uid);
|
||||
});
|
||||
|
||||
NotificationStore.playSoundNotification();
|
||||
|
||||
const len = newMessages.length;
|
||||
if (3 < len)
|
||||
{
|
||||
NotificationStore.displayDesktopNotification(
|
||||
notificationMailIcon(),
|
||||
require('Stores/User/Account').email(),
|
||||
AccountStore.email(),
|
||||
i18n('MESSAGE_LIST/NEW_MESSAGE_NOTIFICATION', {
|
||||
'COUNT': len
|
||||
}),
|
||||
|
|
@ -551,7 +551,7 @@ class MessageUserStore
|
|||
isHtml = false;
|
||||
resultHtml = plainToHtml(data.Result.Plain.toString(), false);
|
||||
|
||||
if ((message.isPgpSigned() || message.isPgpEncrypted()) && require('Stores/User/Pgp').capaOpenPGP())
|
||||
if ((message.isPgpSigned() || message.isPgpEncrypted()) && PgpStore.capaOpenPGP())
|
||||
{
|
||||
plain = pString(data.Result.Plain);
|
||||
|
||||
|
|
@ -780,7 +780,7 @@ class MessageUserStore
|
|||
|
||||
const
|
||||
list = [],
|
||||
utc = require('Common/Momentor').momentNowUnix(),
|
||||
utc = momentNowUnix(),
|
||||
iCount = pInt(data.Result.MessageResultCount),
|
||||
iOffset = pInt(data.Result.Offset);
|
||||
|
||||
|
|
@ -876,4 +876,4 @@ class MessageUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new MessageUserStore();
|
||||
export default new MessageUserStore();
|
||||
|
|
|
|||
|
|
@ -204,4 +204,4 @@ class NotificationUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new NotificationUserStore();
|
||||
export default new NotificationUserStore();
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@ import ko from 'ko';
|
|||
import _ from '_';
|
||||
import $ from '$';
|
||||
|
||||
import {showScreenPopup} from 'Knoin/Knoin';
|
||||
|
||||
import {i18n} from 'Common/Translator';
|
||||
import {log, isArray, isNonEmptyArray, pString, isUnd, trim} from 'Common/Utils';
|
||||
|
||||
import AccountStore from 'Stores/User/Account';
|
||||
|
||||
import {showScreenPopup} from 'Knoin/Knoin';
|
||||
|
||||
class PgpUserStore
|
||||
{
|
||||
constructor() {
|
||||
|
|
@ -139,7 +141,7 @@ class PgpUserStore
|
|||
* @returns {?}
|
||||
*/
|
||||
findSelfPrivateKey(password) {
|
||||
return this.findPrivateKeyByEmail(require('Stores/User/Account').email(), password);
|
||||
return this.findPrivateKeyByEmail(AccountStore.email(), password);
|
||||
}
|
||||
|
||||
decryptMessage(message, recipients, fCallback) {
|
||||
|
|
@ -400,4 +402,4 @@ class PgpUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new PgpUserStore();
|
||||
export default new PgpUserStore();
|
||||
|
|
|
|||
|
|
@ -31,4 +31,4 @@ class QuotaUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new QuotaUserStore();
|
||||
export default new QuotaUserStore();
|
||||
|
|
|
|||
|
|
@ -78,4 +78,4 @@ class SettingsUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new SettingsUserStore();
|
||||
export default new SettingsUserStore();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import ko from 'ko';
|
||||
import _ from '_';
|
||||
|
||||
// Remote = require('Remote/User/Ajax');
|
||||
// import Remote from 'Remote/User/Ajax';
|
||||
|
||||
class TemplateUserStore
|
||||
{
|
||||
|
|
@ -35,4 +35,4 @@ class TemplateUserStore
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new TemplateUserStore();
|
||||
export default new TemplateUserStore();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue