mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
Reduce JavaScript footprint
This commit is contained in:
parent
689126c57d
commit
b12852bd08
42 changed files with 240 additions and 426 deletions
|
|
@ -38,12 +38,12 @@ export class ComposeAttachmentModel extends AbstractModel {
|
|||
this.addComputables({
|
||||
progressText: () => {
|
||||
const p = this.progress();
|
||||
return 0 === p ? '' : '' + (98 < p ? 100 : p) + '%';
|
||||
return 1 > p ? '' : (100 < p ? 100 : p) + '%';
|
||||
},
|
||||
|
||||
progressStyle: () => {
|
||||
const p = this.progress();
|
||||
return 0 === p ? '' : 'width:' + (98 < p ? 100 : p) + '%';
|
||||
return 1 > p ? '' : 'width:' + (100 < p ? 100 : p) + '%';
|
||||
},
|
||||
|
||||
title: () => this.error() || this.fileName(),
|
||||
|
|
@ -54,14 +54,9 @@ export class ComposeAttachmentModel extends AbstractModel {
|
|||
},
|
||||
|
||||
mimeType: () => FileInfo.getContentType(this.fileName()),
|
||||
fileExt: () => FileInfo.getExtension(this.fileName())
|
||||
fileExt: () => FileInfo.getExtension(this.fileName()),
|
||||
|
||||
iconClass: () => FileInfo.getIconClass(this.fileExt(), this.mimeType())
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
iconClass() {
|
||||
return FileInfo.getIconClass(this.fileExt(), this.mimeType());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue