- Add get_usage_trend() and get_amount_trend() functions for day-over-day comparison - Display trend arrows (up/down/flat) with percentage change in stat_today_usage and stat_today_amount - Add colored left borders to all stat cards for visual distinction: - Blue: usage, total users - Purple: amount, total orgs - Green: active users, new users this month - Cyan: concurrent users - Red: errors - Enhance visual hierarchy with accent colors matching SVG icons
52 lines
1.6 KiB
XML
52 lines
1.6 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"css": "stat-card",
|
|
"padding": "20px",
|
|
"borderRadius": "12px",
|
|
"flex": "1",
|
|
"minHeight": "110px",
|
|
"borderLeft": "4px solid #ef4444"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"alignItems": "center",
|
|
"marginBottom": "12px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Svg",
|
|
"options": {
|
|
"svg": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#EF4444\" stroke-width=\"2\"><path d=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z\"/></svg>",
|
|
"width": "24px",
|
|
"height": "24px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Filler"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"css": "stat-value",
|
|
"text": "{{get_accounting_errors(request)}}",
|
|
"fontSize": "32px",
|
|
"fontWeight": "700",
|
|
"lineHeight": "1.1"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"fontSize": "14px",
|
|
"marginTop": "4px",
|
|
"otext": "记账异常",
|
|
"i18n": true
|
|
}
|
|
}
|
|
]
|
|
} |