-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: show the email address as subname
Signed-off-by: Daniel Kesselberg <[email protected]>
- Loading branch information
1 parent
3c46f0c
commit 117cb8e
Showing
1 changed file
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,10 +71,9 @@ | |
<div class="multiselect__tag multiselect__tag-custom"> | ||
<ListItemIcon :no-margin="true" | ||
:name="option.label" | ||
:subtitle="option.email" | ||
:subname="showEmailAsSubname(option)" | ||
:icon-class="!option.id ? 'icon-user' : null" | ||
:url="option.photo" | ||
:avatar-size="24" /> | ||
:url="option.photo" /> | ||
</div> | ||
</template> | ||
</NcSelect> | ||
|
@@ -128,10 +127,9 @@ | |
<div class="multiselect__tag multiselect__tag-custom"> | ||
<ListItemIcon :no-margin="true" | ||
:name="option.label" | ||
:subtitle="option.email" | ||
:subname="showEmailAsSubname(option)" | ||
:url="option.photo" | ||
:icon-class="!option.id ? 'icon-user' : null" | ||
:avatar-size="24" /> | ||
:icon-class="!option.id ? 'icon-user' : null" /> | ||
</div> | ||
</template> | ||
</NcSelect> | ||
|
@@ -179,10 +177,9 @@ | |
<div class="multiselect__tag multiselect__tag-custom"> | ||
<ListItemIcon :no-margin="true" | ||
:name="option.label" | ||
:subtitle="option.email" | ||
:subname="showEmailAsSubname(option)" | ||
:url="option.photo" | ||
:icon-class="!option.id ? 'icon-user' : null" | ||
:avatar-size="24" /> | ||
:icon-class="!option.id ? 'icon-user' : null" /> | ||
</div> | ||
</template> | ||
</NcSelect> | ||
|
@@ -1377,6 +1374,18 @@ export default { | |
createRecipientOption(value) { | ||
return { email: value, label: value } | ||
}, | ||
/** | ||
* Use the email address as subname if we have label | ||
* | ||
* @param {{email: string, label: string}} option | ||
Check warning on line 1381 in src/components/Composer.vue
|
||
* @return string | ||
Check warning on line 1382 in src/components/Composer.vue
|
||
*/ | ||
showEmailAsSubname(option) { | ||
return (option.label === option.email) | ||
? '' | ||
: option.email | ||
}, | ||
}, | ||
} | ||
</script> | ||
|