mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #41264 from nextcloud/bugfix/noid/quota-0
[stable26] Show proper warning on 0 quota
This commit is contained in:
commit
a6997c8002
1 changed files with 8 additions and 3 deletions
|
|
@ -25,7 +25,7 @@
|
|||
state.call.abort();
|
||||
}
|
||||
state.dir = currentDir;
|
||||
state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats?dir={dir}', {
|
||||
state.call = $.getJSON(OC.generateUrl('apps/files/api/v1/stats?dir={dir}', {
|
||||
dir: currentDir,
|
||||
}), function(response) {
|
||||
state.dir = null;
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
},
|
||||
_updateStorageQuotas: function() {
|
||||
var state = Files.updateStorageQuotas;
|
||||
state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats'), function(response) {
|
||||
state.call = $.getJSON(OC.generateUrl('apps/files/api/v1/stats'), function(response) {
|
||||
Files.updateQuota(response);
|
||||
});
|
||||
},
|
||||
|
|
@ -70,8 +70,13 @@
|
|||
if (response === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (response.data !== undefined && response.data.free !== undefined) {
|
||||
$('#free_space').val(response.data.free);
|
||||
OCA.Files.App.fileList._updateDirectoryPermissions();
|
||||
}
|
||||
|
||||
if (response.data !== undefined && response.data.uploadMaxFilesize !== undefined) {
|
||||
$('#free_space').val(response.data.freeSpace);
|
||||
$('#upload.button').attr('title', response.data.maxHumanFilesize);
|
||||
$('#usedSpacePercent').val(response.data.usedSpacePercent);
|
||||
$('#usedSpacePercent').data('mount-type', response.data.mountType);
|
||||
|
|
|
|||
Loading…
Reference in a new issue