fix: wrap description+pricing in VScrollPanel so long descriptions don't push pricing off-screen

- show_llms_cards.ui: card-body-scroll VScrollPanel wraps Text(desc) + Filler(pricing)
- show_llms_cards_by_provider.ui: same fix
This commit is contained in:
yumoqing 2026-07-06 15:08:51 +08:00
parent c2af41d5f4
commit 109d081a3f
2 changed files with 52 additions and 36 deletions

View File

@ -51,34 +51,42 @@
]
},
{
"widgettype":"Text",
"widgettype":"VScrollPanel",
"options":{
"text":{{json.dumps(llm.description, ensure_ascii=False)}},
"wrap":true,
"halign":"left"
}
},
{
"widgettype":"Filler",
"options":{
"css":"pricing-box"
"css":"card-body-scroll"
},
"subwidgets":[
{% for pricing_text in llm.pricing_display %}
{
"widgettype":"Text",
"options":{
"text":{{json.dumps(pricing_text, ensure_ascii=False)}},
"text":{{json.dumps(llm.description, ensure_ascii=False)}},
"wrap":true,
"halign":"left",
"css":"pricing-text"
"halign":"left"
}
}{% if not loop.last %},{% endif %}
{% endfor %}
},
{
"widgettype":"Filler",
"options":{
"css":"pricing-box"
},
"subwidgets":[
{% for pricing_text in llm.pricing_display %}
{
"widgettype":"Text",
"options":{
"text":{{json.dumps(pricing_text, ensure_ascii=False)}},
"wrap":true,
"halign":"left",
"css":"pricing-text"
}
}{% if not loop.last %},{% endif %}
{% endfor %}
]
}
]
}
],
"binds":[
],
"binds":[
{
"wid":"self",
"event":"click",

View File

@ -50,34 +50,42 @@
]
},
{
"widgettype":"Text",
"widgettype":"VScrollPanel",
"options":{
"text":{{json.dumps(llm.description or '', ensure_ascii=False)}},
"wrap":true,
"halign":"left"
}
},
{
"widgettype":"Filler",
"options":{
"css":"pricing-box"
"css":"card-body-scroll"
},
"subwidgets":[
{% for pricing_text in llm.pricing_display %}
{
"widgettype":"Text",
"options":{
"text":{{json.dumps(pricing_text, ensure_ascii=False)}},
"text":{{json.dumps(llm.description or '', ensure_ascii=False)}},
"wrap":true,
"halign":"left",
"css":"pricing-text"
"halign":"left"
}
}{% if not loop.last %},{% endif %}
{% endfor %}
},
{
"widgettype":"Filler",
"options":{
"css":"pricing-box"
},
"subwidgets":[
{% for pricing_text in llm.pricing_display %}
{
"widgettype":"Text",
"options":{
"text":{{json.dumps(pricing_text, ensure_ascii=False)}},
"wrap":true,
"halign":"left",
"css":"pricing-text"
}
}{% if not loop.last %},{% endif %}
{% endfor %}
]
}
]
}
],
"binds":[
],
"binds":[
{
"wid":"self",
"event":"click",