Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left Nav Menu Changes #8137

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/src/components/ThemeDark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,11 @@ const ThemeDark = (
root: {
'&.Mui-selected': {
boxShadow: `2px 0 ${primary || THEME_DARK_DEFAULT_PRIMARY} inset`,
backgroundColor: `${hexToRGB(primary || THEME_DARK_DEFAULT_PRIMARY, 0.24)}`,
},
'&.Mui-selected:hover': {
boxShadow: `2px 0 ${primary || THEME_DARK_DEFAULT_PRIMARY} inset`,
backgroundColor: `${hexToRGB(primary || THEME_DARK_DEFAULT_PRIMARY, 0.32)}`,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions opencti-platform/opencti-front/src/components/ThemeLight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ const ThemeLight = (
},
'&.Mui-selected': {
boxShadow: `2px 0 ${primary || THEME_LIGHT_DEFAULT_PRIMARY} inset`,
backgroundColor: hexToRGB(primary || THEME_LIGHT_DEFAULT_PRIMARY, 0.08),
backgroundColor: hexToRGB(primary || THEME_LIGHT_DEFAULT_PRIMARY, 0.12),
},
'&.Mui-selected:hover': {
boxShadow: `2px 0 ${primary || THEME_LIGHT_DEFAULT_PRIMARY} inset`,
backgroundColor: hexToRGB(primary || THEME_LIGHT_DEFAULT_PRIMARY, 0.12),
backgroundColor: hexToRGB(primary || THEME_LIGHT_DEFAULT_PRIMARY, 0.16),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const useStyles = makeStyles((theme) => createStyles({
},
menuItemText: {
padding: '1px 0 0 15px',
fontWeight: 500,
fontWeight: 600,
fontSize: 14,
},
menuSubItemText: {
Expand Down Expand Up @@ -361,9 +361,13 @@ const LeftBar = () => {
dense={true}
classes={{ root: classes.menuSubItem }}
>
{submenu_show_icons && entry.icon && <ListItemIcon classes={{ root: classes.menuItemIcon }} style={{ minWidth: 20 }}>
{entry.icon}
</ListItemIcon>}
{(submenu_show_icons && entry.icon) ? (
<ListItemIcon classes={{ root: classes.menuItemIcon }} style={{ minWidth: 20 }}>
{entry.icon}
</ListItemIcon>
) : (
<div style={{ width: 20 }} />
)}
<ListItemText
classes={{ primary: classes.menuSubItemText }}
primary={t_i18n(entry.label)}
Expand Down Expand Up @@ -791,15 +795,15 @@ const LeftBar = () => {
onMouseLeave={() => !navOpen && handleSelectedMenuClose()}
>
<ListItemIcon classes={{ root: classes.menuItemIcon }} style={{ minWidth: 20 }}>
<InsertChartOutlinedOutlined/>
<InsertChartOutlinedOutlined />
</ListItemIcon>
{navOpen && (
<ListItemText
classes={{ primary: classes.menuItemText }}
primary={t_i18n('Dashboards')}
/>
<ListItemText
classes={{ primary: classes.menuItemText }}
primary={t_i18n('Dashboards')}
/>
)}
{navOpen && (selectedMenu.includes('dashboards') ? <ExpandLessOutlined/> : <ExpandMoreOutlined/>)}
{navOpen && (selectedMenu.includes('dashboards') ? <ExpandLessOutlined /> : <ExpandMoreOutlined />)}
</MenuItem>
{generateSubMenu(
'dashboards',
Expand Down
2 changes: 1 addition & 1 deletion opencti-platform/opencti-graphql/src/resolvers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const userResolvers = {
MeUser: {
language: (current) => current.language ?? 'auto',
unit_system: (current) => current.unit_system ?? 'auto',
submenu_show_icons: (current) => current.submenu_show_icons ?? true,
submenu_show_icons: (current) => current.submenu_show_icons ?? false,
submenu_auto_collapse: (current) => current.submenu_auto_collapse ?? true,
monochrome_labels: (current) => current.monochrome_labels ?? false,
groups: (current, args, context) => userGroupsPaginated(context, context.user, current.id, args),
Expand Down