From afb191f90aaf1ae7ee7f6b32f1298cb5ecbf1fed Mon Sep 17 00:00:00 2001 From: dekun Date: Tue, 7 Jul 2026 12:18:18 +0800 Subject: [PATCH] fix(theme): show toggle on standalone embed shell, not only hub iframe Co-authored-by: Cursor --- lib/common/static/instance_theme.js | 6 ------ lib/instance/templates/embed_shell.html | 2 +- lib/instance/templates/index.html | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/common/static/instance_theme.js b/lib/common/static/instance_theme.js index fee70b0..f31c4bf 100644 --- a/lib/common/static/instance_theme.js +++ b/lib/common/static/instance_theme.js @@ -11,12 +11,6 @@ } function isHubLinked() { - try { - const p = new URLSearchParams(location.search); - if (p.get("embed") === "1") return true; - const ht = p.get("hub_theme"); - if (ht === "light" || ht === "dark") return true; - } catch (_) {} try { if (window.self !== window.top) return true; } catch (_) { diff --git a/lib/instance/templates/embed_shell.html b/lib/instance/templates/embed_shell.html index c7cad0f..8b0fa1a 100644 --- a/lib/instance/templates/embed_shell.html +++ b/lib/instance/templates/embed_shell.html @@ -3,7 +3,7 @@ - + diff --git a/lib/instance/templates/index.html b/lib/instance/templates/index.html index 9b654f4..dfde5b9 100644 --- a/lib/instance/templates/index.html +++ b/lib/instance/templates/index.html @@ -4,7 +4,7 @@ - +