mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-15 23:15:52 +08:00
fix: wrong title location
This commit is contained in:
parent
ea769c6483
commit
d72b4752c9
@ -195,3 +195,11 @@ class FeatureService:
|
|||||||
|
|
||||||
if "expired_at" in license_info:
|
if "expired_at" in license_info:
|
||||||
features.license.expired_at = license_info["expiredAt"]
|
features.license.expired_at = license_info["expiredAt"]
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_enterprise_application_title(cls):
|
||||||
|
branding = cls.get_system_features().get("branding", None)
|
||||||
|
application_title = "Dify"
|
||||||
|
if branding and branding.get("enabled", False):
|
||||||
|
application_title = branding.get("application_title", "Dify")
|
||||||
|
return application_title
|
||||||
|
@ -29,7 +29,7 @@ def send_email_code_login_mail_task(language: str, to: str, code: str):
|
|||||||
if language == "zh-Hans":
|
if language == "zh-Hans":
|
||||||
template = "email_code_login_mail_template_zh-CN.html"
|
template = "email_code_login_mail_template_zh-CN.html"
|
||||||
if dify_config.ENTERPRISE_ENABLED:
|
if dify_config.ENTERPRISE_ENABLED:
|
||||||
application_title = FeatureService.get_system_features().get("application_title", "Dify")
|
application_title = FeatureService.get_enterprise_application_title()
|
||||||
template = "without-brand/email_code_login_mail_template_zh-CN_enterprise.html"
|
template = "without-brand/email_code_login_mail_template_zh-CN_enterprise.html"
|
||||||
html_content = render_template(template, to=to, code=code, application_title=application_title)
|
html_content = render_template(template, to=to, code=code, application_title=application_title)
|
||||||
else:
|
else:
|
||||||
@ -38,7 +38,7 @@ def send_email_code_login_mail_task(language: str, to: str, code: str):
|
|||||||
else:
|
else:
|
||||||
template = "email_code_login_mail_template_en-US.html"
|
template = "email_code_login_mail_template_en-US.html"
|
||||||
if dify_config.ENTERPRISE_ENABLED:
|
if dify_config.ENTERPRISE_ENABLED:
|
||||||
application_title = FeatureService.get_system_features().get("application_title", "Dify")
|
application_title = FeatureService.get_enterprise_application_title()
|
||||||
template = "without-brand/email_code_login_mail_template_en-US_enterprise.html"
|
template = "without-brand/email_code_login_mail_template_en-US_enterprise.html"
|
||||||
html_content = render_template(template, to=to, code=code, application_title=application_title)
|
html_content = render_template(template, to=to, code=code, application_title=application_title)
|
||||||
else:
|
else:
|
||||||
|
@ -36,7 +36,7 @@ def send_invite_member_mail_task(language: str, to: str, token: str, inviter_nam
|
|||||||
if language == "zh-Hans":
|
if language == "zh-Hans":
|
||||||
template = "invite_member_mail_template_zh-CN.html"
|
template = "invite_member_mail_template_zh-CN.html"
|
||||||
if dify_config.ENTERPRISE_ENABLED:
|
if dify_config.ENTERPRISE_ENABLED:
|
||||||
application_title = FeatureService.get_system_features().get("application_title", "Dify")
|
application_title = FeatureService.get_enterprise_application_title()
|
||||||
template = "without-brand/invite_member_mail_template_zh-CN.html"
|
template = "without-brand/invite_member_mail_template_zh-CN.html"
|
||||||
html_content = render_template(
|
html_content = render_template(
|
||||||
template,
|
template,
|
||||||
@ -54,7 +54,7 @@ def send_invite_member_mail_task(language: str, to: str, token: str, inviter_nam
|
|||||||
else:
|
else:
|
||||||
template = "invite_member_mail_template_en-US.html"
|
template = "invite_member_mail_template_en-US.html"
|
||||||
if dify_config.ENTERPRISE_ENABLED:
|
if dify_config.ENTERPRISE_ENABLED:
|
||||||
application_title = FeatureService.get_system_features().get("application_title", "Dify")
|
application_title = FeatureService.get_enterprise_application_title()
|
||||||
template = "without-brand/invite_member_mail_template_en-US.html"
|
template = "without-brand/invite_member_mail_template_en-US.html"
|
||||||
html_content = render_template(
|
html_content = render_template(
|
||||||
template,
|
template,
|
||||||
|
@ -29,7 +29,7 @@ def send_reset_password_mail_task(language: str, to: str, code: str):
|
|||||||
if language == "zh-Hans":
|
if language == "zh-Hans":
|
||||||
template = "reset_password_mail_template_zh-CN.html"
|
template = "reset_password_mail_template_zh-CN.html"
|
||||||
if dify_config.ENTERPRISE_ENABLED:
|
if dify_config.ENTERPRISE_ENABLED:
|
||||||
application_title = FeatureService.get_system_features().get("application_title", "Dify")
|
application_title = FeatureService.get_enterprise_application_title()
|
||||||
template = "without-brand/reset_password_mail_template_zh-CN.html"
|
template = "without-brand/reset_password_mail_template_zh-CN.html"
|
||||||
html_content = render_template(template, to=to, code=code, application_title=application_title)
|
html_content = render_template(template, to=to, code=code, application_title=application_title)
|
||||||
else:
|
else:
|
||||||
@ -38,7 +38,7 @@ def send_reset_password_mail_task(language: str, to: str, code: str):
|
|||||||
else:
|
else:
|
||||||
template = "reset_password_mail_template_en-US.html"
|
template = "reset_password_mail_template_en-US.html"
|
||||||
if dify_config.ENTERPRISE_ENABLED:
|
if dify_config.ENTERPRISE_ENABLED:
|
||||||
application_title = FeatureService.get_system_features().get("application_title", "Dify")
|
application_title = FeatureService.get_enterprise_application_title()
|
||||||
template = "without-brand/reset_password_mail_template_en-US.html"
|
template = "without-brand/reset_password_mail_template_en-US.html"
|
||||||
html_content = render_template(template, to=to, code=code, application_title=application_title)
|
html_content = render_template(template, to=to, code=code, application_title=application_title)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user