diff --git a/plugins/stats_dashboard/dashboard_server.py b/plugins/stats_dashboard/dashboard_server.py index bacb750..c24a86e 100644 --- a/plugins/stats_dashboard/dashboard_server.py +++ b/plugins/stats_dashboard/dashboard_server.py @@ -52,6 +52,11 @@ class DashboardServer: def serve_static(filename): return send_from_directory(static_folder, filename) + # 添加一个路由处理favicon请求 + @app.route('/favicon.ico') + def favicon(): + return send_from_directory(os.path.join(app.root_path, 'static'), + 'favicon.ico', mimetype='image/vnd.microsoft.icon') @app.route('/') def index(): return render_template('index.html') diff --git a/plugins/stats_dashboard/static/favicon.ico b/plugins/stats_dashboard/static/favicon.ico new file mode 100644 index 0000000..d0f92da Binary files /dev/null and b/plugins/stats_dashboard/static/favicon.ico differ diff --git a/plugins/stats_dashboard/templates/base.html b/plugins/stats_dashboard/templates/base.html index 72c2553..7de94ed 100644 --- a/plugins/stats_dashboard/templates/base.html +++ b/plugins/stats_dashboard/templates/base.html @@ -4,6 +4,9 @@ {% block title %}机器人管理后台{% endblock %} + + +