Unified file card now supports small and medium size

Duration styling/position updated and added download date time
This commit is contained in:
Isaac Abadi
2020-08-02 18:03:29 -04:00
parent fd35153721
commit f0c4ed4590
3 changed files with 121 additions and 76 deletions

View File

@@ -17,6 +17,7 @@ export class UnifiedFileCardComponent implements OnInit {
use_youtubedl_archive = false;
@Input() file_obj = null;
@Input() card_size = 'medium';
@Output() goToFile = new EventEmitter<any>();
@Output() goToSubscription = new EventEmitter<any>();
@@ -59,6 +60,9 @@ export class UnifiedFileCardComponent implements OnInit {
}
function fancyTimeFormat(time) {
if (typeof time === 'string') {
return time;
}
// Hours, minutes and seconds
const hrs = ~~(time / 3600);
const mins = ~~((time % 3600) / 60);