mirror of
https://github.com/schroinerxy/cloud-mail.git
synced 2026-06-21 19:35:50 +08:00
修复星标邮件列表不同步和图表空数据不为0
This commit is contained in:
@@ -272,6 +272,15 @@ watch(() => emailStore.cancelStarEmailId, () => {
|
||||
emailList.forEach(email => {
|
||||
if (email.emailId === emailStore.cancelStarEmailId) {
|
||||
email.isStar = 0
|
||||
console.log('取消')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
watch(() => emailStore.addStarEmailId, () => {
|
||||
emailList.forEach(email => {
|
||||
if (email.emailId === emailStore.addStarEmailId) {
|
||||
email.isStar = 1
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
data-callback="onTurnstileSuccess"
|
||||
></div>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="setNameShow" title="修改名字" >
|
||||
<el-dialog v-model="setNameShow" title="修改用户名" >
|
||||
<div class="container">
|
||||
<el-input v-model="accountName" type="text" placeholder="名字" autocomplete="off">
|
||||
</el-input>
|
||||
|
||||
@@ -6,6 +6,7 @@ export const useEmailStore = defineStore('email', {
|
||||
starScroll: null,
|
||||
emailScroll: null,
|
||||
cancelStarEmailId: 0,
|
||||
addStarEmailId: 0,
|
||||
contentData: {
|
||||
email: null,
|
||||
delType: null,
|
||||
|
||||
@@ -140,6 +140,8 @@ function changeStar() {
|
||||
email.isStar = 0;
|
||||
starCancel(email.emailId).then(() => {
|
||||
email.isStar = 0;
|
||||
emailStore.cancelStarEmailId = email.emailId
|
||||
setTimeout(() => emailStore.cancelStarEmailId = 0)
|
||||
emailStore.starScroll?.deleteEmail([email.emailId])
|
||||
}).catch((e) => {
|
||||
console.error(e)
|
||||
@@ -149,6 +151,8 @@ function changeStar() {
|
||||
email.isStar = 1;
|
||||
starAdd(email.emailId).then(() => {
|
||||
email.isStar = 1;
|
||||
emailStore.addStarEmailId = email.emailId
|
||||
setTimeout(() => emailStore.addStarEmailId = 0)
|
||||
emailStore.starScroll?.addItem(email)
|
||||
}).catch((e) => {
|
||||
console.error(e)
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -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-rQqpL7nd.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CiK_6qYX.css">
|
||||
<script type="module" crossorigin src="/assets/index-B6UdP6by.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-cz2gG5da.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="loading-first">
|
||||
|
||||
@@ -2,18 +2,18 @@ const analysisDao = {
|
||||
async numberCount(c) {
|
||||
const { results } = await c.env.db.prepare(`
|
||||
SELECT
|
||||
e.receiveTotal,
|
||||
e.sendTotal,
|
||||
e.delReceiveTotal,
|
||||
e.delSendTotal,
|
||||
e.normalReceiveTotal,
|
||||
e.normalSendTotal,
|
||||
u.userTotal,
|
||||
u.normalUserTotal,
|
||||
u.delUserTotal,
|
||||
a.accountTotal,
|
||||
a.normalAccountTotal,
|
||||
a.delAccountTotal
|
||||
COALESCE(e.receiveTotal, 0) AS receiveTotal,
|
||||
COALESCE(e.sendTotal, 0) AS sendTotal,
|
||||
COALESCE(e.delReceiveTotal, 0) AS delReceiveTotal,
|
||||
COALESCE(e.delSendTotal, 0) AS delSendTotal,
|
||||
COALESCE(e.normalReceiveTotal, 0) AS normalReceiveTotal,
|
||||
COALESCE(e.normalSendTotal, 0) AS normalSendTotal,
|
||||
COALESCE(u.userTotal, 0) AS userTotal,
|
||||
COALESCE(u.normalUserTotal, 0) AS normalUserTotal,
|
||||
COALESCE(u.delUserTotal, 0) AS delUserTotal,
|
||||
COALESCE(a.accountTotal, 0) AS accountTotal,
|
||||
COALESCE(a.normalAccountTotal, 0) AS normalAccountTotal,
|
||||
COALESCE(a.delAccountTotal, 0) AS delAccountTotal
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
|
||||
@@ -89,7 +89,7 @@ export async function email(message, env, ctx) {
|
||||
attachment.type = attachment.contentId ? attConst.type.EMBED : attConst.type.ATT;
|
||||
});
|
||||
|
||||
if (attachments.length > 0) {
|
||||
if (attachments.length > 0 && env.r2) {
|
||||
await attService.addAtt({ env }, attachments);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ const requirePerms = [
|
||||
'/setting/physicsDeleteAll',
|
||||
'/setting/setBackground',
|
||||
'/setting/set',
|
||||
'/setting/query',
|
||||
'/user/delete',
|
||||
'/user/setPwd',
|
||||
'/user/setStatus',
|
||||
@@ -63,7 +64,7 @@ const premKey = {
|
||||
'user:delete': ['/user/delete'],
|
||||
'sys-email:query': ['/sys-email/list'],
|
||||
'sys-email:delete': ['/sys-email/delete'],
|
||||
'setting:query': [],
|
||||
'setting:query': ['/setting/query'],
|
||||
'setting:set': ['/setting/set', '/setting/setBackground'],
|
||||
'setting:clean': ['/setting/physicsDeleteAll'],
|
||||
'analysis:query': ['/analysis/echarts']
|
||||
|
||||
Reference in New Issue
Block a user