mirror of
https://github.com/schroinerxy/cloud-mail.git
synced 2026-06-21 19:35:50 +08:00
新增邮件和用户列表右键菜单
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
const en = {
|
||||
IncorrectPwd: 'Incorrect password',
|
||||
addAccountDisabled: 'Add account feature is disabled',
|
||||
addAccountDisabled: 'Add Email Address feature is disabled',
|
||||
regDisabled: 'Sign up is disabled',
|
||||
emptyEmail: 'Email cannot be empty',
|
||||
notEmail: 'Invalid email',
|
||||
notExistDomain: 'Email domain does not exist',
|
||||
isDelAccount: 'This Email has been deleted',
|
||||
isRegAccount: 'This Email is already registered',
|
||||
accountLimit: 'Account limit reached',
|
||||
delMyAccount: 'Cannot delete your own account',
|
||||
accountLimit: 'Email address limit reached',
|
||||
delMyAccount: 'Cannot delete your own email',
|
||||
noUserAccount: 'This email does not belong to the current user',
|
||||
usernameLengthLimit: 'Username length exceeds the limit',
|
||||
noOsSendPic: 'Cannot send body images: object storage not configured',
|
||||
@@ -64,13 +64,13 @@ const en = {
|
||||
emailExistDatabase: 'Email already exists in the database',
|
||||
notConfigOss: 'Object storage not configured',
|
||||
perms: {
|
||||
"邮件": "Email",
|
||||
"邮件": "Emails",
|
||||
"邮件发送": "Send Email",
|
||||
"邮件删除": "Delete Email",
|
||||
"邮箱侧栏": "Account",
|
||||
"邮箱查看": "View Account",
|
||||
"邮箱添加": "Add Account",
|
||||
"邮箱删除": "Delete Account",
|
||||
"邮箱侧栏": "Email Address",
|
||||
"邮箱查看": "View Email",
|
||||
"邮箱添加": "Add Email",
|
||||
"邮箱删除": "Delete Email",
|
||||
"个人设置": "Settings",
|
||||
"用户注销": "Delete User",
|
||||
"分析页": "Analytics",
|
||||
|
||||
@@ -28,6 +28,7 @@ const requirePerms = [
|
||||
'/account/delete',
|
||||
'/account/add',
|
||||
'/my/delete',
|
||||
'/analysis/echarts',
|
||||
'/role/add',
|
||||
'/role/list',
|
||||
'/role/delete',
|
||||
@@ -36,6 +37,8 @@ const requirePerms = [
|
||||
'/role/setDefault',
|
||||
'/allEmail/list',
|
||||
'/allEmail/delete',
|
||||
'/allEmail/batchDelete',
|
||||
'/allEmail/latest',
|
||||
'/setting/setBackground',
|
||||
'/setting/deleteBackground',
|
||||
'/setting/set',
|
||||
|
||||
@@ -449,7 +449,7 @@ const emailService = {
|
||||
let count = 0
|
||||
let list = []
|
||||
|
||||
while ((count < 10) && list.length === 0) {
|
||||
while ((count < 6) && list.length === 0) {
|
||||
list = await orm(c).select({...email}).from(email)
|
||||
.leftJoin(
|
||||
account,
|
||||
@@ -467,7 +467,7 @@ const emailService = {
|
||||
.orderBy(desc(email.emailId))
|
||||
.limit(20);
|
||||
|
||||
await sleep(3000);
|
||||
await sleep(5000);
|
||||
count++
|
||||
}
|
||||
|
||||
@@ -556,24 +556,24 @@ const emailService = {
|
||||
}
|
||||
|
||||
if (userEmail) {
|
||||
conditions.push(sql`${user.email} COLLATE NOCASE LIKE ${userEmail + '%'}`);
|
||||
conditions.push(sql`${user.email} COLLATE NOCASE LIKE ${'%'+ userEmail + '%'}`);
|
||||
}
|
||||
|
||||
if (accountEmail) {
|
||||
conditions.push(
|
||||
or(
|
||||
sql`${email.toEmail} COLLATE NOCASE LIKE ${accountEmail + '%'}`,
|
||||
sql`${email.sendEmail} COLLATE NOCASE LIKE ${accountEmail + '%'}`,
|
||||
sql`${email.toEmail} COLLATE NOCASE LIKE ${'%'+ accountEmail + '%'}`,
|
||||
sql`${email.sendEmail} COLLATE NOCASE LIKE ${'%'+ accountEmail + '%'}`,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (name) {
|
||||
conditions.push(sql`${email.name} COLLATE NOCASE LIKE ${name + '%'}`);
|
||||
conditions.push(sql`${email.name} COLLATE NOCASE LIKE ${'%'+ name + '%'}`);
|
||||
}
|
||||
|
||||
if (subject) {
|
||||
conditions.push(sql`${email.subject} COLLATE NOCASE LIKE ${subject + '%'}`);
|
||||
conditions.push(sql`${email.subject} COLLATE NOCASE LIKE ${'%'+ subject + '%'}`);
|
||||
}
|
||||
|
||||
conditions.push(ne(email.status, emailConst.status.SAVING));
|
||||
@@ -633,7 +633,7 @@ const emailService = {
|
||||
let count = 0
|
||||
let list = []
|
||||
|
||||
while ((count < 10) && list.length === 0) {
|
||||
while ((count < 6) && list.length === 0) {
|
||||
list = await orm(c).select({...email, userEmail: user.email}).from(email)
|
||||
.leftJoin(user, eq(email.userId, user.userId))
|
||||
.where(
|
||||
@@ -645,7 +645,7 @@ const emailService = {
|
||||
.orderBy(desc(email.emailId))
|
||||
.limit(20);
|
||||
|
||||
await sleep(3000);
|
||||
await sleep(5000);
|
||||
count++
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ const userService = {
|
||||
|
||||
|
||||
if (email) {
|
||||
conditions.push(sql`${user.email} COLLATE NOCASE LIKE ${email + '%'}`);
|
||||
conditions.push(sql`${user.email} COLLATE NOCASE LIKE ${'%'+ email + '%'}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -250,6 +250,7 @@ const userService = {
|
||||
|
||||
const { password, userId } = params;
|
||||
await this.resetPassword(c, { password }, userId);
|
||||
await c.env.kv.delete(KvConst.AUTH_INFO + userId);
|
||||
},
|
||||
|
||||
async setStatus(c, params) {
|
||||
|
||||
Reference in New Issue
Block a user