diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-08-15 11:26:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 11:26:36 +0200 |
commit | cb97e8f15c75cc46e345ebfc79dcad1b9c48bd01 (patch) | |
tree | 11e63bccd54401b5e5aeed04417a29ff8000c135 /apps/files/js | |
parent | 9704b168223bfbff4c795167d937e7907da8d253 (diff) | |
parent | 4c837dadf2cd8cb33621ded1da4b4ac9c3a2b5f3 (diff) | |
download | nextcloud-server-cb97e8f15c75cc46e345ebfc79dcad1b9c48bd01.tar.gz nextcloud-server-cb97e8f15c75cc46e345ebfc79dcad1b9c48bd01.zip |
Merge pull request #33495 from nextcloud/unify-initial-and-updated-quota-display
Unify initial and updated quota display
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/files.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 1aa39eab523..8f456273f69 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -98,14 +98,15 @@ } if (response.data !== undefined && response.data.quota !== undefined + && response.data.total !== undefined && response.data.used !== undefined && response.data.usedSpacePercent !== undefined) { var humanUsed = OC.Util.humanFileSize(response.data.used, true); - var humanQuota = OC.Util.humanFileSize(response.data.quota, 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: humanQuota})); + $('#quotatext').html(t('files', '{used} of {quota} used', {used: humanUsed, quota: humanTotal})); } else { $('#quotatext').html(t('files', '{used} used', {used: humanUsed})); } |