Skip to content

Commit f9b1a35

Browse files
Merge branch 'dev-frontend' into dev
2 parents 24e1c48 + 81a55bb commit f9b1a35

File tree

33 files changed

+642
-231
lines changed

33 files changed

+642
-231
lines changed

core/frontend/src/api/modules/mailbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const deleteMailbox = (params: { emails: string[] }) => {
6262
})
6363
}
6464

65-
export const exportMailbox = (params: { domain: string }) => {
65+
export const exportMailbox = (params: { domain: string; file_type: string }) => {
6666
return instance.post('/mailbox/export', params, {
6767
responseType: 'blob',
6868
fetchOptions: {

core/frontend/src/api/modules/settings/common.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,12 @@ export const clearReverseProxyDomain = (params = {}) => {
9090
},
9191
})
9292
}
93+
94+
export const setApiDocEnabled = (params: { api_doc_enabled: boolean }) => {
95+
return instance.post('/settings/set_api_doc_swagger', params, {
96+
fetchOptions: {
97+
loading: t('settings.api.loading.setting'),
98+
successMessage: true,
99+
},
100+
})
101+
}

core/frontend/src/i18n/lang/en.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,19 @@
13871387
"title": "Reset Reverse Proxy",
13881388
"content": "Confirm to reset reverse proxy?"
13891389
}
1390+
},
1391+
"api": {
1392+
"title": "API Settings",
1393+
"enableApi": "Enable API",
1394+
"apiDocUrl": "API Documentation URL",
1395+
"swaggerUrl": "Swagger URL",
1396+
"token": "Token",
1397+
"confirm": {
1398+
"enable": "Enable API",
1399+
"disable": "Disable API",
1400+
"enableContent": "Do you want to enable API settings?",
1401+
"disableContent": "Do you want to disable API settings?"
1402+
}
13901403
}
13911404
},
13921405
"api": {

core/frontend/src/i18n/lang/ja.json

Lines changed: 176 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,104 +1125,221 @@
11251125
}
11261126
},
11271127
"settings": {
1128-
"title": "設定",
1128+
"title": "Settings",
11291129
"service": {
1130-
"title": "サービス状態",
1131-
"tips": "ヒント: Ctrl+F で検索、Ctrl+S で保存、Ctrl+H で検索置換",
1132-
"editTitle": "{name} をオンライン編集",
1130+
"title": "Service Status",
1131+
"tips": "Tips: Ctrl+F Search keywords, Ctrl+S Save, Ctrl+H Search and replace",
1132+
"editTitle": "Online Edit {name}",
11331133
"columns": {
1134-
"name": "サービス名",
1135-
"status": "状態"
1134+
"name": "Service Name",
1135+
"status": "Status"
11361136
},
11371137
"status": {
1138-
"running": "稼働中",
1139-
"stopped": "停止中"
1138+
"running": "Running",
1139+
"stopped": "Stopped"
11401140
},
11411141
"actions": {
1142-
"restart": "再起動"
1142+
"restart": "Restart"
11431143
},
11441144
"restart": {
1145-
"title": "サービス再起動",
1146-
"confirm": "[{name}] を再起動してもよろしいですか?"
1145+
"title": "Restart Service",
1146+
"confirm": "Are you sure you want to restart [{name}]?"
11471147
}
11481148
},
11491149
"bcc": {
1150-
"title": "BCC 管理",
1151-
"add": "BCC 追加",
1152-
"edit": "BCC 編集",
1153-
"needCopy": "コピー元",
1154-
"copyTo": "コピー先",
1155-
"domain": "ドメイン",
1156-
"type": "BCC タイプ",
1157-
"status": "状態",
1158-
"active": "有効",
1150+
"title": "BCC Management",
1151+
"add": "Add BCC",
1152+
"edit": "Edit BCC",
1153+
"needCopy": "Need Copy",
1154+
"copyTo": "Copy to",
1155+
"domain": "Domain",
1156+
"type": "BCC Type",
1157+
"status": "Status",
1158+
"active": "Active",
11591159
"types": {
1160-
"sender": "送信時",
1161-
"recipient": "受信時"
1160+
"sender": "When sending",
1161+
"recipient": "When receiving"
11621162
},
11631163
"delete": {
1164-
"title": "BCC [{address}] を削除",
1165-
"content": "BCC 設定を削除しますか?"
1164+
"title": "Delete BCC [{address}]",
1165+
"content": "Whether to delete the BCC setting?"
11661166
},
11671167
"placeholders": {
1168-
"needCopy": "BCC 対象ユーザーを入力",
1169-
"copyTo": "BCC 受信メールを入力"
1168+
"needCopy": "Enter the users you need to BCC",
1169+
"copyTo": "Enter the email you need to receive the BCC"
11701170
},
11711171
"loading": {
1172-
"adding": "BCC を追加中... お待ちください",
1173-
"saving": "BCC を保存中... お待ちください",
1174-
"deleting": "BCC を削除中... お待ちください"
1172+
"adding": "Adding BCC, please wait...",
1173+
"saving": "Saving BCC, please wait...",
1174+
"deleting": "Deleting BCC, please wait..."
11751175
}
11761176
},
11771177
"forward": {
1178-
"add": "転送追加",
1179-
"edit": "転送編集",
1178+
"add": "Add Forward",
1179+
"edit": "Edit Forward",
11801180
"columns": {
1181-
"address": "アドレス",
1182-
"goto": "転送先",
1183-
"domain": "ドメイン",
1184-
"created": "作成日",
1185-
"modified": "更新日",
1186-
"status": "状態"
1181+
"address": "Address",
1182+
"goto": "Goto",
1183+
"domain": "Domain",
1184+
"created": "Created",
1185+
"modified": "Modified",
1186+
"status": "Status"
11871187
},
11881188
"form": {
1189-
"status": "状態",
1190-
"forwardedUsers": "転送元ユーザー",
1191-
"forwardedUsersPlaceholder": "転送元メールを入力",
1192-
"domain": "ドメイン",
1193-
"domainPlaceholder": "転送元ユーザーのドメイン名",
1194-
"receivingUser": "受信ユーザー",
1195-
"receivingUserPlaceholder": "転送メール受信者。複数ある場合は改行区切り"
1189+
"status": "Status",
1190+
"forwardedUsers": "Forwarded users",
1191+
"forwardedUsersPlaceholder": "Enter the mailbox that needs to be forwarded",
1192+
"domain": "Domain",
1193+
"domainPlaceholder": "Domain name of the Forwarded users",
1194+
"receivingUser": "Receiving user",
1195+
"receivingUserPlaceholder": "Users who need to accept forwarded mail. If there are multiple, please separate them with newlines"
11961196
},
11971197
"delete": {
1198-
"title": "メール転送削除",
1199-
"content": "メール転送 [{address}] を削除してもよろしいですか?"
1198+
"title": "Delete mail forward",
1199+
"content": "Are you sure you want to delete mail forward [{address}]?"
12001200
},
12011201
"loading": {
1202-
"adding": "メール転送を追加中... お待ちください",
1203-
"editing": "メール転送を編集中... お待ちください",
1204-
"deleting": "メール転送を削除中... お待ちください"
1202+
"adding": "Adding mail forward, please wait...",
1203+
"editing": "Editing mail forward, please wait...",
1204+
"deleting": "Deleting mail forward, please wait..."
12051205
}
12061206
},
12071207
"common": {
1208-
"confirm": "更新",
1208+
"confirm": "Update",
1209+
"security": {
1210+
"title": "Security Settings",
1211+
"username": "Change Username",
1212+
"currentUsername": "Current Username",
1213+
"newUsernamePlaceholder": "Enter new username",
1214+
"usernameRule": "4-20 characters, letters and numbers",
1215+
"usernameExists": "Username already exists",
1216+
"changePassword": "Change Password",
1217+
"currentPassword": "Current Password",
1218+
"newPassword": "New Password",
1219+
"confirmPassword": "Confirm New Password",
1220+
"passwordStrength": "Password Strength",
1221+
"passwordMismatch": "Passwords do not match",
1222+
"strength": {
1223+
"weak": "Weak",
1224+
"medium": "Medium",
1225+
"strong": "Strong"
1226+
},
1227+
"securityPath": "Change Security Path",
1228+
"currentPath": "Current Path",
1229+
"newPathPlaceholder": "Enter new path, e.g. admin-abc123",
1230+
"pathRule": "Recommend using complex path for enhanced security",
1231+
"usernameValidation": {
1232+
"lengthError": "Username length must be between 4 and 20 characters",
1233+
"formatError": "Username must consist of letters, numbers or underscores",
1234+
"duplicateError": "Username cannot be the same as current username"
1235+
}
1236+
},
1237+
"network": {
1238+
"title": "Network Configuration",
1239+
"domain": "Domain Settings",
1240+
"currentDomain": "The access domain name of the console",
1241+
"newDomainPlaceholder": "Enter new domain, e.g. admin.yourdomain.com",
1242+
"domainRule": "Please enter a valid domain",
1243+
"ssl": "SSL Certificate Configuration",
1244+
"sslEnabled": "SSL Enabled",
1245+
"certStatus": "Certificate Status",
1246+
"certValid": "({days} days remaining)",
1247+
"sslCert": "SSL Certificate (PEM format)",
1248+
"sslKey": "Private Key (PEM format)",
1249+
"certPlaceholder": "-----BEGIN CERTIFICATE-----\nMIIFazCCA1OgAwIBAgIURv...\n-----END CERTIFICATE-----",
1250+
"keyPlaceholder": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG...\n-----END PRIVATE KEY-----",
1251+
"updateSSL": "Update SSL Certificate",
1252+
"certValidStatus": "Certificate Valid",
1253+
"certExpiredStatus": "Certificate Expired",
1254+
"certExpireTime": "Certificate expires: {time}"
1255+
},
1256+
"system": {
1257+
"title": "System Configuration",
1258+
"port": "Port Settings",
1259+
"currentPort": "Current Port",
1260+
"terminalRequired": "This setting requires terminal operation",
1261+
"copyCommand": "Copy the above command and execute it in the server terminal",
1262+
"commandCopied": "Command copied to clipboard",
1263+
"timezone": "Timezone Settings",
1264+
"currentTime": "Current System Timezone"
1265+
},
1266+
"ipWhitelist": {
1267+
"title": "IP Whitelist",
1268+
"enable": "Enable",
1269+
"disable": "Disable",
1270+
"add": "Add",
1271+
"clear": "Clear",
1272+
"description": "Only allow IPs in the list to access, terminal command to disable: bm.sh cancel-ip-limit",
1273+
"placeholder": "Please enter IP address",
1274+
"validation": {
1275+
"ipRequired": "Please enter IP address"
1276+
},
1277+
"confirm": {
1278+
"deleteTitle": "Delete IP Whitelist",
1279+
"deleteContent": "Confirm to delete IP whitelist: {ip}",
1280+
"enableTitle": "Enable IP Whitelist",
1281+
"disableTitle": "Disable IP Whitelist",
1282+
"enableContent": "Confirm to enable IP whitelist, only whitelisted IP addresses can access after enabling",
1283+
"disableContent": "Confirm to disable IP whitelist, all IP addresses can access after disabling",
1284+
"clearTitle": "Clear IP Whitelist",
1285+
"clearContent": "Confirm to clear IP whitelist, all IP addresses can access after clearing"
1286+
}
1287+
},
12091288
"proxy": {
1210-
"title": "リバースプロキシ",
1211-
"description": "リバースプロキシアドレス、外部公開時に使用します。例:購読リスト、配信停止メールなど",
1212-
"placeholder": "リバースプロキシアドレスを入力してください",
1213-
"formatTip": "形式:https://example.com",
1214-
"reset": "リセット",
1289+
"title": "Reverse Proxy",
1290+
"description": "Reverse proxy address, used for external exposure, such as: subscription lists, unsubscribe emails, etc.",
1291+
"placeholder": "Please enter reverse proxy address",
1292+
"formatTip": "Format: https://example.com",
1293+
"reset": "Reset",
12151294
"resetConfirm": {
1216-
"title": "リバースプロキシをリセット",
1217-
"content": "リバースプロキシをリセットしてもよろしいですか?"
1295+
"title": "Reset Reverse Proxy",
1296+
"content": "Confirm to reset reverse proxy?"
1297+
}
1298+
},
1299+
"api": {
1300+
"title": "API設定",
1301+
"enableApi": "APIを有効にする",
1302+
"apiDocUrl": "APIドキュメントURL",
1303+
"swaggerUrl": "Swagger URL",
1304+
"token": "Token",
1305+
"confirm": {
1306+
"enable": "APIを有効にする",
1307+
"disable": "APIを無効にする",
1308+
"enableContent": "API設定を有効にしますか?",
1309+
"disableContent": "API設定を無効にしますか?"
12181310
}
12191311
}
12201312
},
12211313
"api": {
12221314
"loading": {
1223-
"restarting": "サービスを再起動中... お待ちください",
1224-
"saving": "設定を保存中... お待ちください"
1315+
"restarting": "Restarting service, please wait...",
1316+
"saving": "Saving configuration, please wait...",
1317+
"setting": "Setting, please wait...",
1318+
"settingSSL": "Setting SSL, please wait...",
1319+
"applyingCert": "Applying certificate, please wait...",
1320+
"adding": "Adding, please wait...",
1321+
"deleting": "Deleting, please wait...",
1322+
"clearing": "Clearing, please wait..."
12251323
}
1324+
},
1325+
"aiModel": {
1326+
"modelId": "Model ID",
1327+
"modelAlias": "Model Alias",
1328+
"modelFeature": "Model Feature",
1329+
"contentLength": "Maximum Context Length",
1330+
"supplierTitle": "Supplier Title",
1331+
"supplierName": "Supplier Name",
1332+
"cancel": "Cancel",
1333+
"confirm": "Confirm",
1334+
"aPIKey": "API Key",
1335+
"apiPath": "Base Url",
1336+
"check": "Check",
1337+
"getKey": "Click to Get Key",
1338+
"example": "Example",
1339+
"saveAPI": "Save API",
1340+
"model": "Model",
1341+
"byDefault": "By default, all models are retrieved from /models",
1342+
"addModel": "Add Model"
12261343
}
12271344
},
12281345
"logs": {

core/frontend/src/i18n/lang/zh.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,6 +1372,19 @@
13721372
"title": "重置反向代理",
13731373
"content": "确认重置反向代理吗?"
13741374
}
1375+
},
1376+
"api": {
1377+
"title": "API Settings",
1378+
"enableApi": "开启API",
1379+
"apiDocUrl": "API文档地址",
1380+
"swaggerUrl": "Swagger地址",
1381+
"token": "Token",
1382+
"confirm": {
1383+
"enable": "开启API",
1384+
"disable": "关闭API",
1385+
"enableContent": "是否开启API设置?",
1386+
"disableContent": "是否关闭API设置?"
1387+
}
13751388
}
13761389
},
13771390
"api": {

core/frontend/src/router/modules/contacts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const route: RouteRecordRaw = {
2323
path: 'group',
2424
name: 'ContactsGroup',
2525
meta: { title: 'Group', titleKey: 'layout.menu.group' },
26-
component: () => import('@/views/contacts/group/temp.vue'),
26+
component: () => import('@/views/contacts/group/index.vue'),
2727
},
2828
{
2929
path: 'subscribers',

core/frontend/src/views/api/components/ApiForm.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
<template-select v-model:value="form.template_id" v-model:content="form.template_content">
3131
</template-select>
3232
</div>
33+
<!-- <n-button text type="primary" class="ml-12px" @click="handleEditTemplate">
34+
{{ $t('common.actions.edit') }}
35+
</n-button> -->
3336
<n-button text type="primary" class="ml-12px" @click="handlePreviewTemplate">
3437
{{ $t('common.actions.preview') }}
3538
</n-button>
@@ -118,6 +121,10 @@ const handlePreviewTemplate = () => {
118121
previewModalApi.open()
119122
}
120123
124+
// const handleEditTemplate = () => {
125+
// console.log(1)
126+
// }
127+
121128
const resetForm = () => {
122129
form.id = 0
123130
form.api_name = ''

0 commit comments

Comments
 (0)