mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
prettier --write
This commit is contained in:
parent
450528ff00
commit
8a0be3212d
164 changed files with 7053 additions and 9008 deletions
|
|
@ -1,12 +1,10 @@
|
|||
|
||||
import ko from 'ko';
|
||||
import {isUnd, pInt, friendlySize, mimeContentType, getFileExtension} from 'Common/Utils';
|
||||
import { isUnd, pInt, friendlySize, mimeContentType, getFileExtension } from 'Common/Utils';
|
||||
|
||||
import {staticIconClass, staticFileType} from 'Model/Attachment';
|
||||
import {AbstractModel} from 'Knoin/AbstractModel';
|
||||
import { staticIconClass, staticFileType } from 'Model/Attachment';
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
|
||||
class ComposeAttachmentModel extends AbstractModel
|
||||
{
|
||||
class ComposeAttachmentModel extends AbstractModel {
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} fileName
|
||||
|
|
@ -16,8 +14,7 @@ class ComposeAttachmentModel extends AbstractModel
|
|||
* @param {string=} CID = ''
|
||||
* @param {string=} contentLocation = ''
|
||||
*/
|
||||
constructor(id, fileName, size = null, isInline = false, isLinked = false, CID = '', contentLocation = '')
|
||||
{
|
||||
constructor(id, fileName, size = null, isInline = false, isLinked = false, CID = '', contentLocation = '') {
|
||||
super('ComposeAttachmentModel');
|
||||
|
||||
this.id = id;
|
||||
|
|
@ -61,7 +58,14 @@ class ComposeAttachmentModel extends AbstractModel
|
|||
this.mimeType = ko.computed(() => mimeContentType(this.fileName()));
|
||||
this.fileExt = ko.computed(() => getFileExtension(this.fileName()));
|
||||
|
||||
this.regDisposables([this.progressText, this.progressStyle, this.title, this.friendlySize, this.mimeType, this.fileExt]);
|
||||
this.regDisposables([
|
||||
this.progressText,
|
||||
this.progressStyle,
|
||||
this.title,
|
||||
this.friendlySize,
|
||||
this.mimeType,
|
||||
this.fileExt
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -70,8 +74,7 @@ class ComposeAttachmentModel extends AbstractModel
|
|||
*/
|
||||
initByUploadJson(json) {
|
||||
let bResult = false;
|
||||
if (json)
|
||||
{
|
||||
if (json) {
|
||||
this.fileName(json.Name);
|
||||
this.size(isUnd(json.Size) ? 0 : pInt(json.Size));
|
||||
this.tempName(isUnd(json.TempName) ? '' : json.TempName);
|
||||
|
|
@ -98,4 +101,4 @@ class ComposeAttachmentModel extends AbstractModel
|
|||
}
|
||||
}
|
||||
|
||||
export {ComposeAttachmentModel, ComposeAttachmentModel as default};
|
||||
export { ComposeAttachmentModel, ComposeAttachmentModel as default };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue