mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Cleanup Date.fromNow() and friendlySize()
This commit is contained in:
parent
2bd9528098
commit
a0f8ac0dad
7 changed files with 28 additions and 50 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import ko from 'ko';
|
||||
import { pInt, friendlySize } from 'Common/Utils';
|
||||
import { pInt } from 'Common/Utils';
|
||||
import { File } from 'Common/File';
|
||||
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
|
|
@ -51,7 +51,7 @@ class ComposeAttachmentModel extends AbstractModel {
|
|||
|
||||
this.friendlySize = ko.computed(() => {
|
||||
const localSize = this.size();
|
||||
return null === localSize ? '' : friendlySize(localSize);
|
||||
return null === localSize ? '' : File.friendlySize(localSize);
|
||||
});
|
||||
|
||||
this.mimeType = ko.computed(() => File.getContentType(this.fileName()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue