diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 32e436b..38e92e6 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -11,21 +11,23 @@ { "widgettype": "urlwidget", "options": { + "cheight": 2.5, "url": "{{entire_url('/top.ui')}}" } }, { "widgettype": "HBox", "options": { - "css": "main-area", - "spacing": 0, - "width": "100%" + "css": "filler", + "width": "100%", + "spacing": 0 }, "subwidgets": [ { "widgettype": "VBox", "options": { - "css": "rag-sidebar" + "css": "rag-sidebar", + "cwidth": 13 }, "subwidgets": [ { @@ -117,15 +119,14 @@ "widgettype": "VBox", "options": { "id": "rag_main_content", - "css": "rag-content", - "padding": "0" + "css": "filler", + "padding": "8px" }, "subwidgets": [ { "widgettype": "Text", "options": { "text": "欢迎使用 RAG Server — 多媒体知识库平台", - "css": "", "i18n": false } } @@ -136,7 +137,7 @@ { "widgettype": "Text", "options": { - "text": "© 2026 RAG Server · 开元云科技", + "text": "© 2026 RAG Server", "css": "rag-bottom" } } diff --git a/wwwroot/menu.ui b/wwwroot/menu.ui new file mode 100644 index 0000000..6b5b43c --- /dev/null +++ b/wwwroot/menu.ui @@ -0,0 +1,40 @@ +{% set roles = get_user_roles(get_user()) %} +{% set role_str = roles|join(',') %} +{ + "widgettype": "Menu", + "id": "rag_menu", + "options": { + "width": "100%", + "height": "100%", + "items": [ + { + "name": "knowledge_bases", + "label": "知识库", + "icon": "{{entire_url('/bricks/imgs/app.svg')}}", + "url": "{{entire_url('/knowledge_bases_list/index.ui')}}", + "target": "app.rag_main_content" + }, + { + "name": "documents", + "label": "文档管理", + "icon": "{{entire_url('/bricks/imgs/app_add.svg')}}", + "url": "{{entire_url('/documents_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')}}", + "target": "app.rag_main_content" + }, + { + "name": "subscriptions", + "label": "订阅管理", + "icon": "{{entire_url('/bricks/imgs/coins.svg')}}", + "url": "{{entire_url('/subscriptions_list/index.ui')}}", + "target": "app.rag_main_content" + } + ] + } +} diff --git a/wwwroot/top.ui b/wwwroot/top.ui index 57a98c8..5302312 100644 --- a/wwwroot/top.ui +++ b/wwwroot/top.ui @@ -11,30 +11,44 @@ }, "subwidgets": [ { - "widgettype": "Svg", + "widgettype": "HBox", "options": { - "rate": 2, - "url": "{{entire_url('/bricks/imgs/app.svg')}}", "css": "clickable", - "tip": "RAG Server" + "tip": "主菜单" }, + "subwidgets": [ + { + "widgettype": "Svg", + "options": { + "rate": 2, + "url": "{{entire_url('/bricks/imgs/app.svg')}}" + } + }, + { + "widgettype": "Text", + "options": { + "text": "RAG Server", + "i18n": false + } + } + ], "binds": [ { "wid": "self", "event": "click", - "actiontype": "script", - "script": "bricks.app.show_windows_panel(event)" + "actiontype": "urlwidget", + "target": "Popup", + "popup_options": { + "cwidth": 12, + "eventpos": true, + "dismiss_events": ["command"] + }, + "options": { + "url": "{{entire_url('/menu.ui')}}" + } } ] }, - { - "widgettype": "Text", - "options": { - "text": "RAG Server", - "i18n": false, - "css": "" - } - }, { "widgettype": "Text", "options": {