From e0c2a6d95ec1382632846a1acad6c6d20da18ae2 Mon Sep 17 00:00:00 2001 From: sdess09 <37374498+sdess09@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:59:54 -0400 Subject: [PATCH 1/2] Switch back from session to local (#3675) --- dashboard/src/shared/Context.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/src/shared/Context.tsx b/dashboard/src/shared/Context.tsx index 30d746d896..adb3ec35e0 100644 --- a/dashboard/src/shared/Context.tsx +++ b/dashboard/src/shared/Context.tsx @@ -116,12 +116,12 @@ class ContextProvider extends Component { currentProject: null, setCurrentProject: (currentProject: ProjectType, callback?: any) => { if (currentProject) { - sessionStorage.setItem("currentProject", currentProject.id.toString()); + localStorage.setItem("currentProject", currentProject.id.toString()); pushQueryParams(this.props, { project_id: currentProject.id.toString(), }); } else { - sessionStorage.removeItem("currentProject"); + localStorage.removeItem("currentProject"); } this.setState({ currentProject }, () => { callback && callback(); From 873759c6058eae3bb16b4177fb5f3996ae8df05e Mon Sep 17 00:00:00 2001 From: Feroze Mohideen Date: Thu, 28 Sep 2023 11:10:32 -0400 Subject: [PATCH 2/2] add marker for porter app v1 vs v2 (#3674) --- .../src/main/home/sidebar/ProjectButton.tsx | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/dashboard/src/main/home/sidebar/ProjectButton.tsx b/dashboard/src/main/home/sidebar/ProjectButton.tsx index a00c31d3bd..d283aa5a41 100644 --- a/dashboard/src/main/home/sidebar/ProjectButton.tsx +++ b/dashboard/src/main/home/sidebar/ProjectButton.tsx @@ -75,6 +75,13 @@ const ProjectButton: React.FC = (props) => { {/* arrow_drop_down */} + {user.isPorterUser && currentProject.simplified_view_enabled && + + (Visible to @porter.run only) + + Porter Apps {currentProject.validate_apply_v2 ? "V2" : "V1"} + + } {/* {renderDropdown()} */} ); @@ -238,6 +245,33 @@ 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;