diff --git a/lib/common/static/instance_embed.js b/lib/common/static/instance_embed.js index 8cbfe78..0963b12 100644 --- a/lib/common/static/instance_embed.js +++ b/lib/common/static/instance_embed.js @@ -238,16 +238,37 @@ tabBooted.clear(); } + function syncShellChrome(tab) { + const onSettings = tab === "settings"; + document.querySelectorAll(".instance-header-panel, .instance-top-bar").forEach((el) => { + el.hidden = onSettings; + }); + } + + function initPaneThemeToggle(tab) { + if (tab !== "settings") return; + const pane = tabPanes.get(tab); + if (!pane || !global.InstanceTheme) return; + if (typeof global.InstanceTheme.initToggleUI === "function") { + global.InstanceTheme.initToggleUI(pane); + } + if (typeof global.InstanceTheme.syncToggleUI === "function") { + global.InstanceTheme.syncToggleUI(pane); + } + } + function activateTab(tab, opts) { const options = opts || {}; const revisit = !!options.revisit; const firstBoot = !tabBooted.has(tab); + syncShellChrome(tab); showPane(tab); setNavActive(tab); if (!options.skipUrl) syncUrl(tab, !!options.replace); notifyParentTabSwitch(tab); if (firstBoot) { bootPaneScripts(tab); + initPaneThemeToggle(tab); runPageInit(tab, { revisit: false }); return; } @@ -409,7 +430,11 @@ patchApplyListWindow(); patchHardNavigations(); initBootPane(); + if (getTab() === "settings") { + initPaneThemeToggle("settings"); + } bindNav(); + syncShellChrome(getTab()); runPageInit(getTab()); preloadAllTabs(); try { diff --git a/lib/common/static/instance_theme.css b/lib/common/static/instance_theme.css index 7c01a7f..1670998 100644 --- a/lib/common/static/instance_theme.css +++ b/lib/common/static/instance_theme.css @@ -2182,6 +2182,13 @@ html[data-theme="light"] .journal-detail-img-thumb { flex-wrap: wrap; } +.settings-account-summary-actions { + display: flex; + align-items: center; + gap: 8px; + flex-shrink: 0; +} + .settings-cards-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); @@ -2464,12 +2471,21 @@ html[data-theme="light"] .settings-kv-value { color: #142232; } -html[data-theme="light"] .settings-export-link { - background: #fff; - border-color: #b8c8d8; +html[data-theme="light"] .settings-export-link, +html[data-theme="light"] .settings-export-links-inline a { + background: transparent; + border-color: transparent; color: #1d4f8c; } +html[data-theme="light"] .settings-side-export { + border-top-color: #d0dae4; +} + +html[data-theme="light"] .settings-side-export-label { + color: #142232; +} + /* OKX 期权页 */ .options-page-wrap { font-size: 0.8rem; diff --git a/lib/instance/templates/embed_shell.html b/lib/instance/templates/embed_shell.html index ee131c0..c7cad0f 100644 --- a/lib/instance/templates/embed_shell.html +++ b/lib/instance/templates/embed_shell.html @@ -7,7 +7,7 @@ - +