feat(portal): replace hardcoded '24/7 内网' stat with live resource count
Backend: bootstrap() now returns stats.total_resources (count of
is_active=True resources).
Frontend: stats adds 'resources' computed from bootstrapStats;
third hero-stat shows '{{ stats.resources }} 资源数量' instead of
the static '24/7 内网' placeholder.
This commit is contained in:
@@ -22,6 +22,9 @@ def bootstrap():
|
||||
)
|
||||
return jsonify({
|
||||
"settings": settings,
|
||||
"stats": {
|
||||
"total_resources": Resource.query.filter_by(is_active=True).count(),
|
||||
},
|
||||
"categories": [c.to_dict() for c in categories],
|
||||
"links": [l.to_dict() for l in links],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user