From c78fbabe60b7d40b6e83056eca532b45e5104fd8 Mon Sep 17 00:00:00 2001 From: lyzno1 Date: Sat, 15 Nov 2025 11:23:59 +0800 Subject: [PATCH] fix: email template design --- .../api_rate_limit_limit_template_en-US.html | 61 +++++++++++++-- .../api_rate_limit_limit_template_zh-CN.html | 62 ++++++++++++--- ...api_rate_limit_warning_template_en-US.html | 61 +++++++++++++-- ...api_rate_limit_warning_template_zh-CN.html | 62 ++++++++++++--- .../trigger_events_limit_template_en-US.html | 77 +++++++++++++++---- .../trigger_events_limit_template_zh-CN.html | 75 ++++++++++++++---- ...r_events_usage_warning_template_en-US.html | 73 ++++++++++++++---- ...r_events_usage_warning_template_zh-CN.html | 73 ++++++++++++++---- 8 files changed, 451 insertions(+), 93 deletions(-) diff --git a/api/templates/api_rate_limit_limit_template_en-US.html b/api/templates/api_rate_limit_limit_template_en-US.html index c1c129ad0a..2a45fe6ce3 100644 --- a/api/templates/api_rate_limit_limit_template_en-US.html +++ b/api/templates/api_rate_limit_limit_template_en-US.html @@ -18,9 +18,10 @@ .card { width: 600px; min-height: 434px; - margin: 40px auto; + margin: 40px auto 0; display: flex; flex-direction: column; + align-items: flex-start; background: #fcfcfd; border: 1px solid #ffffff; box-shadow: 0px 3px 10px -2px rgba(9, 9, 11, 0.08), 0px 2px 4px -2px rgba(9, 9, 11, 0.06); @@ -28,10 +29,12 @@ } .card-header { - padding: 36px 48px 24px; display: flex; + padding: 36px 48px 24px 48px; flex-direction: column; + align-items: flex-start; gap: 8px; + align-self: stretch; } .card-header img { @@ -41,9 +44,11 @@ .card-content { display: flex; + padding: 8px 48px 48px 48px; flex-direction: column; + align-items: flex-start; gap: 16px; - padding: 8px 48px 48px; + align-self: stretch; width: 100%; } @@ -59,7 +64,7 @@ display: flex; flex-direction: column; gap: 12px; - padding: 16px 0; + padding: 16px 0 0; } .body-text { @@ -100,6 +105,38 @@ letter-spacing: -0.005em; color: #354052; } + + .signature { + margin-top: 28px; + margin-bottom: 16px; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 12px; + width: 100%; + } + + .signature-text { + margin: 0; + font-size: 14px; + line-height: 20px; + letter-spacing: -0.005em; + color: #354052; + } + + .email-footer { + margin: 20px auto 40px; + max-width: 600px; + color: #676f83; + text-align: center; + font-family: 'Inter', 'Arial', sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 16px; + letter-spacing: -0.06px; + flex: 1 0 0; + } @@ -111,6 +148,9 @@

You’ve reached your API Rate Limit

+

+ Dear {{ recipientName | default(workspaceName ~ ' team', true) }}, +

Your workspace {{workspaceName}} has used all available Monthly API Rate Limit for the {{planName}} Plan (limit: {{planLimit}}). @@ -121,13 +161,18 @@

To continue using the Dify API and unlock a higher limit, please upgrade to a paid plan.

+ {{ctaLabel}} +

+ Monthly API Rate Limit for the {{planName}} Plan will reset on {{resetDate}}. +

+
+
+

Best regards,

+

The Dify Team

- {{ctaLabel}} -

- Monthly API Rate Limit for the {{planName}} Plan will reset on {{resetDate}}. -

+ diff --git a/api/templates/api_rate_limit_limit_template_zh-CN.html b/api/templates/api_rate_limit_limit_template_zh-CN.html index b4fdb1bf1c..883004e4b2 100644 --- a/api/templates/api_rate_limit_limit_template_zh-CN.html +++ b/api/templates/api_rate_limit_limit_template_zh-CN.html @@ -18,9 +18,10 @@ .card { width: 600px; min-height: 434px; - margin: 40px auto; + margin: 40px auto 0; display: flex; flex-direction: column; + align-items: flex-start; background: #fcfcfd; border: 1px solid #ffffff; box-shadow: 0px 3px 10px -2px rgba(9, 9, 11, 0.08), 0px 2px 4px -2px rgba(9, 9, 11, 0.06); @@ -28,10 +29,12 @@ } .card-header { - padding: 36px 48px 24px; display: flex; + padding: 36px 48px 24px 48px; flex-direction: column; + align-items: flex-start; gap: 8px; + align-self: stretch; } .card-header img { @@ -41,9 +44,11 @@ .card-content { display: flex; + padding: 8px 48px 48px 48px; flex-direction: column; + align-items: flex-start; gap: 16px; - padding: 8px 48px 48px; + align-self: stretch; width: 100%; } @@ -59,7 +64,7 @@ display: flex; flex-direction: column; gap: 12px; - padding: 16px 0; + padding: 16px 0 0; } .body-text { @@ -100,6 +105,38 @@ letter-spacing: -0.005em; color: #354052; } + + .signature { + margin-top: 28px; + margin-bottom: 16px; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 12px; + width: 100%; + } + + .signature-text { + margin: 0; + font-size: 14px; + line-height: 20px; + letter-spacing: -0.005em; + color: #354052; + } + + .email-footer { + margin: 20px auto 40px; + max-width: 600px; + color: #676f83; + text-align: center; + font-family: 'Inter', 'PingFang SC', 'Arial', sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 16px; + letter-spacing: -0.06px; + flex: 1 0 0; + } @@ -112,7 +149,10 @@

您的 API 速率额度已用尽

- 您的工作区 {{workspaceName}} 已用完 月度 API 速率额度,触及 + 亲爱的 {{ recipientName | default(workspaceName, true) }}, +

+

+ 您的工作区 {{workspaceName}} 已用完 月度 API 速率额度,触及 {{planName}} 计划(上限:{{planLimit}})

@@ -121,13 +161,17 @@

若要继续使用 Dify API 并解锁更高额度,请升级到付费套餐。

+ {{ctaLabel}} +

+ {{planName}} 计划的月度 API 速率额度 将于 {{resetDate}} 重置。

+
+
+

此致敬礼,

+

Dify 团队

- {{ctaLabel}} -

- {{planName}} 计划的月度 API 速率额度 将于 {{resetDate}} 重置。 -

+ diff --git a/api/templates/api_rate_limit_warning_template_en-US.html b/api/templates/api_rate_limit_warning_template_en-US.html index 840f257c15..ffc2b64718 100644 --- a/api/templates/api_rate_limit_warning_template_en-US.html +++ b/api/templates/api_rate_limit_warning_template_en-US.html @@ -18,9 +18,10 @@ .card { width: 600px; min-height: 454px; - margin: 40px auto; + margin: 40px auto 0; display: flex; flex-direction: column; + align-items: flex-start; background: #fcfcfd; border: 1px solid #ffffff; box-shadow: 0px 3px 10px -2px rgba(9, 9, 11, 0.08), 0px 2px 4px -2px rgba(9, 9, 11, 0.06); @@ -28,10 +29,12 @@ } .card-header { - padding: 36px 48px 24px; display: flex; + padding: 36px 48px 24px 48px; flex-direction: column; + align-items: flex-start; gap: 8px; + align-self: stretch; } .card-header img { @@ -41,9 +44,11 @@ .card-content { display: flex; + padding: 8px 48px 48px 48px; flex-direction: column; + align-items: flex-start; gap: 16px; - padding: 8px 48px 48px; + align-self: stretch; width: 100%; } @@ -59,7 +64,7 @@ display: flex; flex-direction: column; gap: 12px; - padding: 16px 0; + padding: 16px 0 0; } .body-text { @@ -100,6 +105,38 @@ letter-spacing: -0.005em; color: #354052; } + + .signature { + margin-top: 28px; + margin-bottom: 16px; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 12px; + width: 100%; + } + + .signature-text { + margin: 0; + font-size: 14px; + line-height: 20px; + letter-spacing: -0.005em; + color: #354052; + } + + .email-footer { + margin: 20px auto 40px; + max-width: 600px; + color: #676f83; + text-align: center; + font-family: 'Inter', 'Arial', sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 16px; + letter-spacing: -0.06px; + flex: 1 0 0; + } @@ -111,6 +148,9 @@

You’re nearing your API Rate Limit

+

+ Dear {{ recipientName | default(workspaceName ~ ' team', true) }}, +

Your workspace {{workspaceName}} has used 80% of its Monthly API Rate Limit for the {{planName}} Plan (limit: {{planLimit}}). @@ -122,13 +162,18 @@ To avoid service interruptions and ensure continued access to the Dify API, please consider upgrading your plan for a higher API Rate Limit.

+ {{ctaLabel}} +

+ Monthly API Rate Limit for the {{planName}} Plan will reset on {{resetDate}}. +

+
+
+

Best regards,

+

The Dify Team

- {{ctaLabel}} -

- Monthly API Rate Limit for the {{planName}} Plan will reset on {{resetDate}}. -

+ diff --git a/api/templates/api_rate_limit_warning_template_zh-CN.html b/api/templates/api_rate_limit_warning_template_zh-CN.html index bb82bc5aaf..c5b23d43a2 100644 --- a/api/templates/api_rate_limit_warning_template_zh-CN.html +++ b/api/templates/api_rate_limit_warning_template_zh-CN.html @@ -18,9 +18,10 @@ .card { width: 600px; min-height: 454px; - margin: 40px auto; + margin: 40px auto 0; display: flex; flex-direction: column; + align-items: flex-start; background: #fcfcfd; border: 1px solid #ffffff; box-shadow: 0px 3px 10px -2px rgba(9, 9, 11, 0.08), 0px 2px 4px -2px rgba(9, 9, 11, 0.06); @@ -28,10 +29,12 @@ } .card-header { - padding: 36px 48px 24px; display: flex; + padding: 36px 48px 24px 48px; flex-direction: column; + align-items: flex-start; gap: 8px; + align-self: stretch; } .card-header img { @@ -41,9 +44,11 @@ .card-content { display: flex; + padding: 8px 48px 48px 48px; flex-direction: column; + align-items: flex-start; gap: 16px; - padding: 8px 48px 48px; + align-self: stretch; width: 100%; } @@ -59,7 +64,7 @@ display: flex; flex-direction: column; gap: 12px; - padding: 16px 0; + padding: 16px 0 0; } .body-text { @@ -100,6 +105,38 @@ letter-spacing: -0.005em; color: #354052; } + + .signature { + margin-top: 28px; + margin-bottom: 16px; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 12px; + width: 100%; + } + + .signature-text { + margin: 0; + font-size: 14px; + line-height: 20px; + letter-spacing: -0.005em; + color: #354052; + } + + .email-footer { + margin: 20px auto 40px; + max-width: 600px; + color: #676f83; + text-align: center; + font-family: 'Inter', 'PingFang SC', 'Arial', sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 16px; + letter-spacing: -0.06px; + flex: 1 0 0; + } @@ -112,7 +149,10 @@

您的 API 速率额度接近上限

- 您的工作区 {{workspaceName}} 已使用 80% 的月度 API 速率额度,触及 + 亲爱的 {{ recipientName | default(workspaceName, true) }}, +

+

+ 您的工作区 {{workspaceName}} 已使用 80% 的月度 API 速率额度,触及 {{planName}} 计划(上限:{{planLimit}})

@@ -121,13 +161,17 @@

为避免服务中断并持续访问 Dify API,请考虑升级到额度更高的套餐。

+ {{ctaLabel}} +

+ {{planName}} 计划的月度 API 速率额度 将于 {{resetDate}} 重置。

+
+
+

此致敬礼,

+

Dify 团队

- {{ctaLabel}} -

- {{planName}} 计划的月度 API 速率额度 将于 {{resetDate}} 重置。 -

+ diff --git a/api/templates/trigger_events_limit_template_en-US.html b/api/templates/trigger_events_limit_template_en-US.html index 79229a5d4b..937e2f74ca 100644 --- a/api/templates/trigger_events_limit_template_en-US.html +++ b/api/templates/trigger_events_limit_template_en-US.html @@ -18,9 +18,10 @@ .card { width: 600px; min-height: 454px; - margin: 40px auto; + margin: 40px auto 0; display: flex; flex-direction: column; + align-items: flex-start; background: #fcfcfd; border: 1px solid #ffffff; box-shadow: 0px 3px 10px -2px rgba(9, 9, 11, 0.08), 0px 2px 4px -2px rgba(9, 9, 11, 0.06); @@ -28,10 +29,12 @@ } .card-header { - padding: 36px 48px 24px; display: flex; + padding: 36px 48px 24px 48px; flex-direction: column; + align-items: flex-start; gap: 8px; + align-self: stretch; } .card-header img { @@ -41,9 +44,11 @@ .card-content { display: flex; + padding: 8px 48px 48px 48px; flex-direction: column; + align-items: flex-start; gap: 16px; - padding: 8px 48px 48px; + align-self: stretch; width: 100%; } @@ -59,7 +64,7 @@ display: flex; flex-direction: column; gap: 12px; - padding: 16px 0; + padding: 16px 0 0; } .body-text { @@ -100,6 +105,38 @@ letter-spacing: -0.005em; color: #354052; } + + .signature { + margin-top: 28px; + margin-bottom: 16px; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 12px; + width: 100%; + } + + .signature-text { + margin: 0; + font-size: 14px; + line-height: 20px; + letter-spacing: -0.005em; + color: #354052; + } + + .email-footer { + margin: 20px auto 40px; + max-width: 600px; + color: #676f83; + text-align: center; + font-family: 'Inter', 'Arial', sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 16px; + letter-spacing: -0.06px; + flex: 1 0 0; + } @@ -112,8 +149,11 @@

You’ve reached your trigger events limit

- Your workspace {{workspaceName}} has used all available {{usageScope | default('Trigger Events')}} for the - {{planName}} Plan (limit: {{planLimit}}). + Dear {{ recipientName | default(workspaceName ~ ' team', true) }}, +

+

+ Your workspace {{workspaceName}} has used all available {{usageScope | default('Trigger Events')}} for the + {{planName}} Plan (limit: {{planLimit}}).

Workflows triggered by {{triggerSources}} events have been temporarily paused. @@ -121,19 +161,24 @@

To keep your workflows running without interruption, please upgrade your plan to unlock more Trigger Events.

+ {{ctaLabel}} +

+ + {% if resetLine is defined %} + {{ resetLine }} + {% else %} + Trigger Events for the {{planName}} Plan {{resetDescription}} + {% endif %} + +

+
+
+

Best regards,

+

The Dify Team

- {{ctaLabel}} -

- - {% if resetLine is defined %} - {{ resetLine }} - {% else %} - Trigger Events for the {{planName}} Plan {{resetDescription}} - {% endif %} - -

+ diff --git a/api/templates/trigger_events_limit_template_zh-CN.html b/api/templates/trigger_events_limit_template_zh-CN.html index 4d4aac9b52..4ae271c637 100644 --- a/api/templates/trigger_events_limit_template_zh-CN.html +++ b/api/templates/trigger_events_limit_template_zh-CN.html @@ -18,9 +18,10 @@ .card { width: 600px; min-height: 454px; - margin: 40px auto; + margin: 40px auto 0; display: flex; flex-direction: column; + align-items: flex-start; background: #fcfcfd; border: 1px solid #ffffff; box-shadow: 0px 3px 10px -2px rgba(9, 9, 11, 0.08), 0px 2px 4px -2px rgba(9, 9, 11, 0.06); @@ -28,10 +29,12 @@ } .card-header { - padding: 36px 48px 24px; display: flex; + padding: 36px 48px 24px 48px; flex-direction: column; + align-items: flex-start; gap: 8px; + align-self: stretch; } .card-header img { @@ -41,9 +44,11 @@ .card-content { display: flex; + padding: 8px 48px 48px 48px; flex-direction: column; + align-items: flex-start; gap: 16px; - padding: 8px 48px 48px; + align-self: stretch; width: 100%; } @@ -59,7 +64,7 @@ display: flex; flex-direction: column; gap: 12px; - padding: 16px 0; + padding: 16px 0 0; } .body-text { @@ -100,6 +105,38 @@ letter-spacing: -0.005em; color: #354052; } + + .signature { + margin-top: 28px; + margin-bottom: 16px; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 12px; + width: 100%; + } + + .signature-text { + margin: 0; + font-size: 14px; + line-height: 20px; + letter-spacing: -0.005em; + color: #354052; + } + + .email-footer { + margin: 20px auto 40px; + max-width: 600px; + color: #676f83; + text-align: center; + font-family: 'Inter', 'PingFang SC', 'Arial', sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 16px; + letter-spacing: -0.06px; + flex: 1 0 0; + } @@ -112,7 +149,10 @@

您的触发事件额度已用尽

- 您的工作区 {{workspaceName}} 已用完 {{usageScope | default('触发事件额度')}},并耗尽 + 亲爱的 {{ recipientName | default(workspaceName, true) }}, +

+

+ 您的工作区 {{workspaceName}} 已用完 {{usageScope | default('触发事件额度')}},并耗尽 {{planName}} 计划(上限:{{planLimit}}) 的全部额度。

@@ -121,19 +161,24 @@

为保证工作流不中断,请升级套餐以解锁更多触发事件额度。

+ {{ctaLabel}} +

+ + {% if resetLine is defined %} + {{ resetLine }} + {% else %} + {{planName}} 计划的触发事件额度{{resetDescription}} + {% endif %} + +

+
+
+

此致敬礼,

+

Dify 团队

- {{ctaLabel}} -

- - {% if resetLine is defined %} - {{ resetLine }} - {% else %} - {{planName}} 计划的触发事件额度{{resetDescription}} - {% endif %} - -

+ diff --git a/api/templates/trigger_events_usage_warning_template_en-US.html b/api/templates/trigger_events_usage_warning_template_en-US.html index 163cc468b1..14a228f7bd 100644 --- a/api/templates/trigger_events_usage_warning_template_en-US.html +++ b/api/templates/trigger_events_usage_warning_template_en-US.html @@ -18,9 +18,10 @@ .card { width: 600px; min-height: 454px; - margin: 40px auto; + margin: 40px auto 0; display: flex; flex-direction: column; + align-items: flex-start; background: #fcfcfd; border: 1px solid #ffffff; box-shadow: 0px 3px 10px -2px rgba(9, 9, 11, 0.08), 0px 2px 4px -2px rgba(9, 9, 11, 0.06); @@ -28,10 +29,12 @@ } .card-header { - padding: 36px 48px 24px; display: flex; + padding: 36px 48px 24px 48px; flex-direction: column; + align-items: flex-start; gap: 8px; + align-self: stretch; } .card-header img { @@ -41,9 +44,11 @@ .card-content { display: flex; + padding: 8px 48px 48px 48px; flex-direction: column; + align-items: flex-start; gap: 16px; - padding: 8px 48px 48px; + align-self: stretch; width: 100%; } @@ -59,7 +64,7 @@ display: flex; flex-direction: column; gap: 12px; - padding: 16px 0; + padding: 16px 0 0; } .body-text { @@ -100,6 +105,38 @@ letter-spacing: -0.005em; color: #354052; } + + .signature { + margin-top: 28px; + margin-bottom: 16px; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 12px; + width: 100%; + } + + .signature-text { + margin: 0; + font-size: 14px; + line-height: 20px; + letter-spacing: -0.005em; + color: #354052; + } + + .email-footer { + margin: 20px auto 40px; + max-width: 600px; + color: #676f83; + text-align: center; + font-family: 'Inter', 'Arial', sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 16px; + letter-spacing: -0.06px; + flex: 1 0 0; + } @@ -111,6 +148,9 @@

You’re nearing your Trigger Events limit

+

+ Dear {{ recipientName | default(workspaceName ~ ' team', true) }}, +

Your workspace {{workspaceName}} has used {{usagePercent}} of its {{usageScope}} for the {{planName}} Plan (limit: {{planLimit}}). @@ -122,19 +162,24 @@

{{upgradeHint}}

+ {{ctaLabel}} +

+ + {% if resetLine is defined %} + {{ resetLine }} + {% else %} + Trigger Events for the {{planName}} Plan {{resetDescription}} + {% endif %} + +

+
+
+

Best regards,

+

The Dify Team

- {{ctaLabel}} -

- - {% if resetLine is defined %} - {{ resetLine }} - {% else %} - Trigger Events for the {{planName}} Plan {{resetDescription}} - {% endif %} - -

+ diff --git a/api/templates/trigger_events_usage_warning_template_zh-CN.html b/api/templates/trigger_events_usage_warning_template_zh-CN.html index 2108a77448..885d7255a3 100644 --- a/api/templates/trigger_events_usage_warning_template_zh-CN.html +++ b/api/templates/trigger_events_usage_warning_template_zh-CN.html @@ -18,9 +18,10 @@ .card { width: 600px; min-height: 454px; - margin: 40px auto; + margin: 40px auto 0; display: flex; flex-direction: column; + align-items: flex-start; background: #fcfcfd; border: 1px solid #ffffff; box-shadow: 0px 3px 10px -2px rgba(9, 9, 11, 0.08), 0px 2px 4px -2px rgba(9, 9, 11, 0.06); @@ -28,10 +29,12 @@ } .card-header { - padding: 36px 48px 24px; display: flex; + padding: 36px 48px 24px 48px; flex-direction: column; + align-items: flex-start; gap: 8px; + align-self: stretch; } .card-header img { @@ -41,9 +44,11 @@ .card-content { display: flex; + padding: 8px 48px 48px 48px; flex-direction: column; + align-items: flex-start; gap: 16px; - padding: 8px 48px 48px; + align-self: stretch; width: 100%; } @@ -59,7 +64,7 @@ display: flex; flex-direction: column; gap: 12px; - padding: 16px 0; + padding: 16px 0 0; } .body-text { @@ -100,6 +105,38 @@ letter-spacing: -0.005em; color: #354052; } + + .signature { + margin-top: 28px; + margin-bottom: 16px; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 12px; + width: 100%; + } + + .signature-text { + margin: 0; + font-size: 14px; + line-height: 20px; + letter-spacing: -0.005em; + color: #354052; + } + + .email-footer { + margin: 20px auto 40px; + max-width: 600px; + color: #676f83; + text-align: center; + font-family: 'Inter', 'PingFang SC', 'Arial', sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 16px; + letter-spacing: -0.06px; + flex: 1 0 0; + } @@ -111,6 +148,9 @@

您的触发事件额度接近上限

+

+ 亲爱的 {{ recipientName | default(workspaceName, true) }}, +

您的工作区 {{workspaceName}} 已使用 {{usagePercent}}{{usageScope}},触及 {{planName}} 计划(上限:{{planLimit}})。 @@ -121,19 +161,24 @@

{{upgradeHint}}

+ {{ctaLabel}} +

+ + {% if resetLine is defined %} + {{ resetLine }} + {% else %} + {{planName}} 计划的触发事件额度{{resetDescription}} + {% endif %} + +

+
+
+

此致敬礼,

+

Dify 团队

- {{ctaLabel}} -

- - {% if resetLine is defined %} - {{ resetLine }} - {% else %} - {{planName}} 计划的触发事件额度{{resetDescription}} - {% endif %} - -

+