From 32000e8757e36344257d0a0a8ea0b7bbb3a80373 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 29 Jul 2026 12:00:04 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20plaza=20card=20layout=20=E2=80=94=20fixed?= =?UTF-8?q?=20VBox,=20title=202ch,=20filler=20scroll=20with=20desc+price?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each card is a cwidth:15 cheight:12 VBox: - Title row: cheight:2 (icon + name) - VScrollPanel css:filler: description (height:auto) + pricing (css:filler) --- wwwroot/plaza_model_cards.ui | 44 +++++++++++++++++------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/wwwroot/plaza_model_cards.ui b/wwwroot/plaza_model_cards.ui index 10922fa..d581308 100644 --- a/wwwroot/plaza_model_cards.ui +++ b/wwwroot/plaza_model_cards.ui @@ -32,7 +32,7 @@ "subwidgets": [ { "widgettype": "HBox", - "options": {"cheight": 2}, + "options": {"cheight": 2, "alignItems": "center", "gap": "4px"}, "subwidgets": [ { "widgettype": "Svg", @@ -46,38 +46,36 @@ }, { "widgettype": "VScrollPanel", - "options": {"css": "card-body-scroll", "flex": "1"}, + "options": {"css": "filler", "flex": "1"}, "subwidgets": [ { "widgettype": "Text", "options": { - "height": "auto", + "height": "auto", "text": {{json.dumps(llm.description, ensure_ascii=False)}}, "wrap": true, "halign": "left" } } - ] - }, - { - "widgettype": "VBox", - "options": {"css": "filler", "cheight": 4}, - "subwidgets": [ -{% set pricing_text = llm.pricing_display %} -{% if type(pricing_text) == type("") %} -{% set pricing_text = [pricing_text] %} -{% endif %} -{% for pt in pricing_text %} - { - "widgettype": "Text", - "options": { - "text": {{json.dumps(pt, ensure_ascii=False)}}, - "wrap": true, - "halign": "left", - "css": "pricing-text" - } - }{% if not loop.last %},{% endif %} +{% if llm.pricing_display %} + ,{ + "widgettype": "VBox", + "options": {"css": "filler"}, + "subwidgets": [ +{% for pt in llm.pricing_display %} + { + "widgettype": "Text", + "options": { + "text": {{json.dumps(pt, ensure_ascii=False)}}, + "wrap": true, + "halign": "left", + "css": "pricing-text" + } + }{% if not loop.last %},{% endif %} {% endfor %} + ] + } +{% endif %} ] } ],