fix(settings): restore theme toggle on OKX settings page
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user