Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: web app text (#1784)

zxhlyh867fc61b12a8
diff --git a/api/controllers/web/site.py b/api/controllers/web/site.py
index 4ca5ad05d9c..e5c27c18c1c 100644
--- a/api/controllers/web/site.py
+++ b/api/controllers/web/site.py
@@ -85,7 +85,7 @@ class AppSiteInfo:
if can_replace_logo:
base_url = current_app.config.get('FILES_URL')
remove_webapp_brand = tenant.custom_config_dict.get('remove_webapp_brand', False)
- replace_webapp_logo = f'{base_url}/files/workspaces/{tenant.id}/webapp-logo' if tenant.custom_config_dict['replace_webapp_logo'] else None
+ replace_webapp_logo = f'{base_url}/files/workspaces/{tenant.id}/webapp-logo' if tenant.custom_config_dict.get('replace_webapp_logo') else None
self.custom_config = {
'remove_webapp_brand': remove_webapp_brand,
'replace_webapp_logo': replace_webapp_logo,
diff --git a/api/models/account.py b/api/models/account.py
index 2e2c831dedd..5a86b4f8e0f 100644
--- a/api/models/account.py
+++ b/api/models/account.py
@@ -127,7 +127,7 @@ class Tenant(db.Model):
@property
def custom_config_dict(self) -> dict:
- return json.loads(self.custom_config) if self.custom_config else None
+ return json.loads(self.custom_config) if self.custom_config else {}
@custom_config_dict.setter
def custom_config_dict(self, value: dict):
diff --git a/web/i18n/lang/custom.en.ts b/web/i18n/lang/custom.en.ts
index 5e7f8bbf967..2d931a8da27 100644
--- a/web/i18n/lang/custom.en.ts
+++ b/web/i18n/lang/custom.en.ts
@@ -5,7 +5,7 @@ const translation = {
suffix: 'customize your brand.',
},
webapp: {
- title: 'Customize web app brand',
+ title: 'Customize WebApp brand',
removeBrand: 'Remove Powered by Dify',
changeLogo: 'Change Powered by Brand Image',
changeLogoTip: 'SVG or PNG format with a minimum size of 40x40px',
diff --git a/web/i18n/lang/custom.zh.ts b/web/i18n/lang/custom.zh.ts
index 9910e0fa61a..f8813831a33 100644
--- a/web/i18n/lang/custom.zh.ts
+++ b/web/i18n/lang/custom.zh.ts
@@ -5,7 +5,7 @@ const translation = {
suffix: '定制您的品牌。',
},
webapp: {
- title: '定制 web app 品牌',
+ title: '定制 WebApp 品牌',
removeBrand: '移除 Powered by Dify',
changeLogo: '更改 Powered by Brand 图片',
changeLogoTip: 'SVG 或 PNG 格式,最小尺寸为 40x40px',