diff --git a/src/components/DisplayContactDetails.vue b/src/components/DisplayContactDetails.vue new file mode 100644 index 0000000000..62dd9094b5 --- /dev/null +++ b/src/components/DisplayContactDetails.vue @@ -0,0 +1,36 @@ + + + diff --git a/src/components/RecipientInfo.vue b/src/components/RecipientInfo.vue index ab24c9560f..f549ba6b02 100644 --- a/src/components/RecipientInfo.vue +++ b/src/components/RecipientInfo.vue @@ -13,7 +13,7 @@
{{ recipients[0].displayName }}
-
+
@@ -33,8 +33,8 @@ -
-
+
+
@@ -46,13 +46,14 @@ import { mapGetters } from 'vuex' import IconArrowDown from 'vue-material-design-icons/ArrowDown.vue' import IconArrowUp from 'vue-material-design-icons/ArrowUp.vue' import Avatar from './Avatar.vue' -import logger from '../logger.js' +import DisplayContactDetails from './DisplayContactDetails.vue' export default { components: { Avatar, IconArrowDown, IconArrowUp, + DisplayContactDetails, }, props: { recipient: { @@ -80,28 +81,6 @@ export default { }, }, }, - async mounted() { - const mountContactDetails = window.OCA?.Contacts?.mountContactDetails - if (mountContactDetails) { - for (const [i, recipient] of this.recipients.entries()) { - const el = this.$refs[`contactDetails${i}`] - try { - this.contactDetailsVms.push(await mountContactDetails(el, recipient.email)) - } catch (error) { - logger.error(`Failed to mount contact details: ${error}`, { - error, - recipient, - }) - throw error - } - } - } - }, - async beforeDestroy() { - for (const vm of this.contactDetailsVms) { - vm.$destroy() - } - }, methods: { toggleExpand(index) { this.$set(this.expandedRecipients, index, !this.expandedRecipients[index]) @@ -139,6 +118,8 @@ export default { .recipient-multiple { margin-top: 10px; + display: flex; + flex-direction: column; } .recipient-item { @@ -175,8 +156,4 @@ span { display: block; } -.expand-toggle { - margin-left: auto; - cursor: pointer; -}