Added sidebar separations
This commit is contained in:
parent
0de8c84d0c
commit
3e2caca2b5
2 changed files with 74 additions and 55 deletions
|
|
@ -739,3 +739,4 @@ export const PRIORITY_SIDEBAR_ORDER = [
|
||||||
"helpers",
|
"helpers",
|
||||||
"experimental",
|
"experimental",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import IconComponent from "../../../../components/genericIconComponent";
|
||||||
import { Input } from "../../../../components/ui/input";
|
import { Input } from "../../../../components/ui/input";
|
||||||
import { Separator } from "../../../../components/ui/separator";
|
import { Separator } from "../../../../components/ui/separator";
|
||||||
import { UPLOAD_ERROR_ALERT } from "../../../../constants/alerts_constants";
|
import { UPLOAD_ERROR_ALERT } from "../../../../constants/alerts_constants";
|
||||||
|
import { PRIORITY_SIDEBAR_ORDER } from "../../../../constants/constants";
|
||||||
import ApiModal from "../../../../modals/ApiModal";
|
import ApiModal from "../../../../modals/ApiModal";
|
||||||
import ExportModal from "../../../../modals/exportModal";
|
import ExportModal from "../../../../modals/exportModal";
|
||||||
import ShareModal from "../../../../modals/shareModal";
|
import ShareModal from "../../../../modals/shareModal";
|
||||||
|
|
@ -264,6 +265,20 @@ export default function ExtraSidebar(): JSX.Element {
|
||||||
.sort(sortKeys)
|
.sort(sortKeys)
|
||||||
.map((SBSectionName: keyof APIObjectType, index) =>
|
.map((SBSectionName: keyof APIObjectType, index) =>
|
||||||
Object.keys(dataFilter[SBSectionName]).length > 0 ? (
|
Object.keys(dataFilter[SBSectionName]).length > 0 ? (
|
||||||
|
<>
|
||||||
|
{index === 0 && (
|
||||||
|
<div className="pt-0.5">
|
||||||
|
<Separator />
|
||||||
|
<div className="p-2 px-4 font-semibold" key={index}>
|
||||||
|
Native
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{index === PRIORITY_SIDEBAR_ORDER.length - 1 && (
|
||||||
|
<div className="p-2 px-4 font-semibold" key={index}>
|
||||||
|
Legacy
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<DisclosureComponent
|
<DisclosureComponent
|
||||||
openDisc={
|
openDisc={
|
||||||
getFilterEdge.length !== 0 || search.length !== 0
|
getFilterEdge.length !== 0 || search.length !== 0
|
||||||
|
|
@ -307,7 +322,9 @@ export default function ExtraSidebar(): JSX.Element {
|
||||||
color={nodeColors[SBSectionName]}
|
color={nodeColors[SBSectionName]}
|
||||||
itemName={SBItemName}
|
itemName={SBItemName}
|
||||||
//convert error to boolean
|
//convert error to boolean
|
||||||
error={!!dataFilter[SBSectionName][SBItemName].error}
|
error={
|
||||||
|
!!dataFilter[SBSectionName][SBItemName].error
|
||||||
|
}
|
||||||
display_name={
|
display_name={
|
||||||
dataFilter[SBSectionName][SBItemName].display_name
|
dataFilter[SBSectionName][SBItemName].display_name
|
||||||
}
|
}
|
||||||
|
|
@ -322,6 +339,7 @@ export default function ExtraSidebar(): JSX.Element {
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</DisclosureComponent>
|
</DisclosureComponent>
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div key={index}></div>
|
<div key={index}></div>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue