file size added
This commit is contained in:
parent
c1f6010aa5
commit
2dbe90945c
|
@ -18,6 +18,7 @@
|
|||
<p *ngIf="i.item.shared; else notShared">{{ i.item.owner }}</p>
|
||||
<ng-template #notShared>
|
||||
<p>{{i.item.lastModificationTime | date: 'dd MMM yyyy'}} </p>
|
||||
<p *ngIf="i.isFile() && i.item?.content">{{ getFileSize(i) }}</p>
|
||||
</ng-template>
|
||||
|
||||
</ion-label>
|
||||
|
|
|
@ -3,6 +3,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
import { WSItem } from '../model/ws-item';
|
||||
import { humanFileSize } from '../_helper/utils';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
|
@ -31,4 +32,9 @@ export class ItemsListComponent implements OnInit {
|
|||
this.actionSheetClickedEvent.emit(item);
|
||||
}
|
||||
|
||||
getFileSize(item: WSItem){
|
||||
if (item.isFile() && item.item?.content)
|
||||
return humanFileSize(item.item.content.size);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue