fix: cwidth:25 cheight:16 card-body-scroll — match old working layout
This commit is contained in:
parent
7aa1efc6d8
commit
4f0a8a4c2e
@ -3,6 +3,7 @@ from appPublic.registerfunction import RegisterFunction
|
|||||||
from sqlor.dbpools import DBPools, get_sor_context
|
from sqlor.dbpools import DBPools, get_sor_context
|
||||||
from ahserver.serverenv import ServerEnv
|
from ahserver.serverenv import ServerEnv
|
||||||
from appPublic.log import debug
|
from appPublic.log import debug
|
||||||
|
from appPublic.share_cache import cache_start_listener
|
||||||
from .keling import keling_token
|
from .keling import keling_token
|
||||||
from .jimeng import jimeng_auth_headers
|
from .jimeng import jimeng_auth_headers
|
||||||
from .utils import (
|
from .utils import (
|
||||||
@ -182,6 +183,7 @@ def load_llmage():
|
|||||||
'load_product_category_product': load_product_category_product,
|
'load_product_category_product': load_product_category_product,
|
||||||
}
|
}
|
||||||
# Bind hot_reload event — module-level function, ref safe (module keeps it alive)
|
# Bind hot_reload event — module-level function, ref safe (module keeps it alive)
|
||||||
|
cache_start_listener()
|
||||||
if hasattr(env, 'event_dispatcher'):
|
if hasattr(env, 'event_dispatcher'):
|
||||||
env.event_dispatcher.bind('hot_reload', _on_hot_reload)
|
env.event_dispatcher.bind('hot_reload', _on_hot_reload)
|
||||||
rf = RegisterFunction()
|
rf = RegisterFunction()
|
||||||
|
|||||||
@ -11,6 +11,7 @@ from appPublic.uniqueID import getID
|
|||||||
from appPublic.dictObject import DictObject
|
from appPublic.dictObject import DictObject
|
||||||
from appPublic.timeUtils import curDateString, timestampstr
|
from appPublic.timeUtils import curDateString, timestampstr
|
||||||
from uapi.appapi import UAPI, sor_get_callerid, sor_get_uapi, get_uapi
|
from uapi.appapi import UAPI, sor_get_callerid, sor_get_uapi, get_uapi
|
||||||
|
from appPublic.share_cache import cache_get, cache_invalidate
|
||||||
from ahserver.serverenv import get_serverenv, ServerEnv
|
from ahserver.serverenv import get_serverenv, ServerEnv
|
||||||
from ahserver.filestorage import FileStorage
|
from ahserver.filestorage import FileStorage
|
||||||
from appPublic.jsonConfig import getConfig
|
from appPublic.jsonConfig import getConfig
|
||||||
|
|||||||
@ -4,113 +4,79 @@
|
|||||||
{% set all_data = get_plaza_models(providerid, catelogid, search) %}
|
{% set all_data = get_plaza_models(providerid, catelogid, search) %}
|
||||||
{% set ns = namespace(first=true) %}
|
{% set ns = namespace(first=true) %}
|
||||||
{
|
{
|
||||||
"widgettype": "VBox",
|
"widgettype": "VScrollPanel",
|
||||||
"options": {"css": "filler", "width": "100%", "height": "100%"},
|
"options": {"css": "filler", "width": "100%", "height": "100%"},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
{
|
||||||
"widgettype": "VScrollPanel",
|
"widgettype": "DynamicColumn",
|
||||||
"options": {"css": "filler", "flex": "1", "width": "100%"},
|
"options": {
|
||||||
|
"css": "plaza-grid",
|
||||||
|
"width": "100%",
|
||||||
|
"col_cwidth": 25,
|
||||||
|
"col_cgap": 1
|
||||||
|
},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
|
||||||
"widgettype": "DynamicColumn",
|
|
||||||
"options": {
|
|
||||||
"css": "plaza-grid",
|
|
||||||
"width": "100%",
|
|
||||||
"col_cwidth": 22,
|
|
||||||
"col_cgap": 1
|
|
||||||
},
|
|
||||||
"subwidgets": [
|
|
||||||
{% for llm in all_data %}
|
{% for llm in all_data %}
|
||||||
{% if not ns.first %},{% endif %}
|
{% if not ns.first %},{% endif %}
|
||||||
|
{
|
||||||
|
"widgettype": "VBox",
|
||||||
|
"options": {
|
||||||
|
"css": "card plaza-card",
|
||||||
|
"cwidth": 25,
|
||||||
|
"cheight": 16
|
||||||
|
},
|
||||||
|
"subwidgets": [
|
||||||
{
|
{
|
||||||
"widgettype": "VBox",
|
"widgettype": "HBox",
|
||||||
"options": {
|
"options": {"cheight": 2, "alignItems": "center", "gap": "4px"},
|
||||||
"css": "card plaza-card",
|
"subwidgets": [
|
||||||
"width": "100%",
|
{"widgettype": "Svg", "options": {"rate": 1.5, "url": "{{entire_url('/appbase/show_icon.dspy')}}?id={{llm.iconid}}"}},
|
||||||
"cheight": 14
|
{"widgettype": "Title6", "options": {"text": "{{llm.name}}"}}
|
||||||
},
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"widgettype": "VScrollPanel",
|
||||||
|
"options": {"css": "card-body-scroll", "flex": "1"},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
{
|
||||||
"widgettype": "HBox",
|
"widgettype": "Text",
|
||||||
"options": {"cheight": 2, "alignItems": "center", "gap": "4px"},
|
|
||||||
"subwidgets": [
|
|
||||||
{
|
|
||||||
"widgettype": "Svg",
|
|
||||||
"options": {"rate": 1.5, "url": "{{entire_url('/appbase/show_icon.dspy')}}?id={{llm.iconid}}"}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"widgettype": "Title6",
|
|
||||||
"options": {"text": "{{llm.name}}"}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"widgettype": "VScrollPanel",
|
|
||||||
"options": {"css": "filler", "flex": "1"},
|
|
||||||
"subwidgets": [
|
|
||||||
{
|
|
||||||
"widgettype": "Text",
|
|
||||||
"options": {
|
|
||||||
"height": "auto",
|
|
||||||
"text": {{json.dumps(llm.description, ensure_ascii=False)}},
|
|
||||||
"wrap": true,
|
|
||||||
"halign": "left"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{% if llm.pricing_display %}
|
|
||||||
{% if llm.pricing_display is string %}
|
|
||||||
{% set pricing_items = [llm.pricing_display] %}
|
|
||||||
{% else %}
|
|
||||||
{% set pricing_items = llm.pricing_display %}
|
|
||||||
{% endif %}
|
|
||||||
,{
|
|
||||||
"widgettype": "VBox",
|
|
||||||
"options": {"css": "filler"},
|
|
||||||
"subwidgets": [
|
|
||||||
{% for pt in pricing_items %}
|
|
||||||
{
|
|
||||||
"widgettype": "Text",
|
|
||||||
"options": {
|
|
||||||
"text": {{json.dumps(pt, ensure_ascii=False)}},
|
|
||||||
"wrap": true,
|
|
||||||
"halign": "left",
|
|
||||||
"css": "pricing-text"
|
|
||||||
}
|
|
||||||
}{% if not loop.last %},{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
{% endif %}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"binds": [
|
|
||||||
{
|
|
||||||
"wid": "self",
|
|
||||||
"event": "click",
|
|
||||||
"actiontype": "urlwidget",
|
|
||||||
"target": "PopupWindow",
|
|
||||||
"popup_options": {
|
|
||||||
"title": "{{llm.name}}",
|
|
||||||
{% if int(params_kw._is_mobile or 0) %}
|
|
||||||
"width": "100%",
|
|
||||||
"height": "100%"
|
|
||||||
{% else %}
|
|
||||||
"width": "40%",
|
|
||||||
"height": "85%"
|
|
||||||
{% endif %}
|
|
||||||
},
|
|
||||||
"options": {
|
"options": {
|
||||||
"params": {"id": "{{llm.id}}"},
|
"height": "auto",
|
||||||
"url": "{{entire_url('./llm_dialog.ui')}}"
|
"text": {{json.dumps(llm.description, ensure_ascii=False)}},
|
||||||
|
"wrap": true,
|
||||||
|
"halign": "left"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{% if llm.pricing_display %}
|
||||||
|
{% if llm.pricing_display is string %}{% set pricing_items = [llm.pricing_display] %}{% else %}{% set pricing_items = llm.pricing_display %}{% endif %}
|
||||||
|
,{
|
||||||
|
"widgettype": "VBox",
|
||||||
|
"options": {"css": "filler"},
|
||||||
|
"subwidgets": [
|
||||||
|
{% for pt in pricing_items %}
|
||||||
|
{"widgettype": "Text", "options": {"text": {{json.dumps(pt, ensure_ascii=False)}}, "wrap": true, "halign": "left", "css": "pricing-text"}}{% if not loop.last %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"binds": [{
|
||||||
|
"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "PopupWindow",
|
||||||
|
"popup_options": {
|
||||||
|
"title": "{{llm.name}}",
|
||||||
|
{% if int(params_kw._is_mobile or 0) %}
|
||||||
|
"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 %}
|
{% set ns.first = false %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user