mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-06 07:57:04 +08:00
feat: |Worker| add var DEFAULT_LANG, zh/en (#585)
This commit is contained in:
@@ -74,6 +74,7 @@ compatibility_flags = [ "nodejs_compat" ]
|
|||||||
# ]
|
# ]
|
||||||
|
|
||||||
[vars]
|
[vars]
|
||||||
|
# DEFAULT_LANG = "zh"
|
||||||
# TITLE = "Custom Title" # The title of the site
|
# TITLE = "Custom Title" # The title of the site
|
||||||
PREFIX = "tmp" # The mailbox name prefix to be processed
|
PREFIX = "tmp" # The mailbox name prefix to be processed
|
||||||
# (min, max) length of the adderss, if not set, the default is (1, 30)
|
# (min, max) length of the adderss, if not set, the default is (1, 30)
|
||||||
|
|||||||
@@ -90,6 +90,7 @@
|
|||||||
|
|
||||||
| 变量名 | 类型 | 说明 | 示例 |
|
| 变量名 | 类型 | 说明 | 示例 |
|
||||||
| ------------------------- | ----------- | ------------------------------------------------ | --------------------- |
|
| ------------------------- | ----------- | ------------------------------------------------ | --------------------- |
|
||||||
|
| `DEFAULT_LANG` | 文本 | Worker 错误信息默认语言, zh/en | `zh` |
|
||||||
| `TITLE` | 文本 | 自定义前端页面网站标题,支持 html | `Custom Title` |
|
| `TITLE` | 文本 | 自定义前端页面网站标题,支持 html | `Custom Title` |
|
||||||
| `ANNOUNCEMENT` | 文本 | 自定义前端页面公告,支持 html | `Custom Announcement` |
|
| `ANNOUNCEMENT` | 文本 | 自定义前端页面公告,支持 html | `Custom Announcement` |
|
||||||
| `COPYRIGHT` | 文本 | 自定义前端界面页脚文本,支持 html | `Dream Hunter` |
|
| `COPYRIGHT` | 文本 | 自定义前端界面页脚文本,支持 html | `Dream Hunter` |
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { isS3Enabled } from '../mails_api/s3_attachment';
|
|||||||
export default {
|
export default {
|
||||||
getConfig: async (c: Context<HonoCustomType>) => {
|
getConfig: async (c: Context<HonoCustomType>) => {
|
||||||
return c.json({
|
return c.json({
|
||||||
|
"DEFAULT_LANG": c.env.DEFAULT_LANG,
|
||||||
"TITLE": c.env.TITLE,
|
"TITLE": c.env.TITLE,
|
||||||
"HAS_PASSWORD": getPasswords(c).length,
|
"HAS_PASSWORD": getPasswords(c).length,
|
||||||
"HAS_ADMIN_PASSWORDS": getAdminPasswords(c).length,
|
"HAS_ADMIN_PASSWORDS": getAdminPasswords(c).length,
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ compatibility_flags = [ "nodejs_compat" ]
|
|||||||
# ]
|
# ]
|
||||||
|
|
||||||
[vars]
|
[vars]
|
||||||
|
# DEFAULT_LANG = "zh"
|
||||||
# TITLE = "Custom Title" # custom title
|
# TITLE = "Custom Title" # custom title
|
||||||
# ANNOUNCEMENT = "Custom Announcement"
|
# ANNOUNCEMENT = "Custom Announcement"
|
||||||
PREFIX = "tmp"
|
PREFIX = "tmp"
|
||||||
|
|||||||
Reference in New Issue
Block a user