ui: plaza card layout — fixed VBox, title 2ch, filler scroll with desc+price

Each card is a cwidth:15 cheight:12 VBox:
- Title row: cheight:2 (icon + name)
- VScrollPanel css:filler: description (height:auto) + pricing (css:filler)
This commit is contained in:
yumoqing 2026-07-29 12:00:04 +08:00
parent 0cb307407c
commit 32000e8757

View File

@ -32,7 +32,7 @@
"subwidgets": [ "subwidgets": [
{ {
"widgettype": "HBox", "widgettype": "HBox",
"options": {"cheight": 2}, "options": {"cheight": 2, "alignItems": "center", "gap": "4px"},
"subwidgets": [ "subwidgets": [
{ {
"widgettype": "Svg", "widgettype": "Svg",
@ -46,38 +46,36 @@
}, },
{ {
"widgettype": "VScrollPanel", "widgettype": "VScrollPanel",
"options": {"css": "card-body-scroll", "flex": "1"}, "options": {"css": "filler", "flex": "1"},
"subwidgets": [ "subwidgets": [
{ {
"widgettype": "Text", "widgettype": "Text",
"options": { "options": {
"height": "auto", "height": "auto",
"text": {{json.dumps(llm.description, ensure_ascii=False)}}, "text": {{json.dumps(llm.description, ensure_ascii=False)}},
"wrap": true, "wrap": true,
"halign": "left" "halign": "left"
} }
} }
] {% if llm.pricing_display %}
}, ,{
{ "widgettype": "VBox",
"widgettype": "VBox", "options": {"css": "filler"},
"options": {"css": "filler", "cheight": 4}, "subwidgets": [
"subwidgets": [ {% for pt in llm.pricing_display %}
{% set pricing_text = llm.pricing_display %} {
{% if type(pricing_text) == type("") %} "widgettype": "Text",
{% set pricing_text = [pricing_text] %} "options": {
{% endif %} "text": {{json.dumps(pt, ensure_ascii=False)}},
{% for pt in pricing_text %} "wrap": true,
{ "halign": "left",
"widgettype": "Text", "css": "pricing-text"
"options": { }
"text": {{json.dumps(pt, ensure_ascii=False)}}, }{% if not loop.last %},{% endif %}
"wrap": true,
"halign": "left",
"css": "pricing-text"
}
}{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
]
}
{% endif %}
] ]
} }
], ],