llmage/wwwroot/plaza_model_cards.ui
yumoqing 659af09a89 feat: Tabular seamless infinite scroll instead of page buttons
Tabular handles paging client-side — scroll to bottom auto-loads more.
Record_view renders each model as a card (icon + name + description).
Removed all server-side pagination logic from the template.
2026-07-29 15:13:13 +08:00

76 lines
3.0 KiB
XML

{% set providerid = params_kw.get('providerid', '') %}
{% set catelogid = params_kw.get('catelogid', '') %}
{% set search = params_kw.get('search', '') %}
{
"widgettype": "VBox",
"options": {"css": "filler", "width": "100%", "height": "100%"},
"subwidgets": [
{
"widgettype": "Tabular",
"options": {
"css": "filler",
"width": "100%",
"height": "100%",
"data_url": "{{entire_url('api/get_plaza_models.dspy')}}?providerid={{providerid}}&catelogid={{catelogid}}&search={{search}}",
"pagerows": 20,
"record_view": {
"widgettype": "VBox",
"options": {
"css": "card plaza-card",
"width": "100%",
"cheight": 10,
"marginBottom": "8px"
},
"subwidgets": [
{
"widgettype": "HBox",
"options": {"cheight": 2, "alignItems": "center", "gap": "4px"},
"subwidgets": [
{
"widgettype": "Svg",
"options": {"rate": 1.5, "url": "{{entire_url('/appbase/show_icon.dspy')}}?id=${iconid}"}
},
{
"widgettype": "Title6",
"options": {"text": "${name}"}
}
]
},
{
"widgettype": "Text",
"options": {
"height": "auto",
"text": "${description}",
"wrap": true,
"halign": "left"
}
}
],
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {
"title": "${name}",
{% if int(params_kw._is_mobile or 0) %}
"width": "100%",
"height": "100%"
{% else %}
"width": "40%",
"height": "85%"
{% endif %}
},
"options": {
"params": {"id": "${id}"},
"url": "{{entire_url('./llm_dialog.ui')}}"
}
}
]
}
}
}
]
}