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>
|
<p *ngIf="i.item.shared; else notShared">{{ i.item.owner }}</p>
|
||||||
<ng-template #notShared>
|
<ng-template #notShared>
|
||||||
<p>{{i.item.lastModificationTime | date: 'dd MMM yyyy'}} </p>
|
<p>{{i.item.lastModificationTime | date: 'dd MMM yyyy'}} </p>
|
||||||
|
<p *ngIf="i.isFile() && i.item?.content">{{ getFileSize(i) }}</p>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
</ion-label>
|
</ion-label>
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { IonicModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
import { WSItem } from '../model/ws-item';
|
import { WSItem } from '../model/ws-item';
|
||||||
|
import { humanFileSize } from '../_helper/utils';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
standalone: true,
|
standalone: true,
|
||||||
|
@ -31,4 +32,9 @@ export class ItemsListComponent implements OnInit {
|
||||||
this.actionSheetClickedEvent.emit(item);
|
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