diff --git a/frontend/static/js/app.js b/frontend/static/js/app.js index df0ea4fd..21f8aee3 100644 --- a/frontend/static/js/app.js +++ b/frontend/static/js/app.js @@ -92,6 +92,28 @@ angular.module("FICApp") } } }) + .filter("size", function() { + var units = [ + "o", + "kio", + "Mio", + "Gio", + "Tio", + "Pio", + "Eio", + "Zio", + "Yio", + ] + return function(input) { + var res = input; + var unit = 0; + while (res > 1024) { + unit += 1; + res = res / 1024; + } + return (Math.round(res * 100) / 100) + " " + units[unit]; + } + }) .controller("DataController", function($sce, $scope, $http, $rootScope, $timeout) { var actMenu = function() { if ($scope.my && $scope.themes) { diff --git a/frontend/static/views/theme.html b/frontend/static/views/theme.html index ace895b2..1e538078 100644 --- a/frontend/static/views/theme.html +++ b/frontend/static/views/theme.html @@ -19,24 +19,13 @@
- | Nom | -Taille | -SHA-1 | -
---|---|---|---|
- | {{ file.name }} | -{{ file.size }} | -{{ file.checksum }} |
-