|
|
@@ -2,13 +2,15 @@ import React, { Component } from "react";
|
|
|
import styled from "styled-components";
|
|
|
|
|
|
import category from "assets/category.svg";
|
|
|
-import integrations from "assets/integrations-bold.png";
|
|
|
+import integrations from "assets/integrations.svg";
|
|
|
import rocket from "assets/rocket.png";
|
|
|
-import settings from "assets/settings-bold.png";
|
|
|
-import web from "assets/web-bold.png";
|
|
|
-import addOns from "assets/add-ons-bold.png";
|
|
|
-import infra from "assets/infra.png";
|
|
|
-import sliders from "assets/sliders.svg";
|
|
|
+import settings from "assets/settings.svg";
|
|
|
+import applications from "assets/applications.svg";
|
|
|
+import infra from "assets/cluster.svg";
|
|
|
+import sliders from "assets/env-groups.svg";
|
|
|
+import addOns from "assets/add-ons.svg"
|
|
|
+import database from "assets/database.svg";
|
|
|
+import collapseSidebar from "assets/collapse-sidebar.svg";
|
|
|
|
|
|
import { Context } from "shared/Context";
|
|
|
|
|
|
@@ -97,7 +99,7 @@ class Sidebar extends Component<PropsType, StateType> {
|
|
|
if (!this.state.showSidebar) {
|
|
|
return (
|
|
|
<PullTab onClick={this.toggleSidebar}>
|
|
|
- <i className="material-icons">double_arrow</i>
|
|
|
+ <img src={collapseSidebar} />
|
|
|
</PullTab>
|
|
|
);
|
|
|
}
|
|
|
@@ -115,6 +117,7 @@ class Sidebar extends Component<PropsType, StateType> {
|
|
|
if (!currentProject?.simplified_view_enabled) {
|
|
|
return (
|
|
|
<ScrollWrapper>
|
|
|
+ <Spacer y={.5} />
|
|
|
<SidebarLabel>Home</SidebarLabel>
|
|
|
<NavButton path={"/dashboard"}>
|
|
|
<Img src={category} />
|
|
|
@@ -174,7 +177,6 @@ class Sidebar extends Component<PropsType, StateType> {
|
|
|
</ScrollWrapper>
|
|
|
);
|
|
|
} else if (currentProject.simplified_view_enabled) {
|
|
|
-
|
|
|
if (currentProject.multi_cluster) {
|
|
|
return (
|
|
|
<ScrollWrapper>
|
|
|
@@ -211,7 +213,7 @@ class Sidebar extends Component<PropsType, StateType> {
|
|
|
path="/apps"
|
|
|
active={window.location.pathname.startsWith("/apps")}
|
|
|
>
|
|
|
- <Img src={web} />
|
|
|
+ <Img src={applications} />
|
|
|
Applications
|
|
|
</NavButton>
|
|
|
<NavButton
|
|
|
@@ -241,7 +243,7 @@ class Sidebar extends Component<PropsType, StateType> {
|
|
|
window.location.pathname.startsWith("/cluster-dashboard")
|
|
|
}
|
|
|
>
|
|
|
- <Img src={infra} />
|
|
|
+ <Img src={settings} />
|
|
|
Infrastructure
|
|
|
</NavButton>
|
|
|
)}
|
|
|
@@ -260,14 +262,23 @@ class Sidebar extends Component<PropsType, StateType> {
|
|
|
|
|
|
return (
|
|
|
<ScrollWrapper>
|
|
|
- <Spacer y={.5} />
|
|
|
+ <Spacer y={.4} />
|
|
|
<NavButton
|
|
|
path="/apps"
|
|
|
active={window.location.pathname.startsWith("/apps")}
|
|
|
>
|
|
|
- <Img src={web} />
|
|
|
+ <Img src={applications} />
|
|
|
Applications
|
|
|
</NavButton>
|
|
|
+ {currentProject.db_enabled && (
|
|
|
+ <NavButton
|
|
|
+ path="/databases"
|
|
|
+ active={window.location.pathname.startsWith("/apps")}
|
|
|
+ >
|
|
|
+ <Img src={database} />
|
|
|
+ Databases
|
|
|
+ </NavButton>
|
|
|
+ )}
|
|
|
<NavButton
|
|
|
path="/addons"
|
|
|
active={window.location.pathname.startsWith("/addons")}
|
|
|
@@ -354,20 +365,8 @@ class Sidebar extends Component<PropsType, StateType> {
|
|
|
{this.renderPullTab()}
|
|
|
<StyledSidebar showSidebar={this.state.showSidebar}>
|
|
|
<SidebarBg />
|
|
|
- <CollapseButton
|
|
|
- onClick={this.toggleSidebar}
|
|
|
- onMouseOver={() => {
|
|
|
- this.setState({ showTooltip: true });
|
|
|
- }}
|
|
|
- onMouseOut={() => {
|
|
|
- this.setState({ showTooltip: false });
|
|
|
- }}
|
|
|
- >
|
|
|
- {this.renderTooltip()}
|
|
|
- <i className="material-icons">double_arrow</i>
|
|
|
- </CollapseButton>
|
|
|
-
|
|
|
- <ProjectSectionContainer />
|
|
|
+ <Spacer y={0.5} />
|
|
|
+ <ProjectSectionContainer collapseSidebar={this.toggleSidebar} />
|
|
|
{this.renderProjectContents()}
|
|
|
{this.context.featurePreview && (
|
|
|
<Container row>
|
|
|
@@ -415,30 +414,23 @@ const NavButton = styled(SidebarLink)`
|
|
|
border-radius: 5px;
|
|
|
position: relative;
|
|
|
text-decoration: none;
|
|
|
- height: 34px;
|
|
|
- margin: 5px 15px;
|
|
|
- padding: 0 30px 2px 6px;
|
|
|
+ height: 45px;
|
|
|
+ margin: 7px 22px;
|
|
|
+ padding: 0 30px 2px 7px;
|
|
|
font-size: 13px;
|
|
|
- color: ${props => props.theme.text.primary};
|
|
|
cursor: ${(props: { disabled?: boolean }) =>
|
|
|
props.disabled ? "not-allowed" : "pointer"};
|
|
|
|
|
|
- background: ${(props: any) => (props.active ? "#ffffff11" : "")};
|
|
|
-
|
|
|
- :hover {
|
|
|
- background: ${(props: any) => (props.active ? "#ffffff11" : "#ffffff08")};
|
|
|
- }
|
|
|
-
|
|
|
&.active {
|
|
|
- background: #ffffff11;
|
|
|
+ background: #202126;
|
|
|
|
|
|
:hover {
|
|
|
- background: #ffffff11;
|
|
|
+ background: #202126;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
:hover {
|
|
|
- background: #ffffff08;
|
|
|
+ background: #ffffff09;
|
|
|
}
|
|
|
|
|
|
> i {
|
|
|
@@ -451,7 +443,7 @@ const NavButton = styled(SidebarLink)`
|
|
|
|
|
|
const Img = styled.img<{ enlarge?: boolean }>`
|
|
|
padding: ${(props) => (props.enlarge ? "0 0 0 1px" : "4px")};
|
|
|
- height: 22px;
|
|
|
+ height: 25px;
|
|
|
padding-top: 4px;
|
|
|
border-radius: 3px;
|
|
|
margin-right: 8px;
|
|
|
@@ -480,25 +472,31 @@ const SidebarLabel = styled.div`
|
|
|
const PullTab = styled.div`
|
|
|
position: fixed;
|
|
|
width: 30px;
|
|
|
- height: 50px;
|
|
|
- background: #7a838f77;
|
|
|
+ height: 30px;
|
|
|
+ border: 1px solid #383a3f;
|
|
|
+ border-left: none;
|
|
|
top: calc(50vh - 60px);
|
|
|
left: 0;
|
|
|
z-index: 1;
|
|
|
border-top-right-radius: 5px;
|
|
|
border-bottom-right-radius: 5px;
|
|
|
cursor: pointer;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
|
|
|
- :hover {
|
|
|
- background: #99a5af77;
|
|
|
+ > img {
|
|
|
+ height: 14px;
|
|
|
+ width: 14px;
|
|
|
+ opacity: 0.5;
|
|
|
}
|
|
|
|
|
|
- > i {
|
|
|
- color: #ffffff77;
|
|
|
- font-size: 18px;
|
|
|
- position: absolute;
|
|
|
- top: 15px;
|
|
|
- left: 4px;
|
|
|
+ :hover {
|
|
|
+ border: 1px solid ${props => props.theme.text.primary};
|
|
|
+ border-left: none;
|
|
|
+ > img {
|
|
|
+ opacity: 0.9;
|
|
|
+ }
|
|
|
}
|
|
|
`;
|
|
|
|
|
|
@@ -556,7 +554,7 @@ const CollapseButton = styled.div`
|
|
|
`;
|
|
|
|
|
|
const StyledSidebar = styled.section`
|
|
|
- width: 240px;
|
|
|
+ width: 260px;
|
|
|
position: relative;
|
|
|
padding-top: 20px;
|
|
|
height: 100vh;
|
|
|
@@ -566,7 +564,7 @@ const StyledSidebar = styled.section`
|
|
|
animation-fill-mode: forwards;
|
|
|
@keyframes showSidebar {
|
|
|
from {
|
|
|
- margin-left: -240px;
|
|
|
+ margin-left: -260px;
|
|
|
}
|
|
|
to {
|
|
|
margin-left: 0px;
|
|
|
@@ -577,7 +575,7 @@ const StyledSidebar = styled.section`
|
|
|
margin-left: 0px;
|
|
|
}
|
|
|
to {
|
|
|
- margin-left: -240px;
|
|
|
+ margin-left: -260px;
|
|
|
}
|
|
|
}
|
|
|
`;
|