diff --git a/wwwroot/knowledge_bases_list/detail.ui b/wwwroot/knowledge_bases_list/detail.ui new file mode 100644 index 0000000..9dda2a3 --- /dev/null +++ b/wwwroot/knowledge_bases_list/detail.ui @@ -0,0 +1,163 @@ +{ + "widgettype": "VBox", + "options": { + "cheight": 40, + "width": "100%", + "padding": "0", + "spacing": 0 + }, + "subwidgets": [ + { + "widgettype": "HBox", + "options": { + "width": "100%", + "bgcolor": "#f8f9fa", + "padding": "12px 16px", + "alignItems": "center", + "borderBottom": "1px solid #e0e0e0" + }, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "← 返回知识库列表", "css": "clickable", "cfontsize": 14, "color": "#4a90d9"}, "binds": [ + {"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rag_main_content", "mode": "replace", "options": {"url": "{{entire_url('/knowledge_bases_list/index.ui')}}"}} + ]}, + {"widgettype": "Text", "options": {"text": "/", "cfontsize": 14, "color": "#ccc"}}, + {"widgettype": "Text", "options": {"text": "📚 产品文档", "cfontsize": 16, "fontWeight": "bold", "color": "#333"}}, + {"widgettype": "Text", "options": {"text": "", "css": "filler"}}, + {"widgettype": "Text", "options": {"text": "📄 12 文档 · 📁 3 目录 · 💾 256MB", "cfontsize": 12, "color": "#888"}} + ] + }, + { + "widgettype": "HBox", + "options": { + "css": "filler", + "width": "100%", + "spacing": 0 + }, + "subwidgets": [ + { + "widgettype": "VBox", + "options": { + "cwidth": 14, + "bgcolor": "#fafafa", + "borderRight": "1px solid #e0e0e0", + "padding": "12px", + "spacing": "4px" + }, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📁 目录结构", "cfontsize": 13, "fontWeight": "bold", "color": "#666"}}, + {"widgettype": "Text", "options": {"text": ""}}, + { + "widgettype": "HBox", + "options": {"spacing": "4px", "alignItems": "center"}, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📂", "cfontsize": 12}}, + {"widgettype": "Text", "options": {"text": "技术文档", "cfontsize": 13, "color": "#4a90d9", "css": "clickable"}} + ] + }, + { + "widgettype": "VBox", + "options": {"padding": "0 0 0 16px", "spacing": "2px"}, + "subwidgets": [ + {"widgettype": "HBox", "options": {"spacing": "4px"}, "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📄", "cfontsize": 11}}, + {"widgettype": "Text", "options": {"text": "API参考.pdf", "cfontsize": 12, "color": "#666"}} + ]}, + {"widgettype": "HBox", "options": {"spacing": "4px"}, "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📄", "cfontsize": 11}}, + {"widgettype": "Text", "options": {"text": "部署指南.md", "cfontsize": 12, "color": "#666"}} + ]} + ] + }, + {"widgettype": "Text", "options": {"text": ""}}, + { + "widgettype": "HBox", + "options": {"spacing": "4px", "alignItems": "center"}, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📂", "cfontsize": 12}}, + {"widgettype": "Text", "options": {"text": "产品介绍", "cfontsize": 13, "color": "#4a90d9", "css": "clickable"}} + ] + }, + { + "widgettype": "HBox", + "options": {"spacing": "4px", "alignItems": "center"}, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📂", "cfontsize": 12}}, + {"widgettype": "Text", "options": {"text": "培训材料", "cfontsize": 13, "color": "#4a90d9", "css": "clickable"}} + ] + }, + {"widgettype": "Text", "options": {"text": ""}}, + {"widgettype": "Button", "options": {"label": "+ 新建目录", "bgcolor": "#e8e8e8", "color": "#666"}} + ] + }, + { + "widgettype": "VBox", + "options": { + "css": "filler", + "padding": "16px", + "spacing": "12px" + }, + "subwidgets": [ + { + "widgettype": "VBox", + "options": { + "width": "100%", + "cheight": 6, + "bgcolor": "#f8f9fa", + "padding": "16px", + "css": "card", + "border": "2px dashed #d0d0d0", + "alignItems": "center", + "justifyContent": "center" + }, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📂 拖拽文件到此处上传", "cfontsize": 15, "color": "#888"}}, + {"widgettype": "Text", "options": {"text": "支持: TXT, PDF, JPG, PNG, MP3, WAV, MP4 · 最大500MB", "cfontsize": 11, "color": "#aaa"}} + ] + }, + { + "widgettype": "Text", + "options": { + "text": "📄 当前目录: 技术文档 (2个文件)", + "cfontsize": 13, + "color": "#888" + } + }, + { + "widgettype": "HBox", + "options": {"width": "100%", "bgcolor": "#f8f9fa", "padding": "8px 12px", "borderBottom": "1px solid #e0e0e0"}, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "文件名", "cfontsize": 12, "fontWeight": "bold", "color": "#888", "cwidth": 20}}, + {"widgettype": "Text", "options": {"text": "类型", "cfontsize": 12, "fontWeight": "bold", "color": "#888", "cwidth": 8}}, + {"widgettype": "Text", "options": {"text": "大小", "cfontsize": 12, "fontWeight": "bold", "color": "#888", "cwidth": 8}}, + {"widgettype": "Text", "options": {"text": "状态", "cfontsize": 12, "fontWeight": "bold", "color": "#888", "cwidth": 8}}, + {"widgettype": "Text", "options": {"text": "上传时间", "cfontsize": 12, "fontWeight": "bold", "color": "#888"}} + ] + }, + { + "widgettype": "HBox", + "options": {"width": "100%", "padding": "6px 12px", "borderBottom": "1px solid #f0f0f0"}, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📄 API参考.pdf", "cfontsize": 13, "color": "#333", "cwidth": 20}}, + {"widgettype": "Text", "options": {"text": "PDF", "cfontsize": 12, "color": "#e6a23c", "cwidth": 8}}, + {"widgettype": "Text", "options": {"text": "1.2MB", "cfontsize": 12, "color": "#888", "cwidth": 8}}, + {"widgettype": "Text", "options": {"text": "✅ 已入库", "cfontsize": 12, "color": "#50b86c", "cwidth": 8}}, + {"widgettype": "Text", "options": {"text": "2026-07-20", "cfontsize": 12, "color": "#888"}} + ] + }, + { + "widgettype": "HBox", + "options": {"width": "100%", "padding": "6px 12px", "borderBottom": "1px solid #f0f0f0"}, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📄 部署指南.md", "cfontsize": 13, "color": "#333", "cwidth": 20}}, + {"widgettype": "Text", "options": {"text": "Markdown", "cfontsize": 12, "color": "#4a90d9", "cwidth": 8}}, + {"widgettype": "Text", "options": {"text": "45KB", "cfontsize": 12, "color": "#888", "cwidth": 8}}, + {"widgettype": "Text", "options": {"text": "✅ 已入库", "cfontsize": 12, "color": "#50b86c", "cwidth": 8}}, + {"widgettype": "Text", "options": {"text": "2026-07-21", "cfontsize": 12, "color": "#888"}} + ] + } + ] + } + ] + } + ] +} diff --git a/wwwroot/knowledge_bases_list/index.ui b/wwwroot/knowledge_bases_list/index.ui index 6c04f6b..262df7b 100644 --- a/wwwroot/knowledge_bases_list/index.ui +++ b/wwwroot/knowledge_bases_list/index.ui @@ -19,8 +19,8 @@ "widgettype": "VBox", "options": {"spacing": "4px"}, "subwidgets": [ - {"widgettype": "Text", "options": {"text": "知识库管理", "cfontsize": 22, "fontWeight": "bold", "color": "#333"}}, - {"widgettype": "Text", "options": {"text": "创建和管理您的多媒体知识库", "cfontsize": 14, "color": "#888"}} + {"widgettype": "Text", "options": {"text": "知识库", "cfontsize": 22, "fontWeight": "bold", "color": "#333"}}, + {"widgettype": "Text", "options": {"text": "点击知识库进入文档管理,支持多级目录和拖拽上传", "cfontsize": 14, "color": "#888"}} ] }, { @@ -34,13 +34,75 @@ ] }, { - "widgettype": "Text", + "widgettype": "HBox", "options": { - "text": "暂无知识库,点击上方按钮创建第一个知识库", - "color": "#aaa", - "cfontsize": 14, - "halign": "center" - } + "width": "100%", + "spacing": "12px", + "wrap": true + }, + "subwidgets": [ + { + "widgettype": "VBox", + "options": { + "cwidth": 16, + "cheight": 12, + "bgcolor": "#f0f7ff", + "padding": "16px", + "css": "card clickable", + "border": "1px solid #d0e4f7" + }, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📚 产品文档", "cfontsize": 16, "fontWeight": "bold"}}, + {"widgettype": "Text", "options": {"text": "CLIP · 1024维", "cfontsize": 12, "color": "#888"}}, + {"widgettype": "HBox", "options": {"spacing": "12px"}, "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📄 12文档", "cfontsize": 12, "color": "#666"}}, + {"widgettype": "Text", "options": {"text": "📁 3目录", "cfontsize": 12, "color": "#666"}}, + {"widgettype": "Text", "options": {"text": "💾 256MB", "cfontsize": 12, "color": "#666"}} + ]} + ], + "binds": [ + {"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rag_main_content", "mode": "replace", "options": {"url": "{{entire_url('/knowledge_bases_list/detail.ui')}}"}} + ] + }, + { + "widgettype": "VBox", + "options": { + "cwidth": 16, + "cheight": 12, + "bgcolor": "#f8f9fa", + "padding": "16px", + "css": "card clickable", + "border": "1px solid #e0e0e0" + }, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "🎵 音频资料库", "cfontsize": 16, "fontWeight": "bold"}}, + {"widgettype": "Text", "options": {"text": "Whisper · 音频向量化", "cfontsize": 12, "color": "#888"}}, + {"widgettype": "HBox", "options": {"spacing": "12px"}, "subwidgets": [ + {"widgettype": "Text", "options": {"text": "📄 45文档", "cfontsize": 12, "color": "#666"}}, + {"widgettype": "Text", "options": {"text": "📁 5目录", "cfontsize": 12, "color": "#666"}}, + {"widgettype": "Text", "options": {"text": "💾 1.2GB", "cfontsize": 12, "color": "#666"}} + ]} + ], + "binds": [ + {"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rag_main_content", "mode": "replace", "options": {"url": "{{entire_url('/knowledge_bases_list/detail.ui')}}"}} + ] + }, + { + "widgettype": "VBox", + "options": { + "cwidth": 16, + "cheight": 12, + "bgcolor": "#f8f9fa", + "padding": "16px", + "css": "card clickable", + "border": "1px solid #e0e0e0" + }, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "+ 新建知识库", "cfontsize": 16, "color": "#aaa", "halign": "center"}}, + {"widgettype": "Text", "options": {"text": "点击创建", "cfontsize": 12, "color": "#ccc", "halign": "center"}} + ] + } + ] } ] } diff --git a/wwwroot/menu.ui b/wwwroot/menu.ui index 21584f7..047357f 100644 --- a/wwwroot/menu.ui +++ b/wwwroot/menu.ui @@ -6,31 +6,27 @@ "options": { "width": "100%", "height": "100%", - "target": "body.rag_main_content", "items": [ { "name": "knowledge_bases", "label": "知识库", "icon": "{{entire_url('/bricks/imgs/app.svg')}}", - "url": "{{entire_url('/knowledge_bases_list/index.ui')}}" - }, - { - "name": "documents", - "label": "文档管理", - "icon": "{{entire_url('/bricks/imgs/app_add.svg')}}", - "url": "{{entire_url('/documents_list/index.ui')}}" + "url": "{{entire_url('/knowledge_bases_list/index.ui')}}", + "target": "app.rag_main_content" }, { "name": "engines", "label": "引擎配置", "icon": "{{entire_url('/bricks/imgs/rocket.svg')}}", - "url": "{{entire_url('/engine_configs_list/index.ui')}}" + "url": "{{entire_url('/engine_configs_list/index.ui')}}", + "target": "app.rag_main_content" }, { "name": "subscriptions", "label": "订阅管理", "icon": "{{entire_url('/bricks/imgs/coins.svg')}}", - "url": "{{entire_url('/subscriptions_list/index.ui')}}" + "url": "{{entire_url('/subscriptions_list/index.ui')}}", + "target": "app.rag_main_content" } ] }