Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2022-08-10 12:23:27 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2022-08-10 12:23:27 +0300
commit4c837dadf2cd8cb33621ded1da4b4ac9c3a2b5f3 (patch)
tree83b26ae4f543d624639a43bfb09e408fedaae1c9 /apps/files/js/files.js
parentf6bdaac88e9300199f5fa4eb91fc868d042d185d (diff)
Show usage percenteage in the tooltipunify-initial-and-updated-quota-display
The tooltip of the initial quota display showed the usage percenteage and the total available space. However, the total available space was redundant, as it was shown just below. The tooltip of the updated quota display showed the usage percenteage, but based on the quota rather than the total available space, so there was a mismatch between the tooltip and the bar below. Now the tooltip of the initial and the updated quota display both show just the usage percenteage based on the total available space. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 38663e13faf..8f456273f69 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -104,7 +104,7 @@
var humanUsed = OC.Util.humanFileSize(response.data.used, true);
var humanTotal = OC.Util.humanFileSize(response.data.total, true);
if (response.data.quota > 0) {
- $('#quota').attr('data-original-title', Math.floor(response.data.used/response.data.quota*1000)/10 + '%');
+ $('#quota').attr('data-original-title', t('files', '{used}%', {used: Math.round(response.data.usedSpacePercent)}));
$('#quota progress').val(response.data.usedSpacePercent);
$('#quotatext').html(t('files', '{used} of {quota} used', {used: humanUsed, quota: humanTotal}));
} else {