Merge pull request #1717 from LalitDeore/release-changes

add theming changes for onprem
This commit is contained in:
Frikky
2025-06-04 18:37:47 +02:00
committed by GitHub
2 changed files with 12 additions and 4 deletions
+1 -2
View File
@@ -1068,8 +1068,6 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
activatedAppIds = append(activatedAppIds, app.ID)
}
userInfo.ActiveOrg.Branding = org.Branding
returnValue := shuffle.HandleInfo{
Success: true,
Username: userInfo.Username,
@@ -1092,6 +1090,7 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
Priorities: orgPriorities,
Licensed: licensed,
ActiveApps: activatedAppIds,
Theme: userInfo.Theme,
}
returnData, err := json.Marshal(returnValue)
+11 -2
View File
@@ -92,7 +92,7 @@ const App = (message, props) => {
const [dataset, setDataset] = useState(false)
const [isLoaded, setIsLoaded] = useState(false)
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 mainColor = currentTheme?.palette?.backgroundColor
const [isPreviousThemeLight, setIsPreviousThemeLight] = useState(false)
@@ -192,7 +192,16 @@ const App = (message, props) => {
{ path: "/" }
);
}
}
if (responseJson?.theme?.length > 0) {
handleThemeChange(responseJson.theme)
}else{
handleThemeChange("dark")
}
}else {
handleThemeChange("dark")
setThemeMode("dark")
localStorage.removeItem("theme");
}
// Handling Ethereum update