@@ -7,6 +7,7 @@ import { CloudDownloadRound, ReplyFilled, ForwardFilled } from '@vicons/material
7
7
import { useIsMobile } from ' ../utils/composables'
8
8
import { processItem , getDownloadEmlUrl } from ' ../utils/email-parser'
9
9
import { utcToLocalDate } from ' ../utils' ;
10
+ import ShadowHtmlComponent from " ./ShadowHtmlComponent.vue" ;
10
11
11
12
const message = useMessage ()
12
13
const isMobile = useIsMobile ()
@@ -171,7 +172,7 @@ const refresh = async () => {
171
172
}
172
173
};
173
174
174
- const backFirstPageAndRefresh = async () => {
175
+ const backFirstPageAndRefresh = async () => {
175
176
page .value = 1 ;
176
177
await refresh ();
177
178
}
@@ -380,7 +381,7 @@ onBeforeUnmount(() => {
380
381
<n-split class =" left" direction =" horizontal" :max =" 0.75" :min =" 0.25" :default-size =" mailboxSplitSize"
381
382
:on-update:size =" onSpiltSizeChange" >
382
383
<template #1 >
383
- <div style =" overflow : auto ; height : 80 vh ;" >
384
+ <div style =" overflow : auto ; min- height : 50 vh ; max-height : 100 vh ;" >
384
385
<n-list hoverable clickable >
385
386
<n-list-item v-for =" row in data" v-bind:key =" row.id" @click =" () => clickRow(row)"
386
387
:class =" mailItemClass(row)" >
@@ -396,10 +397,14 @@ onBeforeUnmount(() => {
396
397
{{ utcToLocalDate(row.created_at, useUTCDate) }}
397
398
</n-tag >
398
399
<n-tag type =" info" >
399
- FROM: {{ row.source }}
400
+ <n-ellipsis style =" max-width : 240px ;" >
401
+ {{ showEMailTo ? "FROM: " + row.source : row.source }}
402
+ </n-ellipsis >
400
403
</n-tag >
401
404
<n-tag v-if =" showEMailTo" type =" info" >
402
- TO: {{ row.address }}
405
+ <n-ellipsis style =" max-width : 240px ;" >
406
+ TO: {{ row.address }}
407
+ </n-ellipsis >
403
408
</n-tag >
404
409
</template >
405
410
</n-thing >
@@ -460,7 +465,7 @@ onBeforeUnmount(() => {
460
465
<iframe v-else-if =" useIframeShowMail" :srcdoc =" curMail.message"
461
466
style =" margin-top : 10px ;width : 100% ; height : 100% ;" >
462
467
</iframe >
463
- <div v-else v-html =" curMail.message" style =" margin-top : 10px ;" ></ div >
468
+ <ShadowHtmlComponent v-else :htmlContent =" curMail.message" style =" margin-top : 10px ;" / >
464
469
</n-card >
465
470
<n-card :bordered =" false" embedded class =" mail-item" v-else >
466
471
<n-result status =" info" :title =" t('pleaseSelectMail')" >
@@ -498,7 +503,7 @@ onBeforeUnmount(() => {
498
503
{{ utcToLocalDate(row.created_at, useUTCDate) }}
499
504
</n-tag >
500
505
<n-tag type =" info" >
501
- FROM: {{ row.source }}
506
+ {{ showEMailTo ? " FROM: " + row.source : row.source }}
502
507
</n-tag >
503
508
<n-tag v-if =" showEMailTo" type =" info" >
504
509
TO: {{ row.address }}
@@ -560,7 +565,7 @@ onBeforeUnmount(() => {
560
565
<iframe v-else-if =" useIframeShowMail" :srcdoc =" curMail.message"
561
566
style =" margin-top : 10px ;width : 100% ; height : 100% ;" >
562
567
</iframe >
563
- <div v-else v-html =" curMail.message" style =" margin-top : 10px ;" ></ div >
568
+ <ShadowHtmlComponent :key = " curMail.id " v-else :htmlContent =" curMail.message" style =" margin-top : 10px ;" / >
564
569
</n-card >
565
570
</n-drawer-content >
566
571
</n-drawer >
0 commit comments