refactor web file structure and seperate settings from status

This commit is contained in:
proddy
2024-07-22 14:46:22 +02:00
parent d0976cd660
commit 53e9a062e8
60 changed files with 149 additions and 251 deletions

View File

@@ -16,11 +16,9 @@ const LayoutAppBar: FC<LayoutAppBarProps> = ({ title, onToggleDrawer }) => {
const pathnames = useLocation()
.pathname.split('/')
.filter((x) => x);
const show_back = pathnames.length > 1;
const navigate = useNavigate();
let show_back = false;
if (pathnames.length > 1) {
show_back = pathnames[0] !== 'system' || pathnames[1] === 'espsystemstatus';
}
return (
<AppBar

View File

@@ -128,7 +128,11 @@ const LayoutMenu: FC = () => {
</List>
<List style={{ marginTop: `auto` }}>
<LayoutMenuItem icon={AssessmentIcon} label={LL.SYSTEM(0)} to="/system" />
<LayoutMenuItem
icon={AssessmentIcon}
label={LL.STATUS_OF('')}
to="/status"
/>
<LayoutMenuItem
icon={SettingsIcon}
label={LL.SETTINGS(0)}

View File

@@ -59,18 +59,12 @@ const LayoutMenuItem: FC<ListMenuItemProps> = ({
}
>
<ListItemButton component={Link} to={to}>
<RenderIcon
icon={icon}
bgcolor={bgcolor}
label={label}
text={text}
to=""
/>
<RenderIcon icon={icon} bgcolor={bgcolor} label={label} text={text} />
</ListItemButton>
</ListItem>
) : (
<ListItem>
<RenderIcon icon={icon} bgcolor={bgcolor} label={label} text={text} to="" />
<RenderIcon icon={icon} bgcolor={bgcolor} label={label} text={text} />
</ListItem>
)}
</>