From d59bdf6c0c1c7de9cf2b6c332c1f619b85a33159 Mon Sep 17 00:00:00 2001 From: gorkem-bwl Date: Fri, 28 Aug 2026 21:36:10 -0400 Subject: [PATCH] fix(client): render settings tab panels conditionally Code review caught that the tab panels never hid. Each panel was a ` - } - /> - - - {/* monitoring tab */} - + )} {/* email tab */} - + )} + + {/* integrations tab */} + {activeTab === "integrations" && ( + + {isAdmin && ( + 0 ? ( + + + {globalProxyEnabled && ( + + )} + + ) : ( + + ) + } + /> + )} + {isAdmin && ( + + {(isApiKeySet === false || apiKeyHasBeenReset === true) && ( + + )} + + {isApiKeySet === true && apiKeyHasBeenReset === false && ( + + + {t("pages.settings.form.pagespeed.option.apiKey.labelSet")} + - - - ) : ( - - )} - - {/* TLS Servername (Optional) */} - )} - /> - - {/* Connection Host (Optional) */} - - - {/* Boolean Switches */} - - {emailSwitches.map(({ name, label }) => ( - - ))} - - - {/* Test Email Button */} - - - - - } - /> - )} - - - {/* integrations tab */} - + + } + /> + )} + + )} {/* data tab */} - - } - /> - )} - {/* Clear All Stats */} - {isAdmin && ( - setIsStatsDialogOpen(true)} - > - {t("common.buttons.clear")} - - } - /> - )} - - {/* Remove All Monitors - Admin Only */} - {isAdmin && ( - + + + + + } + /> + )} + {/* Clear All Stats */} + {isAdmin && ( + setIsDemoMonitorsDialogOpen(true)} + onClick={() => setIsStatsDialogOpen(true)} > - {t("common.buttons.removeMonitors")} + {t("common.buttons.clear")} - - } - /> - )} - + } + /> + )} + + {/* Remove All Monitors - Admin Only */} + {isAdmin && ( + + + + } + /> + )} + + )} {/* Clear Stats Confirmation Dialog */} { return (
  • - {field}: {message} + revealField(field)} + > + {field} + + : {message}
  • );