优化邮件列表改为虚拟滚动列表
This commit is contained in:
@@ -54,7 +54,7 @@ const en = {
|
||||
botVerifyFail: 'Bot verification failed, please try again',
|
||||
authExpired: 'Authentication has expired. Please sign in again',
|
||||
unauthorized: 'Unauthorized',
|
||||
bannedSend: 'You are banned from sending emails',
|
||||
bannedSend: 'You do not have permission to send emails',
|
||||
initSuccess: 'Successfully initialized',
|
||||
noDomainPermAdd: "No permission to add this domain email",
|
||||
noDomainPermReg: "No permission to register this domain email",
|
||||
|
||||
@@ -54,7 +54,7 @@ const zh = {
|
||||
botVerifyFail: '人机验证失败,请重试',
|
||||
authExpired: '身份认证失效,请重新登录',
|
||||
unauthorized: '权限不足',
|
||||
bannedSend: '你已被禁止发送邮件',
|
||||
bannedSend: '你没有发送邮件权限',
|
||||
initSuccess: '初始化成功',
|
||||
noDomainPermAdd: '你没有权限添加该域名邮箱',
|
||||
noDomainPermReg: '你没有权限注册该域名邮箱',
|
||||
|
||||
@@ -564,7 +564,7 @@ const init = {
|
||||
INSERT INTO setting (
|
||||
register, receive, add_email, many_email, title, auto_refresh, register_verify, add_email_verify
|
||||
)
|
||||
SELECT 0, 0, 0, 0, 'Cloud Mail', 1, 1, 1
|
||||
SELECT 0, 0, 0, 0, 'Cloud Mail', 0, 1, 1
|
||||
WHERE NOT EXISTS (SELECT 1 FROM setting)
|
||||
`).run();
|
||||
} catch (e) {
|
||||
|
||||
@@ -539,12 +539,6 @@ const emailService = {
|
||||
|
||||
const conditions = [];
|
||||
|
||||
if (timeSort) {
|
||||
conditions.push(gt(email.emailId, emailId));
|
||||
} else {
|
||||
conditions.push(lt(email.emailId, emailId));
|
||||
}
|
||||
|
||||
if (type === 'send') {
|
||||
conditions.push(eq(email.type, emailConst.type.SEND));
|
||||
}
|
||||
@@ -586,6 +580,12 @@ const emailService = {
|
||||
|
||||
const countConditions = [...conditions];
|
||||
|
||||
if (timeSort) {
|
||||
conditions.unshift(gt(email.emailId, emailId));
|
||||
} else {
|
||||
conditions.unshift(lt(email.emailId, emailId));
|
||||
}
|
||||
|
||||
const query = orm(c).select({ ...email, userEmail: user.email })
|
||||
.from(email)
|
||||
.leftJoin(user, eq(email.userId, user.userId))
|
||||
|
||||
Reference in New Issue
Block a user