diff --git a/src/app/(dashboard)/dashboard/settings/components/AppearanceTab.tsx b/src/app/(dashboard)/dashboard/settings/components/AppearanceTab.tsx index 3c5d685530..bf173b8b4b 100644 --- a/src/app/(dashboard)/dashboard/settings/components/AppearanceTab.tsx +++ b/src/app/(dashboard)/dashboard/settings/components/AppearanceTab.tsx @@ -106,7 +106,10 @@ export default function AppearanceTab() { { id: "cyan", color: COLOR_THEMES.cyan, label: t("themeCyan") }, ]; - const sidebarSections = SIDEBAR_SECTIONS.map((section) => ({ + const showDebug = settings.debugMode === true; + const sidebarSections = SIDEBAR_SECTIONS.filter( + (section) => section.visibility !== "debug" || showDebug + ).map((section) => ({ ...section, title: getSidebarLabel(section.titleKey, section.titleFallback), items: section.items.map((item) => ({ ...item, label: tSidebar(item.i18nKey) })), diff --git a/src/shared/components/Sidebar.tsx b/src/shared/components/Sidebar.tsx index fb77a3017a..2eeb5a3b65 100644 --- a/src/shared/components/Sidebar.tsx +++ b/src/shared/components/Sidebar.tsx @@ -40,7 +40,7 @@ export default function Sidebar({ useEffect(() => { const applySettings = (data) => { - setShowDebug(data?.enableRequestLogs === true); + setShowDebug(data?.debugMode === true); setHiddenSidebarItems(normalizeHiddenSidebarItems(data?.[HIDDEN_SIDEBAR_ITEMS_SETTING_KEY])); }; @@ -52,8 +52,8 @@ export default function Sidebar({ const handleSettingsUpdated = (event: Event) => { const detail = (event as CustomEvent>).detail || {}; - if ("enableRequestLogs" in detail) { - setShowDebug(detail.enableRequestLogs === true); + if ("debugMode" in detail) { + setShowDebug(detail.debugMode === true); } if (HIDDEN_SIDEBAR_ITEMS_SETTING_KEY in detail) {