fix: 中控 iframe 嵌入模板路径改用 REPO_ROOT

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-02 22:58:56 +08:00
parent be7896cc25
commit 54c1984ec7
+2 -4
View File
@@ -312,12 +312,10 @@ def install_on_app(
install_instance_theme_static(app)
register_hub_routes(app)
if render_main_page_fn and login_required_fn:
import os
from lib.instance.instance_embed_lib import attach_embed_templates, register_embed_routes
from lib.paths import REPO_ROOT
repo_root = os.path.dirname(os.path.abspath(__file__))
attach_embed_templates(app, repo_root)
attach_embed_templates(app, str(REPO_ROOT))
register_embed_routes(app, login_required_fn, render_main_page_fn)