mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #33125 from nextcloud/backport/32993/stable24
[stable24] Fixes for quota text in navigation bar
This commit is contained in:
commit
6dd941aba0
3 changed files with 11 additions and 5 deletions
|
|
@ -2630,7 +2630,10 @@
|
|||
self.showFileBusyState($tr, false);
|
||||
});
|
||||
};
|
||||
return this.reportOperationProgress(fileNames, moveFileFunction, callback);
|
||||
return this.reportOperationProgress(fileNames, moveFileFunction, callback).then(function() {
|
||||
self.updateStorageStatistics();
|
||||
self.updateStorageQuotas();
|
||||
});
|
||||
},
|
||||
|
||||
_reflect: function (promise){
|
||||
|
|
@ -2810,7 +2813,10 @@
|
|||
}
|
||||
});
|
||||
};
|
||||
return this.reportOperationProgress(fileNames, copyFileFunction, callback);
|
||||
return this.reportOperationProgress(fileNames, copyFileFunction, callback).then(function() {
|
||||
self.updateStorageStatistics();
|
||||
self.updateStorageQuotas();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -105,9 +105,9 @@
|
|||
if (response.data.quota > 0) {
|
||||
$('#quota').attr('data-original-title', Math.floor(response.data.used/response.data.quota*1000)/10 + '%');
|
||||
$('#quota progress').val(response.data.usedSpacePercent);
|
||||
$('#quotatext').text(t('files', '{used} of {quota} used', {used: humanUsed, quota: humanQuota}));
|
||||
$('#quotatext').html(t('files', '{used} of {quota} used', {used: humanUsed, quota: humanQuota}));
|
||||
} else {
|
||||
$('#quotatext').text(t('files', '{used} used', {used: humanUsed}));
|
||||
$('#quotatext').html(t('files', '{used} used', {used: humanUsed}));
|
||||
}
|
||||
if (response.data.usedSpacePercent > 80) {
|
||||
$('#quota progress').addClass('warn');
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?>
|
||||
<li id="quota" class="pinned <?php p($pinned === 0 ? 'first-pinned ' : '') ?>">
|
||||
<a href="#" class="icon-quota svg">
|
||||
<p><?php p($l->t('%s used', [$_['usage']])); ?></p>
|
||||
<p id="quotatext"><?php p($l->t('%s used', [$_['usage']])); ?></p>
|
||||
</a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue