Cleanup Date.fromNow() and friendlySize()

This commit is contained in:
djmaze 2020-10-03 14:02:33 +02:00
parent 2bd9528098
commit a0f8ac0dad
7 changed files with 28 additions and 50 deletions

View file

@ -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()));