- show_llms/show_llms_by_providers的HBox加css:filler - 右侧urlwidget加css:filler - show_llms_cards两个文件的VScrollPanel加css:filler - CSS中为tabpanel-content和scrollpanel添加flex布局确保高度传递
92 lines
1.8 KiB
XML
92 lines
1.8 KiB
XML
{% set catelogid = params_kw.get('catelogid', None) %}
|
|
{% set data = get_llms_by_catelog(catelogid=catelogid) %}
|
|
{% set ns = namespace(first=true) %}
|
|
{
|
|
"widgettype":"VScrollPanel",
|
|
"options":{
|
|
"css":"filler",
|
|
"width":"100%",
|
|
"height":"100%"
|
|
},
|
|
"subwidgets":[
|
|
{
|
|
"widgettype":"DynamicColumn",
|
|
"options":{
|
|
"css":"filler plaza-grid",
|
|
"width":"100%"
|
|
},
|
|
"subwidgets":[
|
|
{% for cate in data %}
|
|
{% for llm in cate.llms %}
|
|
{% if not ns.first %},{% endif %}
|
|
{
|
|
"widgettype":"VScrollPanel",
|
|
"options":{
|
|
"css":"card plaza-card",
|
|
"cwidth":25,
|
|
"cheight":12
|
|
},
|
|
"subwidgets":[
|
|
{
|
|
"widgettype":"HBox",
|
|
"options":{
|
|
"cheight":2
|
|
},
|
|
"subwidgets":[
|
|
{
|
|
"widgettype":"Svg",
|
|
"options":{
|
|
"rate":1.5,
|
|
"url":"{{entire_url('/appbase/show_icon.dspy')}}?id={{llm.iconid}}"
|
|
}
|
|
},
|
|
{
|
|
"widgettype":"Title6",
|
|
"options":{
|
|
"text":"{{llm.name}}"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype":"Text",
|
|
"options":{
|
|
"text":{{json.dumps(llm.description, ensure_ascii=False)}},
|
|
"wrap":true,
|
|
"halign":"left"
|
|
}
|
|
}
|
|
],
|
|
"binds":[
|
|
{
|
|
"wid":"self",
|
|
"event":"click",
|
|
"actiontype":"urlwidget",
|
|
"target":"PopupWindow",
|
|
"popup_options":{
|
|
"title":"{{llm.name}}",
|
|
{% if int(params_kw._is_mobile) %}
|
|
"width": "100%",
|
|
"height": "100%"
|
|
{% else %}
|
|
"width": "40%",
|
|
"height":"85%"
|
|
{% endif %}
|
|
},
|
|
"options":{
|
|
"params":{
|
|
"id":"{{llm.id}}"
|
|
},
|
|
"url":"{{entire_url('./llm_dialog.ui')}}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
{% set ns.first = false %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
]
|
|
}
|
|
]
|
|
}
|