Skip to content

Commit 117cb8e

Browse files
kesselbbackportbot[bot]
authored andcommitted
fix: show the email address as subname
Signed-off-by: Daniel Kesselberg <[email protected]>
1 parent 3c46f0c commit 117cb8e

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

src/components/Composer.vue

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@
7171
<div class="multiselect__tag multiselect__tag-custom">
7272
<ListItemIcon :no-margin="true"
7373
:name="option.label"
74-
:subtitle="option.email"
74+
:subname="showEmailAsSubname(option)"
7575
:icon-class="!option.id ? 'icon-user' : null"
76-
:url="option.photo"
77-
:avatar-size="24" />
76+
:url="option.photo" />
7877
</div>
7978
</template>
8079
</NcSelect>
@@ -128,10 +127,9 @@
128127
<div class="multiselect__tag multiselect__tag-custom">
129128
<ListItemIcon :no-margin="true"
130129
:name="option.label"
131-
:subtitle="option.email"
130+
:subname="showEmailAsSubname(option)"
132131
:url="option.photo"
133-
:icon-class="!option.id ? 'icon-user' : null"
134-
:avatar-size="24" />
132+
:icon-class="!option.id ? 'icon-user' : null" />
135133
</div>
136134
</template>
137135
</NcSelect>
@@ -179,10 +177,9 @@
179177
<div class="multiselect__tag multiselect__tag-custom">
180178
<ListItemIcon :no-margin="true"
181179
:name="option.label"
182-
:subtitle="option.email"
180+
:subname="showEmailAsSubname(option)"
183181
:url="option.photo"
184-
:icon-class="!option.id ? 'icon-user' : null"
185-
:avatar-size="24" />
182+
:icon-class="!option.id ? 'icon-user' : null" />
186183
</div>
187184
</template>
188185
</NcSelect>
@@ -1377,6 +1374,18 @@ export default {
13771374
createRecipientOption(value) {
13781375
return { email: value, label: value }
13791376
},
1377+
1378+
/**
1379+
* Use the email address as subname if we have label
1380+
*
1381+
* @param {{email: string, label: string}} option
1382+
* @return string
1383+
*/
1384+
showEmailAsSubname(option) {
1385+
return (option.label === option.email)
1386+
? ''
1387+
: option.email
1388+
},
13801389
},
13811390
}
13821391
</script>

0 commit comments

Comments
 (0)