2021-07-28 09:13:44 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
v-if="showHead"
|
|
|
|
class="message__mail-head"
|
|
|
|
:class="{ 'is-incoming': isIncoming }"
|
|
|
|
>
|
2022-02-14 10:16:20 +00:00
|
|
|
<div v-if="fromMail" class="meta-wrap">
|
|
|
|
<span class="message__content--type">{{ $t('EMAIL_HEADER.FROM') }}:</span>
|
|
|
|
<span>{{ fromMail }}</span>
|
|
|
|
</div>
|
2021-07-28 09:13:44 +00:00
|
|
|
<div v-if="toMails" class="meta-wrap">
|
|
|
|
<span class="message__content--type">{{ $t('EMAIL_HEADER.TO') }}:</span>
|
|
|
|
<span>{{ toMails }}</span>
|
|
|
|
</div>
|
|
|
|
<div v-if="ccMails" class="meta-wrap">
|
|
|
|
<span class="message__content--type">{{ $t('EMAIL_HEADER.CC') }}:</span>
|
|
|
|
<span>{{ ccMails }}</span>
|
|
|
|
</div>
|
|
|
|
<div v-if="bccMails" class="meta-wrap">
|
|
|
|
<span class="message__content--type">{{ $t('EMAIL_HEADER.BCC') }}:</span>
|
|
|
|
<span>{{ bccMails }}</span>
|
|
|
|
</div>
|
|
|
|
<div v-if="subject" class="meta-wrap">
|
|
|
|
<span class="message__content--type">
|
|
|
|
{{ $t('EMAIL_HEADER.SUBJECT') }}:
|
|
|
|
</span>
|
|
|
|
<span>{{ subject }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
emailAttributes: {
|
2021-08-02 02:54:08 +00:00
|
|
|
type: Object,
|
2021-07-28 09:13:44 +00:00
|
|
|
default: () => ({}),
|
|
|
|
},
|
|
|
|
isIncoming: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true,
|
|
|
|
},
|
2021-10-11 07:30:48 +00:00
|
|
|
cc: {
|
|
|
|
type: Array,
|
2021-10-12 04:44:09 +00:00
|
|
|
default: () => [],
|
2021-10-11 07:30:48 +00:00
|
|
|
},
|
|
|
|
bcc: {
|
|
|
|
type: Array,
|
2021-10-12 04:44:09 +00:00
|
|
|
default: () => [],
|
|
|
|
},
|
2021-07-28 09:13:44 +00:00
|
|
|
},
|
|
|
|
computed: {
|
2022-02-14 10:16:20 +00:00
|
|
|
fromMail() {
|
2022-02-14 12:07:40 +00:00
|
|
|
const from = this.emailAttributes.from || [];
|
2022-02-14 10:16:20 +00:00
|
|
|
return from.join(', ');
|
|
|
|
},
|
2021-07-28 09:13:44 +00:00
|
|
|
toMails() {
|
|
|
|
const to = this.emailAttributes.to || [];
|
|
|
|
return to.join(', ');
|
|
|
|
},
|
|
|
|
ccMails() {
|
2021-10-11 07:30:48 +00:00
|
|
|
const cc = this.emailAttributes.cc || this.cc || [];
|
2021-07-28 09:13:44 +00:00
|
|
|
return cc.join(', ');
|
|
|
|
},
|
|
|
|
bccMails() {
|
2021-10-11 07:30:48 +00:00
|
|
|
const bcc = this.emailAttributes.bcc || this.bcc || [];
|
2021-07-28 09:13:44 +00:00
|
|
|
return bcc.join(', ');
|
|
|
|
},
|
|
|
|
subject() {
|
|
|
|
return this.emailAttributes.subject || '';
|
|
|
|
},
|
|
|
|
showHead() {
|
|
|
|
return this.toMails || this.ccMails || this.bccMails;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.message__mail-head {
|
|
|
|
padding-bottom: var(--space-small);
|
|
|
|
margin-bottom: var(--space-small);
|
|
|
|
border-bottom: 1px solid var(--w-300);
|
|
|
|
|
|
|
|
&.is-incoming {
|
|
|
|
border-bottom: 1px solid var(--color-border-light);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.meta-wrap {
|
|
|
|
.message__content--type {
|
|
|
|
font-weight: var(--font-weight-bold);
|
|
|
|
font-size: var(--font-size-mini);
|
|
|
|
}
|
|
|
|
span {
|
|
|
|
font-size: var(--font-size-mini);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|