Merge pull request #4491 from danielefranceschi/master

fix size suffix label for >1GB images
This commit is contained in:
Qian Deng 2018-03-28 18:44:43 +08:00 committed by GitHub
commit 6ca2f39186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -442,7 +442,7 @@ export class TagComponent implements OnInit, AfterViewInit {
} else if (Math.pow(1024, 2) <= size && size < Math.pow(1024, 3)) {
return (size / Math.pow(1024, 2)).toFixed(2) + "MB";
} else if (Math.pow(1024, 3) <= size && size < Math.pow(1024, 4)) {
return (size / Math.pow(1024, 3)).toFixed(2) + "MB";
return (size / Math.pow(1024, 3)).toFixed(2) + "GB";
} else {
return size + "B";
}