diff --git a/src/containers/apps/AppsTable.tsx b/src/containers/apps/AppsTable.tsx index 9ed751ed..7480d01f 100644 --- a/src/containers/apps/AppsTable.tsx +++ b/src/containers/apps/AppsTable.tsx @@ -1,4 +1,5 @@ import { + CaretRightOutlined, CheckOutlined, CodeOutlined, DeleteOutlined, @@ -574,13 +575,13 @@ class AppsTable extends Component< createAppTableHeader(): React.ReactNode { const self = this - let projectName = '' + let projectName = let editable = false if (this.state.selectedProjectId === ALL_APPS) { - projectName = 'All apps' + projectName = All apps from all projects } else if (this.state.selectedProjectId === ROOT_APPS) { - projectName = 'Root' + projectName = Root } else { editable = true const projectsMap: { [key: string]: ProjectDefinition } = {} @@ -603,9 +604,27 @@ class AppsTable extends Component< } } - projectName = breadCrumbs - .map((id) => projectsMap[id]?.name || '') - .join(' > ') + projectName = ( + + {breadCrumbs + .map((id) => projectsMap[id]?.name || '') + .map((name, index) => ( + <> + + {name} + + {index < breadCrumbs.length - 1 && ( + + )} + + ))} + + ) } if (!editable) { @@ -620,8 +639,7 @@ class AppsTable extends Component< return (

- {' '} - {projectName} + {projectName}

) diff --git a/src/containers/apps/appDetails/AppDetails.tsx b/src/containers/apps/appDetails/AppDetails.tsx index 3a01c7c5..cbcbd53f 100644 --- a/src/containers/apps/appDetails/AppDetails.tsx +++ b/src/containers/apps/appDetails/AppDetails.tsx @@ -1,4 +1,10 @@ -import { CloseOutlined, DeleteOutlined, SaveOutlined } from '@ant-design/icons' +import { + CaretRightOutlined, + CloseOutlined, + DeleteOutlined, + FolderOpenOutlined, + SaveOutlined, +} from '@ant-design/icons' import { Affix, Button, @@ -135,6 +141,8 @@ class AppDetails extends ApiComponent< const projectsBreadCrumbs = [] as ProjectDefinition[] + // This loop constructs the project breadcrumbs by traversing the project hierarchy + // starting from the current project and moving up to its parent projects. while (currentProjectId) { const currentProject: ProjectDefinition | undefined = projectMap[currentProjectId] @@ -148,11 +156,26 @@ class AppDetails extends ApiComponent< return (
+ {projectsBreadCrumbs.map((project, index) => ( - - {' > '} - {project.name} - + <> + + {project.name} + + {index < projectsBreadCrumbs.length - 1 && ( + + )} + ))}
)