修复中控内嵌顶栏变形:整页导航包进 top-nav-links,embed=1 仍进壳。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -83,11 +83,13 @@ _SETTINGS_SUB_TABS = frozenset(
|
||||
|
||||
|
||||
def redirect_to_embed_shell_if_enabled(page: str):
|
||||
"""直连 /trade 等整页路由时,重定向到 embed 壳(顶栏常驻,tab 软切换)."""
|
||||
"""直连 /trade 等整页路由时,重定向到 embed 壳(顶栏常驻,tab 软切换).
|
||||
|
||||
注意:中控 iframe 会给导航链加 embed=1;若因此跳过重定向,会落到 index 整页,
|
||||
顶栏链接变成 3 列 grid 子项而变形.embed=1 时仍应进 /embed 壳.
|
||||
"""
|
||||
if not embed_shell_enabled():
|
||||
return None
|
||||
if (request.args.get("embed") or "").strip() == "1":
|
||||
return None
|
||||
if (request.path or "").rstrip("/") == "/embed":
|
||||
return None
|
||||
q = {k: v for k, v in request.args.items()}
|
||||
|
||||
Reference in New Issue
Block a user