Phase 4: Template system with auto-select and pre-fill
Backend: - Add templates.json with 5 template definitions (news, policy, business, fiction, social) - Add template API (/api/template/list, /api/template/auto-select, /api/template/:id/filter-rules) - Register template blueprint in Flask app Frontend: - Add template API client (frontend/src/api/template.js) - Add template selector UI in Home.vue (chip buttons + auto-select button) - Add template state management and auto-select logic Locale: - Add template keys for th/en/zh Entity filter rules in templates.json for context-aware filtering in Step 1.
This commit is contained in:
@@ -64,9 +64,11 @@ def create_app(config_class=Config):
|
||||
|
||||
# 注册蓝图
|
||||
from .api import graph_bp, simulation_bp, report_bp
|
||||
from .api.template import template_bp
|
||||
app.register_blueprint(graph_bp, url_prefix='/api/graph')
|
||||
app.register_blueprint(simulation_bp, url_prefix='/api/simulation')
|
||||
app.register_blueprint(report_bp, url_prefix='/api/report')
|
||||
app.register_blueprint(template_bp, url_prefix='/api/template')
|
||||
|
||||
# 健康检查
|
||||
@app.route('/health')
|
||||
|
||||
Reference in New Issue
Block a user