Merge pull request #1717 from LalitDeore/release-changes
add theming changes for onprem
This commit is contained in:
@@ -1068,8 +1068,6 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
|
|||||||
activatedAppIds = append(activatedAppIds, app.ID)
|
activatedAppIds = append(activatedAppIds, app.ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
userInfo.ActiveOrg.Branding = org.Branding
|
|
||||||
|
|
||||||
returnValue := shuffle.HandleInfo{
|
returnValue := shuffle.HandleInfo{
|
||||||
Success: true,
|
Success: true,
|
||||||
Username: userInfo.Username,
|
Username: userInfo.Username,
|
||||||
@@ -1092,6 +1090,7 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
|
|||||||
Priorities: orgPriorities,
|
Priorities: orgPriorities,
|
||||||
Licensed: licensed,
|
Licensed: licensed,
|
||||||
ActiveApps: activatedAppIds,
|
ActiveApps: activatedAppIds,
|
||||||
|
Theme: userInfo.Theme,
|
||||||
}
|
}
|
||||||
|
|
||||||
returnData, err := json.Marshal(returnValue)
|
returnData, err := json.Marshal(returnValue)
|
||||||
|
|||||||
+11
-2
@@ -92,7 +92,7 @@ const App = (message, props) => {
|
|||||||
const [dataset, setDataset] = useState(false)
|
const [dataset, setDataset] = useState(false)
|
||||||
const [isLoaded, setIsLoaded] = useState(false)
|
const [isLoaded, setIsLoaded] = useState(false)
|
||||||
const [curpath, setCurpath] = useState(typeof window === "undefined" || window.location === undefined ? "" : window.location.pathname)
|
const [curpath, setCurpath] = useState(typeof window === "undefined" || window.location === undefined ? "" : window.location.pathname)
|
||||||
const { themeMode, handleThemeChange, setBrandColor, brandColor} = useContext(Context);
|
const { themeMode, handleThemeChange, setBrandColor, brandColor,setThemeMode} = useContext(Context);
|
||||||
const currentTheme = getTheme(themeMode, brandColor);
|
const currentTheme = getTheme(themeMode, brandColor);
|
||||||
const mainColor = currentTheme?.palette?.backgroundColor
|
const mainColor = currentTheme?.palette?.backgroundColor
|
||||||
const [isPreviousThemeLight, setIsPreviousThemeLight] = useState(false)
|
const [isPreviousThemeLight, setIsPreviousThemeLight] = useState(false)
|
||||||
@@ -192,7 +192,16 @@ const App = (message, props) => {
|
|||||||
{ path: "/" }
|
{ path: "/" }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
if (responseJson?.theme?.length > 0) {
|
||||||
|
handleThemeChange(responseJson.theme)
|
||||||
|
}else{
|
||||||
|
handleThemeChange("dark")
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
handleThemeChange("dark")
|
||||||
|
setThemeMode("dark")
|
||||||
|
localStorage.removeItem("theme");
|
||||||
|
}
|
||||||
|
|
||||||
// Handling Ethereum update
|
// Handling Ethereum update
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user