From a0a6ea8e0805c3b1385a72a0b3657137bc593320 Mon Sep 17 00:00:00 2001 From: liuwei Date: Mon, 20 Apr 2026 15:22:10 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20=E6=96=B0=E5=A2=9EDify=E9=AB=98=E7=BA=A7?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=8A=98=E5=8F=A0=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 变更项: 1. Dify应用卡片新增‘展开/收起高级配置’按钮,默认收起。 2. 高级面板内提供可选覆盖字段:mode/endpoint/response_mode/request_timeout。 3. 保持主表单只展示刚需字段,兼顾简洁维护与高级调优。 4. 保存时移除前端状态字段 advanced_open,避免污染后端配置数据。 --- admin/dashboard/templates/system_llm.html | 33 ++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/admin/dashboard/templates/system_llm.html b/admin/dashboard/templates/system_llm.html index 4de79e7..3604102 100644 --- a/admin/dashboard/templates/system_llm.html +++ b/admin/dashboard/templates/system_llm.html @@ -87,7 +87,12 @@
{% raw %}{{ item.name || `DifyApp ${index + 1}` }}{% endraw %} - 删除 +
+ + {% raw %}{{ item.advanced_open ? '收起高级配置' : '展开高级配置' }}{% endraw %} + + 删除 +
@@ -102,6 +107,15 @@
+
+
高级覆盖项(可选)
+
+ + + + +
+
@@ -255,6 +269,7 @@ newDifyApp() { return { uid: this.newUid(), + advanced_open: false, name: '', provider_template: '', app_key: '', @@ -305,6 +320,7 @@ normalizeDifyApp(item) { return { uid: this.newUid(), + advanced_open: false, name: item.name || '', provider_template: item.provider_template || '', app_key: item.app_key || '', @@ -439,6 +455,7 @@ dify_apps: (this.catalog.dify_apps || []).map(item => { const cleaned = { ...item }; delete cleaned.uid; + delete cleaned.advanced_open; return cleaned; }), backends: (this.catalog.backends || []).map(item => { @@ -499,7 +516,21 @@ .section-list { display: flex; flex-direction: column; gap: 12px; } .entry-card { border: 1px solid rgba(148,163,184,0.16); border-radius: 14px; } .entry-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; } + .entry-actions { display: flex; align-items: center; gap: 10px; } .entry-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 10px 14px; } + .advanced-panel { + margin-top: 12px; + padding: 12px; + border-radius: 10px; + border: 1px dashed rgba(148,163,184,0.5); + background: rgba(148,163,184,0.06); + } + .advanced-title { + font-size: 12px; + color: #475569; + margin-bottom: 10px; + font-weight: 600; + } .scene-row { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px) minmax(220px, 1fr) auto;