Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable26] Show proper warning on 0 quota #41264

Merged
merged 2 commits into from Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions apps/files/js/files.js
Expand Up @@ -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;
Expand All @@ -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);
});
},
Expand Down Expand Up @@ -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) {
juliushaertl marked this conversation as resolved.
Show resolved Hide resolved
$('#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);
Expand Down