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:
Hermes
2026-07-22 11:21:23 +08:00
parent 4bb4da1943
commit 04ddf2762d
2 changed files with 9 additions and 2 deletions
+3
View File
@@ -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],
})