diff options
Diffstat (limited to 'apps/settings/src')
-rw-r--r-- | apps/settings/src/components/UserList/UserRowSimple.vue | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/apps/settings/src/components/UserList/UserRowSimple.vue b/apps/settings/src/components/UserList/UserRowSimple.vue index ebfb19465fb..d1b4e6cbb2b 100644 --- a/apps/settings/src/components/UserList/UserRowSimple.vue +++ b/apps/settings/src/components/UserList/UserRowSimple.vue @@ -154,11 +154,21 @@ export default { return getCurrentUser().uid !== this.user.id || this.settings.isAdmin }, userQuota() { - if (this.user.quota.quota === 'none') { - return t('settings', 'Unlimited') + let quota = this.user.quota.quota + + if (quota === 'default') { + quota = this.settings.defaultQuota + if (quota !== 'none') { + // convert to numeric value to match what the server would usually return + quota = OC.Util.computerFileSize(quota) + } } - if (this.user.quota.quota >= 0) { - return OC.Util.humanFileSize(this.user.quota.quota) + + // when the default quota is unlimited, the server returns -3 here, map it to "none" + if (quota === 'none' || quota === -3) { + return t('settings', 'Unlimited') + } else if (quota >= 0) { + return OC.Util.humanFileSize(quota) } return OC.Util.humanFileSize(0) }, |