Skip to content

Commit

Permalink
fix: show the email address as subname
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kesselberg <[email protected]>
  • Loading branch information
kesselb authored and backportbot[bot] committed Feb 13, 2025
1 parent 3c46f0c commit 117cb8e
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/components/Composer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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

View workflow job for this annotation

GitHub Actions / NPM lint

Missing JSDoc @param "option" description
* @return string

Check warning on line 1382 in src/components/Composer.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Missing JSDoc @return type
*/
showEmailAsSubname(option) {
return (option.label === option.email)
? ''
: option.email
},
},
}
</script>
Expand Down

0 comments on commit 117cb8e

Please sign in to comment.