Hide reporting, admin and profile in sidebar (for mobile)
Also, have the "Zammad Interface" link go to mobile version.
This commit is contained in:
parent
dca61e1459
commit
047ef094fc
1 changed files with 6 additions and 4 deletions
|
|
@ -494,14 +494,14 @@ export const Sidebar: FC<SidebarProps> = ({ open, setOpen, openWidth, closedWidt
|
||||||
selected={pathname.endsWith("/docs")}
|
selected={pathname.endsWith("/docs")}
|
||||||
open={open}
|
open={open}
|
||||||
/>
|
/>
|
||||||
<MenuItem
|
{!mobile && (<MenuItem
|
||||||
name="Reporting"
|
name="Reporting"
|
||||||
href="/reporting"
|
href="/reporting"
|
||||||
Icon={AssessmentIcon}
|
Icon={AssessmentIcon}
|
||||||
iconSize={20}
|
iconSize={20}
|
||||||
selected={pathname.endsWith("/reporting")}
|
selected={pathname.endsWith("/reporting")}
|
||||||
open={open}
|
open={open}
|
||||||
/>
|
/>)}
|
||||||
{leafcutterEnabled && (
|
{leafcutterEnabled && (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
name="Leafcutter"
|
name="Leafcutter"
|
||||||
|
|
@ -558,6 +558,7 @@ export const Sidebar: FC<SidebarProps> = ({ open, setOpen, openWidth, closedWidt
|
||||||
/>
|
/>
|
||||||
</List>
|
</List>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
|
{!mobile && (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
name="Profile"
|
name="Profile"
|
||||||
href="/profile"
|
href="/profile"
|
||||||
|
|
@ -566,7 +567,8 @@ export const Sidebar: FC<SidebarProps> = ({ open, setOpen, openWidth, closedWidt
|
||||||
selected={pathname.endsWith("/profile")}
|
selected={pathname.endsWith("/profile")}
|
||||||
open={open}
|
open={open}
|
||||||
/>
|
/>
|
||||||
{roles.includes("admin") && (
|
)}
|
||||||
|
{roles.includes("admin") && !mobile && (
|
||||||
<>
|
<>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
name="Admin"
|
name="Admin"
|
||||||
|
|
@ -656,7 +658,7 @@ export const Sidebar: FC<SidebarProps> = ({ open, setOpen, openWidth, closedWidt
|
||||||
)}
|
)}
|
||||||
<MenuItem
|
<MenuItem
|
||||||
name="Zammad Interface"
|
name="Zammad Interface"
|
||||||
href="/zammad"
|
href={mobile ? "/mobile" : "/zammad"}
|
||||||
Icon={DvrIcon}
|
Icon={DvrIcon}
|
||||||
iconSize={20}
|
iconSize={20}
|
||||||
open={open}
|
open={open}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue