Ver Fonte

gui: Round down in devices completion (consistent with folders)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4325
Simon Frei há 8 anos atrás
pai
commit
c7221b035d
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      gui/default/syncthing/core/syncthingController.js

+ 1 - 1
gui/default/syncthing/core/syncthingController.js

@@ -477,7 +477,7 @@ angular.module('syncthing.core')
                 $scope.completion[device]._total = 100;
                 $scope.completion[device]._total = 100;
                 $scope.completion[device]._needBytes = 0;
                 $scope.completion[device]._needBytes = 0;
             } else {
             } else {
-                $scope.completion[device]._total = 100 * (1 - needed / total);
+                $scope.completion[device]._total = Math.floor(100 * (1 - needed / total));
                 $scope.completion[device]._needBytes = needed
                 $scope.completion[device]._needBytes = needed
             }
             }