修复邮件列表截取文字加载图片导致大量爆红

This commit is contained in:
eoao
2025-07-04 21:11:41 +08:00
parent 6893ec6299
commit b54ed15114
8 changed files with 19 additions and 10 deletions
@@ -296,7 +296,11 @@ function htmlToText(email) {
if (email.content) {
const tempDiv = document.createElement('div');
tempDiv.innerHTML = email.content;
tempDiv.innerHTML = email.content.replace(
/<(img|iframe|object|embed|video|audio|source|link)[^>]*>/gi, ''
);
const scriptsAndStyles = tempDiv.querySelectorAll('script, style, title');
scriptsAndStyles.forEach(el => el.remove());
let text = tempDiv.textContent || tempDiv.innerText || '';
+5
View File
@@ -366,6 +366,11 @@ function submit() {
})
}
</script>
<style>
path[fill="#ffdda1"] {
fill: #ffdd7d;
}
</style>
<style scoped lang="scss">
.account-box {
+2 -2
View File
@@ -84,7 +84,7 @@ const openSelect = () => {
const params = reactive({
timeSort: 0,
type: 'all',
type: 'receive',
userEmail: null,
accountEmail: null,
name: null,
@@ -102,7 +102,7 @@ const selectTitle = computed(() => {
function refreshBefore() {
searchValue.value = null
params.timeSort = 0
params.type = 'all'
params.type = 'receive'
params.userEmail = null
params.accountEmail = null
params.name = null
+1 -1
View File
@@ -260,7 +260,7 @@
<Icon icon="logos:telegram" width="30" height="30"/>
</template>
</el-button>
<el-button @click="jump('https://github.com/arexing/cloud-mail')">
<el-button @click="jump('https://github.com/LaziestRen/cloud-mail')">
github
<template #icon>
<Icon icon="codicon:github-inverted" width="22" height="22" />
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -6,8 +6,8 @@
<title></title>
<link rel="icon" href="/assets/favicon-C5dAZutX.svg" type="image/svg+xml">
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<script type="module" crossorigin src="/assets/index-DF2JN91G.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CwHyta7E.css">
<script type="module" crossorigin src="/assets/index-Cv-M2b0c.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DIaq3OYL.css">
</head>
<body>
<div id="loading-first">