mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
Made eslint using 'browser' environment and added globals, because RainLoop is used in browsers.
This also allowed to remove all webpack 'externals' overhead.
This commit is contained in:
parent
c3a213802d
commit
e7180a86ce
81 changed files with 1857 additions and 1259 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import window from 'window';
|
||||
import ko from 'ko';
|
||||
|
||||
import { FileType } from 'Common/Enums';
|
||||
|
|
@ -16,7 +15,7 @@ import { AbstractModel } from 'Knoin/AbstractModel';
|
|||
|
||||
import Audio from 'Common/Audio';
|
||||
|
||||
const bAllowPdfPreview = !bMobileDevice && undefined !== window.navigator.mimeTypes['application/pdf'];
|
||||
const bAllowPdfPreview = !bMobileDevice && undefined !== navigator.mimeTypes['application/pdf'];
|
||||
|
||||
/**
|
||||
* @param {string} sExt
|
||||
|
|
@ -405,7 +404,7 @@ class AttachmentModel extends AbstractModel {
|
|||
generateTransferDownloadUrl() {
|
||||
let link = this.linkDownload();
|
||||
if ('http' !== link.substr(0, 4)) {
|
||||
link = window.location.protocol + '//' + window.location.host + window.location.pathname + link;
|
||||
link = location.protocol + '//' + location.host + location.pathname + link;
|
||||
}
|
||||
|
||||
return this.mimeType + ':' + this.fileName + ':' + link;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import $ from '$';
|
||||
import ko from 'ko';
|
||||
import classnames from 'classnames';
|
||||
|
||||
|
|
@ -23,6 +22,8 @@ import { emailArrayFromJson, emailArrayToStringClear, emailArrayToString, replyH
|
|||
import { AttachmentModel, staticCombinedIconClass } from 'Model/Attachment';
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
|
||||
const $ = jQuery;
|
||||
|
||||
class MessageModel extends AbstractModel {
|
||||
constructor() {
|
||||
super('MessageModel');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { isNonEmptyArray, log } from 'Common/Utils';
|
||||
import { isNonEmptyArray } from 'Common/Utils';
|
||||
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ class OpenPgpKeyModel extends AbstractModel {
|
|||
return key;
|
||||
}
|
||||
} catch (e) {
|
||||
log(e);
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue