|
33 | 33 | {{ userSubAdminsGroupsLabels }} |
34 | 34 | </div> |
35 | 35 | <div class="quota"> |
36 | | - {{ userQuota }} {{ usedSpace }} |
| 36 | + {{ userQuota }} ({{ usedSpace }}) |
| 37 | + <progress |
| 38 | + class="quota-user-progress" |
| 39 | + :class="{'warn': usedQuota > 80}" |
| 40 | + :value="usedQuota" |
| 41 | + max="100" /> |
37 | 42 | </div> |
38 | 43 | <div v-if="showConfig.showLanguages" class="languages"> |
39 | 44 | {{ userLanguage.name }} |
@@ -136,19 +141,22 @@ export default { |
136 | 141 | }, |
137 | 142 | usedSpace() { |
138 | 143 | if (this.user.quota.used) { |
139 | | - return t('settings', 'of {size} used', { size: OC.Util.humanFileSize(this.user.quota.used) }) |
| 144 | + return t('settings', '{size} used', { size: OC.Util.humanFileSize(this.user.quota.used) }) |
140 | 145 | } |
141 | | - return t('settings', 'of {size} used', { size: OC.Util.humanFileSize(0) }) |
| 146 | + return t('settings', '{size} used', { size: OC.Util.humanFileSize(0) }) |
142 | 147 | }, |
143 | 148 | canEdit() { |
144 | 149 | return getCurrentUser().uid !== this.user.id && this.user.id !== 'admin' |
145 | 150 | }, |
146 | 151 | userQuota() { |
| 152 | + if (this.user.quota.quota === 'none') { |
| 153 | + return t('settings', 'Unlimited') |
| 154 | + } |
147 | 155 | if (this.user.quota.quota >= 0) { |
148 | | - return t('settings', '{size}', { size: OC.Util.humanFileSize(this.user.quota.quota) }) |
| 156 | + return OC.Util.humanFileSize(this.user.quota.quota) |
149 | 157 | } |
150 | | - return t('settings', '{size}', { size: OC.Util.humanFileSize(0) }) |
151 | | - } |
| 158 | + return OC.Util.humanFileSize(0) |
| 159 | + }, |
152 | 160 |
|
153 | 161 | }, |
154 | 162 | methods: { |
|
0 commit comments