diff --git a/dashboard/src/main/home/sidebar/ProjectButton.tsx b/dashboard/src/main/home/sidebar/ProjectButton.tsx index d283aa5a41..b7e201c3aa 100644 --- a/dashboard/src/main/home/sidebar/ProjectButton.tsx +++ b/dashboard/src/main/home/sidebar/ProjectButton.tsx @@ -10,6 +10,7 @@ import Icon from "components/porter/Icon"; import swap from "assets/swap.svg"; import Spacer from "components/porter/Spacer"; import ProjectSelectionModal from "./ProjectSelectionModal"; +import Tooltip from "components/porter/Tooltip"; type PropsType = RouteComponentProps & { currentProject: ProjectType; @@ -58,29 +59,43 @@ const ProjectButton: React.FC = (props) => { closeModal={() => setShowModal(false)} /> )} - (props.projects.length > 1 || user.isPorterUser) && setShowModal(true)} > - - - {currentProject.name[0].toUpperCase()} - - {currentProject.name} - - {(props.projects.length > 1 || user.isPorterUser) && - - } + {(user.isPorterUser && currentProject.simplified_view_enabled) ? + + (props.projects.length > 1 || user.isPorterUser) && setShowModal(true)} > + + + {currentProject.name[0].toUpperCase()} + + {currentProject.name} + - {/* arrow_drop_down */} - - {user.isPorterUser && currentProject.simplified_view_enabled && - - (Visible to @porter.run only) - - Porter Apps {currentProject.validate_apply_v2 ? "V2" : "V1"} - + {(props.projects.length > 1 || user.isPorterUser) && + + } + + + : + (props.projects.length > 1 || user.isPorterUser) && setShowModal(true)} > + + + {currentProject.name[0].toUpperCase()} + + {currentProject.name} + + {(props.projects.length > 1 || user.isPorterUser) && + + } + } {/* {renderDropdown()} */} @@ -245,33 +260,6 @@ const MainSelector = styled.div` } `; -const PorterAppDetailContainer = styled.div` - display: flex; - flex-direction: column; - background: #ffffff11; - border: 1px solid #ffffff11; - font-size: 14px; - cursor: ${props => (props.projectsLength > 1 || props.isPorterUser) ? "pointer" : "default"}; - padding: 10px; - position: relative; - :hover { - > i { - background: #ffffff22; - } - } - - > i { - margin-left: 7px; - margin-right: 12px; - font-size: 25px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 20px; - background: "#ffffff22" - } -`; - const ProjectName = styled.div` overflow: hidden; white-space: nowrap;