diff options
author | GretaD <gretadoci@gmail.com> | 2020-01-13 18:37:59 +0100 |
---|---|---|
committer | GretaD <gretadoci@gmail.com> | 2020-03-23 10:20:38 +0100 |
commit | 5cc08ac5e4fa51cde040188ed416b4e073a2a2f0 (patch) | |
tree | fc8f4b4efa0101bfab8bd1e676e856755032c652 /apps/settings/src | |
parent | 0b4c39d656e06e8be68c9f92b39bafcc0d1b2310 (diff) | |
download | nextcloud-server-5cc08ac5e4fa51cde040188ed416b4e073a2a2f0.tar.gz nextcloud-server-5cc08ac5e4fa51cde040188ed416b4e073a2a2f0.zip |
Fix unlimited and progress bar
Signed-off-by: GretaD <gretadoci@gmail.com>
Diffstat (limited to 'apps/settings/src')
-rw-r--r-- | apps/settings/src/components/UserList/UserRowSimple.vue | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/apps/settings/src/components/UserList/UserRowSimple.vue b/apps/settings/src/components/UserList/UserRowSimple.vue index a84956d2361..eb4df3a92d6 100644 --- a/apps/settings/src/components/UserList/UserRowSimple.vue +++ b/apps/settings/src/components/UserList/UserRowSimple.vue @@ -32,12 +32,15 @@ <div v-if="subAdminsGroups.length > 0 && settings.isAdmin" class="subAdminsGroups"> {{ userSubAdminsGroupsLabels }} </div> - <div v-tooltip.auto="usedSpace" class="quota"> - <progress - class="quota-user-progress" - :class="{'warn': usedQuota > 80}" - :value="usedQuota" - max="100" /> + <div class="userQuota"> + <div class="quota"> + {{ userQuota }} ({{ usedSpace }}) + <progress + class="quota-user-progress" + :class="{'warn': usedQuota > 80}" + :value="usedQuota" + max="100" /> + </div> </div> <div v-if="showConfig.showLanguages" class="languages"> {{ userLanguage.name }} @@ -55,7 +58,7 @@ </div> <div class="userActions"> - <div v-if="canEditUser(user) && !loading.all" class="toggleUserActions"> + <div v-if="canEdit && !loading.all" class="toggleUserActions"> <Actions> <ActionButton icon="icon-rename" @click="toggleEdit"> {{ t('settings', 'Edit User') }} @@ -79,6 +82,7 @@ <script> import { PopoverMenu, Actions, ActionButton } from '@nextcloud/vue' import ClickOutside from 'vue-click-outside' +import { getCurrentUser } from '@nextcloud/auth' import UserRowMixin from '../../mixins/UserRowMixin' export default { @@ -143,9 +147,19 @@ export default { } return t('settings', '{size} used', { size: OC.Util.humanFileSize(0) }) }, - canEditUser() { - return (user) => this.settings.isAdmin || user.id !== OC.getCurrentUser().uid + canEdit() { + return getCurrentUser().uid !== this.user.id && this.user.id !== 'admin' }, + userQuota() { + if (this.user.quota.quota === 'none') { + return t('settings', 'Unlimited') + } + if (this.user.quota.quota >= 0) { + return OC.Util.humanFileSize(this.user.quota.quota) + } + return OC.Util.humanFileSize(0) + }, + }, methods: { hideMenu() { |