Skip to content

Commit 35995f5

Browse files
committed
Fix unlimited and progress bar
Signed-off-by: GretaD <gretadoci@gmail.com>
1 parent e8dc2ae commit 35995f5

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

apps/settings/css/settings.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,14 +1610,14 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
16101610
}
16111611

16121612
&.quota {
1613-
height: 44px;
1614-
display: flex;
1615-
align-items: center;
1616-
justify-content: center;
1613+
display: flex;;
1614+
justify-content: left;
1615+
white-space: nowrap;
1616+
position: absolute;
16171617

16181618
progress {
1619-
width: 100%;
1620-
margin: 0 10px;
1619+
width: 150px;
1620+
margin-top: 35px;
16211621
height: 3px;
16221622
}
16231623
}

apps/settings/src/components/UserList/UserRowSimple.vue

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@
3333
{{ userSubAdminsGroupsLabels }}
3434
</div>
3535
<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" />
3742
</div>
3843
<div v-if="showConfig.showLanguages" class="languages">
3944
{{ userLanguage.name }}
@@ -136,19 +141,22 @@ export default {
136141
},
137142
usedSpace() {
138143
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) })
140145
}
141-
return t('settings', 'of {size} used', { size: OC.Util.humanFileSize(0) })
146+
return t('settings', '{size} used', { size: OC.Util.humanFileSize(0) })
142147
},
143148
canEdit() {
144149
return getCurrentUser().uid !== this.user.id && this.user.id !== 'admin'
145150
},
146151
userQuota() {
152+
if (this.user.quota.quota === 'none') {
153+
return t('settings', 'Unlimited')
154+
}
147155
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)
149157
}
150-
return t('settings', '{size}', { size: OC.Util.humanFileSize(0) })
151-
}
158+
return OC.Util.humanFileSize(0)
159+
},
152160
153161
},
154162
methods: {

0 commit comments

Comments
 (0)