Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2022-10-29 11:08:57 +0300
committerdartcafe <github@dartcafe.de>2022-10-29 11:08:57 +0300
commit250124a449d2e0637c73b2551656cf03715f1790 (patch)
tree6ac3c848f5ae1465c9f96bd31eedf503793ea022 /src/js/components
parent99719c34c73c2411cf4553d062454686d1fe83f3 (diff)
final tidy
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components')
-rw-r--r--src/js/components/User/UserItem.vue34
1 files changed, 12 insertions, 22 deletions
diff --git a/src/js/components/User/UserItem.vue b/src/js/components/User/UserItem.vue
index 3eefb7ac..d5b43a3f 100644
--- a/src/js/components/User/UserItem.vue
+++ b/src/js/components/User/UserItem.vue
@@ -52,11 +52,8 @@
<div class="name">
{{ name }}
</div>
- <div v-if="type === 'admin'" class="description">
- {{ t("polls", "Is granted admin rights for this poll") }}
- </div>
- <div v-else-if="displayEmailAddress" class="description">
- {{ displayEmailAddress }}
+ <div class="description">
+ {{ description }}
</div>
</div>
@@ -66,7 +63,6 @@
<script>
import { getCurrentUser } from '@nextcloud/auth'
-
import { NcAvatar } from '@nextcloud/vue'
export default {
@@ -181,28 +177,21 @@ export default {
useIconSlot() {
return !['user', 'admin'].includes(this.type)
},
+ description() {
+ if (this.type === 'admin') return t('polls', 'Is granted admin rights for this poll')
+ if (this.displayEmailAddress) return this.displayEmailAddress
+ return ''
+ },
name() {
- if (this.type === 'public' && this.userId !== 'addPublic') {
- return t('polls', 'Public link')
- }
-
- if (this.type === 'internalAccess') {
- return t('polls', 'Internal access')
- }
-
- if (this.displayName) {
- return this.displayName
- }
-
+ if (this.type === 'public' && this.userId !== 'addPublic') return t('polls', 'Public link')
+ if (this.type === 'internalAccess') return t('polls', 'Internal access')
+ if (this.displayName) return this.displayName
return this.userId
-
},
avatarUserId() {
- if (this.isGuestComputed) {
- return this.name
- }
+ if (this.isGuestComputed) return this.name
return this.userId
},
@@ -225,6 +214,7 @@ export default {
if (this.showEmail && ['external', 'email'].includes(this.type) && this.emailAddress !== this.name) {
return this.emailAddress
}
+
return ''
},