fix: set light bg for full screen in dashboard (#4465)

This commit is contained in:
Yunus M 2024-01-31 14:25:27 +05:30 committed by GitHub
parent 01fc7a7fd4
commit 78c9330666
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 1 deletions

View File

@ -1,8 +1,10 @@
.fullscreen-grid-container {
overflow: auto;
margin-top: 1rem;
.react-grid-layout {
border: none !important;
margin-top: 0;
}
}
@ -13,3 +15,9 @@
height: calc(100% - 30px);
}
}
.lightMode {
.fullscreen-grid-container {
background-color: rgb(250, 250, 250);
}
}

View File

@ -74,6 +74,8 @@ function SideNav({
isCurrentVersionError,
} = useSelector<AppState, AppReducer>((state) => state.app);
const [licenseTag, setLicenseTag] = useState('');
const userSettingsMenuItem = {
key: ROUTES.MY_SETTINGS,
label: user?.name || 'User',
@ -239,6 +241,18 @@ function SideNav({
}
};
useEffect(() => {
if (!isFetching) {
if (isCloudUserVal) {
setLicenseTag('Cloud');
} else if (isEnterprise) {
setLicenseTag('Enterprise');
} else {
setLicenseTag('Free');
}
}
}, [isCloudUserVal, isEnterprise, isFetching]);
return (
<div className={cx('sideNav', collapsed ? 'collapsed' : '')}>
<div className="brand">
@ -257,7 +271,7 @@ function SideNav({
{!collapsed && (
<>
<div className="license tag">{!isEnterprise ? 'Free' : 'Enterprise'}</div>
{!isFetching && <div className="license tag">{licenseTag}</div>}
<ToggleButton
checked={isDarkMode}