From 18a811aa3132a78059bb6282f8ff8eb8cb3bd65a Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Thu, 20 Jul 2017 17:34:53 -0700 Subject: [PATCH] less wiggle --- frontend/src/download.js | 2 +- frontend/src/upload.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/download.js b/frontend/src/download.js index de25bf14..5aa951eb 100644 --- a/frontend/src/download.js +++ b/frontend/src/download.js @@ -30,7 +30,7 @@ $(document).ready(function() { // update progress bar $('#dl-progress').circleProgress('value', percent); $('.percent-number').html(`${Math.floor(percent * 100)}`); - $('.progress-text').text(`${filename} (${bytes(progress[0])} of ${bytes(progress[1])})`); + $('.progress-text').text(`${filename} (${bytes(progress[0], {decimalPlaces: 1, fixedDecimals: true})} of ${bytes(progress[1], {decimalPlaces: 1})})`); //on complete if (percent === 1) { fileReceiver.removeAllListeners('progress'); diff --git a/frontend/src/upload.js b/frontend/src/upload.js index af2b0ee2..3a78a853 100644 --- a/frontend/src/upload.js +++ b/frontend/src/upload.js @@ -114,7 +114,7 @@ $(document).ready(function() { $('#ul-progress').circleProgress().on('circle-animation-end', function() { $('.percent-number').html(`${Math.floor(percent * 100)}`); }); - $('.progress-text').text(`${file.name} (${bytes(progress[0])} of ${bytes(progress[1])})`); + $('.progress-text').text(`${file.name} (${bytes(progress[0], {decimalPlaces: 1, fixedDecimals: true})} of ${bytes(progress[1], {decimalPlaces: 1})})`); }); fileSender.on('loading', isStillLoading => {