diff --git a/esp/src/src-react/components/Title.tsx b/esp/src/src-react/components/Title.tsx index 1cd66f3f2a8..ec472bbc373 100644 --- a/esp/src/src-react/components/Title.tsx +++ b/esp/src/src-react/components/Title.tsx @@ -65,6 +65,10 @@ export const DevTitle: React.FunctionComponent = ({ const [showBannerConfig, setShowBannerConfig] = React.useState(false); const [BannerMessageBar, BannerConfig] = useBanner({ showForm: showBannerConfig, setShowForm: setShowBannerConfig }); + const titlebarColorSet = React.useMemo(() => { + return titlebarColor && titlebarColor !== theme.palette.themeLight; + }, [theme.palette, titlebarColor]); + const personaProps: IPersonaSharedProps = React.useMemo(() => { return { text: (currentUser?.firstName && currentUser?.lastName) ? currentUser.firstName + " " + currentUser.lastName : currentUser?.username, @@ -181,12 +185,12 @@ export const DevTitle: React.FunctionComponent = ({ background: "transparent", minWidth: 48, padding: "0 10px 0 4px", - color: theme.semanticColors.link + color: titlebarColor ? Utility.textColor(titlebarColor) : theme.semanticColors.link }, errorsWarningsCount: { margin: "-3px 0 0 -3px" } - }), [theme.semanticColors.link]); + }), [theme.semanticColors.link, titlebarColor]); React.useEffect(() => { switch (log.reduce((prev, cur) => Math.max(prev, cur.level), Level.debug)) { @@ -248,18 +252,18 @@ export const DevTitle: React.FunctionComponent = ({ document.title = environmentTitle; }, [environmentTitle]); - return
+ return
- + - + {showEnvironmentTitle && environmentTitle.length ? environmentTitle : "ECL Watch"} @@ -283,7 +287,7 @@ export const DevTitle: React.FunctionComponent = ({ - +