Merge pull request #15424 from nextcloud/backport/stable16/15359
[stable16] Handle 0 B default quota properly in the web UI
This commit is contained in:
commit
fbc9249afb
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -187,9 +187,9 @@ export default {
|
|||
validateQuota(quota) {
|
||||
// only used for new presets sent through @Tag
|
||||
let validQuota = OC.Util.computerFileSize(quota);
|
||||
if (validQuota === 0) {
|
||||
if (validQuota === null) {
|
||||
return this.setDefaultQuota('none');
|
||||
} else if (validQuota !== null) {
|
||||
} else {
|
||||
// unify format output
|
||||
return this.setDefaultQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(quota)));
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ export default {
|
|||
if (this.selectedQuota !== false) {
|
||||
return this.selectedQuota;
|
||||
}
|
||||
if (OC.Util.computerFileSize(this.settings.defaultQuota) > 0) {
|
||||
if (this.settings.defaultQuota !== this.unlimitedQuota.id && OC.Util.computerFileSize(this.settings.defaultQuota) >= 0) {
|
||||
// if value is valid, let's map the quotaOptions or return custom quota
|
||||
return {id:this.settings.defaultQuota, label:this.settings.defaultQuota};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue