From 513591fe675c10fa83089ec799a8e0c405436df2 Mon Sep 17 00:00:00 2001 From: sagitchu Date: Fri, 3 Apr 2026 17:27:48 +0800 Subject: [PATCH] feat(ui): conditionally render brand settings inside commercial license card --- vite-frontend/src/pages/config.tsx | 34 +++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/vite-frontend/src/pages/config.tsx b/vite-frontend/src/pages/config.tsx index 0822651..25c38fb 100644 --- a/vite-frontend/src/pages/config.tsx +++ b/vite-frontend/src/pages/config.tsx @@ -487,6 +487,11 @@ export default function ConfigPage() { // 检查配置项是否应该显示(依赖检查) const shouldShowItem = (item: ConfigItem): boolean => { + // 隐藏商业版专属的设置项,它们会在专门的卡片中展示 + if (["app_name", "app_logo", "app_favicon", "hide_footer_brand"].includes(item.key)) { + return false; + } + if (!item.dependsOn || !item.dependsValue) { return true; } @@ -968,7 +973,7 @@ export default function ConfigPage() { -
+
+ + {configs.is_commercial === "true" && ( +
+ +

白标与品牌设置

+ {CONFIG_ITEMS.filter(item => ["app_name", "app_logo", "app_favicon", "hide_footer_brand"].includes(item.key)).map((item, index) => ( +
+
+
+ + {item.description && ( +

+ {item.description} +

+ )} +
+
+ {renderConfigItem(item)} +
+
+ {index < 3 && } +
+ ))} +
+ )}