feat: 模型广场页面 - 新增 model_plaza.ui (TabPanel按分类/按供应商) - 新增 model_plaza.css (卡片悬浮效果/间距优化) - show_llms/show_llms_by_providers 添加 plaza-card/plaza-grid CSS - load_path.py 注册权限

This commit is contained in:
yumoqing 2026-05-31 11:08:10 +08:00
parent ce5cfc4463
commit dc007a30a9
5 changed files with 135 additions and 4 deletions

View File

@ -59,6 +59,7 @@ PATHS_LOGINED = [
f"/{MOD}/show_same_catelog_llm.ui", f"/{MOD}/show_same_catelog_llm.ui",
f"/{MOD}/show_llms.ui", f"/{MOD}/show_llms.ui",
f"/{MOD}/show_llms_by_providers.ui", f"/{MOD}/show_llms_by_providers.ui",
f"/{MOD}/model_plaza.ui",
f"/{MOD}/failed_accounting.ui", f"/{MOD}/failed_accounting.ui",
f"/{MOD}/llmcatelog_list.ui", f"/{MOD}/llmcatelog_list.ui",

65
wwwroot/model_plaza.css Normal file
View File

@ -0,0 +1,65 @@
/* Model Plaza — 模型广场 */
.plaza-header {
padding: 8px 16px 4px 16px;
}
.plaza-tabs .tab-bar {
border-bottom: 2px solid var(--sage-border, #e2e8f0);
}
.plaza-tabs .tab-item {
font-weight: 500;
transition: color 0.2s ease;
}
.plaza-tabs .tab-item:hover {
color: var(--sage-brand, #6366f1);
}
/* Card hover effects for model cards */
.plaza-card {
transition: transform 0.2s ease, box-shadow 0.2s ease;
cursor: pointer;
border-radius: 8px !important;
}
.plaza-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
/* Category section headers */
.plaza-section-title {
padding: 12px 0 4px 4px;
position: relative;
}
.plaza-section-title::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 4px;
height: 70%;
border-radius: 2px;
background: var(--sage-brand, #6366f1);
}
/* Smooth card grid */
.plaza-grid {
gap: 12px !important;
padding: 4px 0;
}
/* Model icon area */
.plaza-card .model-icon-row {
gap: 8px;
}
/* Description text */
.plaza-card .model-desc {
line-height: 1.5;
opacity: 0.85;
}

65
wwwroot/model_plaza.ui Normal file
View File

@ -0,0 +1,65 @@
{
"widgettype": "VBox",
"options": {
"css": "filler",
"width": "100%"
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"css": "plaza-header",
"width": "100%"
},
"subwidgets": [
{
"widgettype": "Title2",
"options": {
"otext": "模型广场",
"i18n": true,
"halign": "left"
}
},
{
"widgettype": "Text",
"options": {
"otext": "探索和使用各类AI模型",
"i18n": true,
"halign": "left",
"wrap": true
}
}
]
},
{
"widgettype": "TabPanel",
"id": "plaza_tabs",
"options": {
"css": "filler plaza-tabs",
"tab_pos": "top",
"items": [
{
"name": "by_catelog",
"label": "按分类",
"content": {
"widgettype": "urlwidget",
"options": {
"url": "{{entire_url('show_llms.ui')}}"
}
}
},
{
"name": "by_provider",
"label": "按供应商",
"content": {
"widgettype": "urlwidget",
"options": {
"url": "{{entire_url('show_llms_by_providers.ui')}}"
}
}
}
]
}
}
]
}

View File

@ -25,7 +25,7 @@
{ {
"widgettype":"DynamicColumn", "widgettype":"DynamicColumn",
"options":{ "options":{
"css":"filler", "css":"filler plaza-grid",
"width":"100%" "width":"100%"
}, },
"subwidgets":[ "subwidgets":[
@ -33,7 +33,7 @@
{ {
"widgettype":"VScrollPanel", "widgettype":"VScrollPanel",
"options":{ "options":{
"css":"card", "css":"card plaza-card",
"cwidth":20, "cwidth":20,
"cheight":12 "cheight":12
}, },

View File

@ -24,7 +24,7 @@
{ {
"widgettype":"DynamicColumn", "widgettype":"DynamicColumn",
"options":{ "options":{
"css":"filler", "css":"filler plaza-grid",
"width":"100%" "width":"100%"
}, },
"subwidgets":[ "subwidgets":[
@ -32,7 +32,7 @@
{ {
"widgettype":"VScrollPanel", "widgettype":"VScrollPanel",
"options":{ "options":{
"css":"card", "css":"card plaza-card",
"cwidth":20, "cwidth":20,
"cheight":12 "cheight":12
}, },