22import moment from " moment" ;
33import { computed , ref } from " vue" ;
44import { Tab , Tabs } from " vue3-tabs-component" ;
5- import type { SMTP } from " ~/src/entities/smtp/types" ;
6- import type { NormalizedEvent , Attachment } from " ~/src/shared/types" ;
5+ import type { SMTP , Attachment } from " ~/src/entities/smtp/types" ;
6+ import type { NormalizedEvent } from " ~/src/shared/types" ;
77import {
88 TableBase ,
99 TableBaseRow ,
@@ -20,7 +20,7 @@ type Props = {
2020};
2121
2222const props = withDefaults (defineProps <Props >(), {
23- attachments: [],
23+ attachments : () => [],
2424});
2525
2626const htmlSource = ref (props .htmlSource || props .event .payload .html );
@@ -105,7 +105,7 @@ const date = computed(() =>
105105 suffix =" <span class='smtp-page__body-tab-badge'>HTML</span>"
106106 >
107107 <SmtpPagePreview device =" tablet" >
108- <div v-html =" htmlSource" />
108+ <div v-html =" htmlSource" />
109109 </SmtpPagePreview >
110110 </Tab >
111111 <Tab v-if =" isHtml" name =" HTML" >
@@ -128,18 +128,18 @@ const date = computed(() =>
128128 >
129129 <section class =" mb-5" >
130130 <div class =" flex gap-x-3" >
131- <FileAttachment
132- v-for = " a in attachments "
133- :key = " a.uuid "
134- :event-id =" event.id "
135- :event = " event "
136- :attachment = " a "
137- / >
131+ <template v-for = " a in attachments " : key = " a . uuid " >
132+ < FileAttachment
133+ :event-id = " event.id "
134+ :event =" event"
135+ :attachment = " a "
136+ />
137+ </ template >
138138 </div >
139139 </section >
140140 </Tab >
141141 <Tab name =" Raw" >
142- <CodeSnippet language =" html" :code =" event.payload.raw" />
142+ <CodeSnippet language =" html" :code =" event.payload.raw" />
143143 </Tab >
144144 <Tab name =" Tech Info" >
145145 <section >
@@ -152,22 +152,22 @@ const date = computed(() =>
152152 {{ event.payload.subject }}
153153 </TableBaseRow >
154154 <TableBaseRow title =" From" >
155- <SmtpPageAddresses :addresses =" event.payload.from" />
155+ <SmtpPageAddresses :addresses =" event.payload.from" />
156156 </TableBaseRow >
157157 <TableBaseRow title =" To" >
158- <SmtpPageAddresses :addresses =" event.payload.to" />
158+ <SmtpPageAddresses :addresses =" event.payload.to" />
159159 </TableBaseRow >
160160 <TableBaseRow v-if =" event.payload.cc.length" title =" Cc" >
161- <SmtpPageAddresses :addresses =" event.payload.cc" />
161+ <SmtpPageAddresses :addresses =" event.payload.cc" />
162162 </TableBaseRow >
163163 <TableBaseRow v-if =" event.payload.bcc.length" title =" Bcc" >
164- <SmtpPageAddresses :addresses =" event.payload.bcc" />
164+ <SmtpPageAddresses :addresses =" event.payload.bcc" />
165165 </TableBaseRow >
166166 <TableBaseRow
167167 v-if =" event.payload.reply_to.length"
168168 title =" Reply to"
169169 >
170- <SmtpPageAddresses :addresses =" event.payload.reply_to" />
170+ <SmtpPageAddresses :addresses =" event.payload.reply_to" />
171171 </TableBaseRow >
172172 </TableBase >
173173 </section >
0 commit comments