parent
dbe526cce7
commit
f842ef6e78
|
@ -1,11 +1,18 @@
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
import PageTitle from "../PageTitle/PageTitle";
|
||||||
|
|
||||||
import MainContainerStyled from "./MainContainer.style"
|
import MainContainerStyled, { ContentContainer, TitleContainer } from "./MainContainer.style";
|
||||||
|
|
||||||
const Container = ({children}) => {
|
const MainContainer = ({ children }) => {
|
||||||
return (
|
return (
|
||||||
<MainContainerStyled>{children}</MainContainerStyled>
|
<MainContainerStyled>
|
||||||
)
|
<TitleContainer>
|
||||||
}
|
<PageTitle />
|
||||||
|
</TitleContainer>
|
||||||
|
<ContentContainer>{children}</ContentContainer>
|
||||||
|
</MainContainerStyled>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MainContainer;
|
||||||
|
|
||||||
export default Container
|
|
|
@ -1,11 +1,26 @@
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
|
||||||
const MainContainer = styled.div`
|
const MainContainer = styled.main`
|
||||||
|
padding-left: 97px;
|
||||||
|
padding-top: 26px;
|
||||||
|
margin-right: 16px;
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: column;
|
||||||
justify-content: right;
|
align-items: flex-end;
|
||||||
|
height: 96vh;
|
||||||
|
`;
|
||||||
|
const TitleContainer = styled.div`
|
||||||
|
width: 100%;
|
||||||
|
`;
|
||||||
|
const ContentContainer = styled.div`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-top: 16px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default MainContainer;
|
export default MainContainer;
|
||||||
|
|
||||||
|
export { TitleContainer, ContentContainer };
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import styled from "styled-components";
|
||||||
|
|
||||||
const H1Title = styled.h1`
|
const H1Title = styled.h1`
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-family: "HelveticaHeavy";
|
font-family: "Helvetica85";
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
`;
|
`;
|
||||||
export default H1Title
|
export default H1Title
|
|
@ -11,7 +11,7 @@ const CompanyStyled = styled.div`
|
||||||
bottom: 16px;
|
bottom: 16px;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
p{
|
p{
|
||||||
font-family: "HelveticaHeavy";
|
font-family: "Helvetica85";
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ const BtnSubmitStyled = styled.button`
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: "HelveticaRoman";
|
font-family: "Helvetica55";
|
||||||
box-shadow: -1px 0px 8px 0px rgba(255,255,255,.25);
|
box-shadow: -1px 0px 8px 0px rgba(255,255,255,.25);
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ const MenuBottomStyled = styled.div`
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 12px;
|
left: 12px;
|
||||||
bottom: 16px;
|
bottom: 16px;
|
||||||
|
z-index: 100;
|
||||||
svg {
|
svg {
|
||||||
max-width: 51px;
|
max-width: 51px;
|
||||||
max-height: 51px;
|
max-height: 51px;
|
||||||
|
@ -18,7 +19,7 @@ const MenuBottomStyled = styled.div`
|
||||||
width: 129px;
|
width: 129px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
font-family: "HelveticaRoman";
|
font-family: "Helvetica55";
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
color: ${color.pricinpal.blanco};
|
color: ${color.pricinpal.blanco};
|
||||||
display: ${({ hover }) => (hover ? "flex" : "none")};
|
display: ${({ hover }) => (hover ? "flex" : "none")};
|
||||||
|
|
|
@ -24,7 +24,7 @@ import MenuBottom from "./MenuBottom";
|
||||||
import MenuTop from "./MenuTop";
|
import MenuTop from "./MenuTop";
|
||||||
|
|
||||||
const MenuComponent = () => {
|
const MenuComponent = () => {
|
||||||
const [hover, setHover] = React.useState(true);
|
const [hover, setHover] = React.useState(false);
|
||||||
const { whatsApps } = React.useContext(WhatsAppsContext);
|
const { whatsApps } = React.useContext(WhatsAppsContext);
|
||||||
const { user } = React.useContext(AuthContext);
|
const { user } = React.useContext(AuthContext);
|
||||||
const [connectionWarning, setConnectionWarning] = React.useState(false);
|
const [connectionWarning, setConnectionWarning] = React.useState(false);
|
||||||
|
@ -56,7 +56,7 @@ const MenuComponent = () => {
|
||||||
}, [whatsApps]);
|
}, [whatsApps]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MenuStyled hover={hover}>
|
<MenuStyled onMouseEnter={HoverMenu} onMouseLeave={HoverMenu} hover={hover}>
|
||||||
<VideoComponent width={"100%"} zIndex={"-1"} position={"absolute"} />
|
<VideoComponent width={"100%"} zIndex={"-1"} position={"absolute"} />
|
||||||
<MenuTop hover={hover}/>
|
<MenuTop hover={hover}/>
|
||||||
<MenuListStyled>
|
<MenuListStyled>
|
||||||
|
|
|
@ -7,7 +7,7 @@ const MenuStyled = styled.nav`
|
||||||
width: 76px;
|
width: 76px;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: ${color.pricinpal.grisOscuro}; //Same background login
|
background: ${color.pricinpal.grisOscuro}; //Same background login
|
||||||
z-index: 10;
|
z-index: 100;
|
||||||
animation: ${(props) => (props.hover ? "hover" : "hoveroff")} 0.5s forwards;
|
animation: ${(props) => (props.hover ? "hover" : "hoveroff")} 0.5s forwards;
|
||||||
@keyframes hover {
|
@keyframes hover {
|
||||||
from {
|
from {
|
||||||
|
@ -55,7 +55,7 @@ const MenuListItemStyled = styled.li`
|
||||||
|
|
||||||
p {
|
p {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
font-family: "HelveticaRoman";
|
font-family: "Helvetica55";
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
opacity: ${(props) => (props.hover ? "1" : "0")};
|
opacity: ${(props) => (props.hover ? "1" : "0")};
|
||||||
display: ${(props) => (props.hover ? "block" : "none")};
|
display: ${(props) => (props.hover ? "block" : "none")};
|
||||||
|
|
|
@ -17,7 +17,7 @@ const MenuTitle = styled.p`
|
||||||
display: ${({ hover }) => (hover ? "flex" : "none")};
|
display: ${({ hover }) => (hover ? "flex" : "none")};
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-family: "HelveticaRoman";
|
font-family: "Helvetica55";
|
||||||
color: ${color.pricinpal.naranja};
|
color: ${color.pricinpal.naranja};
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
import React from "react";
|
||||||
|
import { PageTitleStyled } from "./PageTitle.style";
|
||||||
|
import UserBtn from "./UserBtn/UserBtn";
|
||||||
|
|
||||||
|
import { AuthContext } from "../../context/Auth/AuthContext";
|
||||||
|
|
||||||
|
import logo from "../../assets/images/Logo.png"
|
||||||
|
|
||||||
|
const PageTitle = () => {
|
||||||
|
const { user } = React.useContext(AuthContext);
|
||||||
|
return (
|
||||||
|
<PageTitleStyled>
|
||||||
|
<h1>PageTitle</h1>
|
||||||
|
<UserBtn user={user} img={logo}/>
|
||||||
|
</PageTitleStyled>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default PageTitle;
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
import styled from "styled-components";
|
||||||
|
import { color } from "../../style/varibles";
|
||||||
|
|
||||||
|
const PageTitleStyled = styled.div`
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
`;
|
||||||
|
const UserBtnStyled = styled.button`
|
||||||
|
display: flex;
|
||||||
|
width: 218px;
|
||||||
|
padding: 16px;
|
||||||
|
text-align: left;
|
||||||
|
background-color: ${color.pricinpal.grisOscuro};
|
||||||
|
color: ${color.pricinpal.blanco};
|
||||||
|
border: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
font-family: "Helvetica55";
|
||||||
|
letter-spacing: .5px;
|
||||||
|
font-size: 14px;
|
||||||
|
text-transform: capitalize;
|
||||||
|
align-items: center;
|
||||||
|
img{
|
||||||
|
background-color: white;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
object-fit: contain;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
export { PageTitleStyled, UserBtnStyled };
|
|
@ -0,0 +1,14 @@
|
||||||
|
import React from "react";
|
||||||
|
import { UserBtnStyled } from "../PageTitle.style";
|
||||||
|
|
||||||
|
const UserBtn = ({ user, img }) => {
|
||||||
|
return (
|
||||||
|
<UserBtnStyled>
|
||||||
|
<img src={img} alt={user ? user.name : null} width="24px" />
|
||||||
|
Bem Vindo, {user ? user.name : null}
|
||||||
|
</UserBtnStyled>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default UserBtn;
|
||||||
|
|
|
@ -21,11 +21,7 @@ const LoggedInLayout = ({ children }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<MenuComponent />
|
<MenuComponent />
|
||||||
<MainContainer>
|
<MainContainer>{children ? children : null}</MainContainer>
|
||||||
<main>
|
|
||||||
{children ? children : null}
|
|
||||||
</main>
|
|
||||||
</MainContainer>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,8 +15,9 @@ const useStyles = makeStyles((theme) => ({
|
||||||
flex: 1,
|
flex: 1,
|
||||||
// // backgroundColor: "#eee",
|
// // backgroundColor: "#eee",
|
||||||
// padding: theme.spacing(4),
|
// padding: theme.spacing(4),
|
||||||
height: `calc(100% - 48px)`,
|
height: `100%`,
|
||||||
overflowY: "hidden",
|
overflowY: "hidden",
|
||||||
|
borderRadius: "5px",
|
||||||
},
|
},
|
||||||
|
|
||||||
chatPapper: {
|
chatPapper: {
|
||||||
|
@ -75,9 +76,7 @@ const Chat = () => {
|
||||||
item
|
item
|
||||||
xs={12}
|
xs={12}
|
||||||
md={4}
|
md={4}
|
||||||
className={
|
className={ticketId ? classes.contactsWrapperSmall : classes.contactsWrapper}
|
||||||
ticketId ? classes.contactsWrapperSmall : classes.contactsWrapper
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<TicketsManager />
|
<TicketsManager />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -2,7 +2,6 @@ import React, { useContext } from "react";
|
||||||
import { Route as RouterRoute, Redirect } from "react-router-dom";
|
import { Route as RouterRoute, Redirect } from "react-router-dom";
|
||||||
|
|
||||||
import { AuthContext } from "../context/Auth/AuthContext";
|
import { AuthContext } from "../context/Auth/AuthContext";
|
||||||
import BackdropLoading from "../components/BackdropLoading";
|
|
||||||
import Loading from "../components/LoadingScreen/Loading"
|
import Loading from "../components/LoadingScreen/Loading"
|
||||||
|
|
||||||
const Route = ({ component: Component, isPrivate = false, ...rest }) => {
|
const Route = ({ component: Component, isPrivate = false, ...rest }) => {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { createGlobalStyle } from "styled-components";
|
import { createGlobalStyle } from "styled-components";
|
||||||
import { texts, color } from "./varibles";
|
import { texts, color } from "./varibles";
|
||||||
|
|
||||||
import HelveticaRoman from "../assets/fonts/Helvetica_Neue_LT_Pro-Roman.otf";
|
import Helvetica55 from "../assets/fonts/Helvetica_Neue_LT_Pro-Roman.otf";
|
||||||
import HelveticaUl from "../assets/fonts/Helvetica_Neue_LT_Pro-UltraLight.otf";
|
import Helvetica25 from "../assets/fonts/Helvetica_Neue_LT_Pro-UltraLight.otf";
|
||||||
import HelveticaLt from "../assets/fonts/Helvetica_Neue_LT_Pro-Light.otf";
|
import Helvetica45 from "../assets/fonts/Helvetica_Neue_LT_Pro-Light.otf";
|
||||||
import HelveticaItalic from "../assets/fonts/Helvetica_Neue_LT_Pro-Italic.otf";
|
import Helvetica56 from "../assets/fonts/Helvetica_Neue_LT_Pro-Italic.otf";
|
||||||
import HelveticaHeavy from "../assets/fonts/Helvetica_Neue_LT_Pro-Heavy.otf";
|
import Helvetica85 from "../assets/fonts/Helvetica_Neue_LT_Pro-Heavy.otf";
|
||||||
import HelveticaBlack from "../assets/fonts/Helvetica_Neue_LT_Pro-Black.otf";
|
import Helvetica95 from "../assets/fonts/Helvetica_Neue_LT_Pro-Black.otf";
|
||||||
|
|
||||||
const GlobalStyled = createGlobalStyle`
|
const GlobalStyled = createGlobalStyle`
|
||||||
//RESET
|
//RESET
|
||||||
|
@ -56,40 +56,41 @@ table {
|
||||||
|
|
||||||
//FONTS
|
//FONTS
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "HelveticaRoman";
|
font-family: "Helvetica55";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
src: url(${HelveticaRoman}) format('truetype');
|
src: url(${Helvetica55}) format('truetype');
|
||||||
}
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "HelveticaUl";
|
font-family: "Helvetica25";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
src: url(${HelveticaUl}) format('truetype');
|
src: url(${Helvetica25}) format('truetype');
|
||||||
}
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "HelveticaLt";
|
font-family: "Helvetica45";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
src: url(${HelveticaLt}) format('truetype');
|
src: url(${Helvetica45}) format('truetype');
|
||||||
}
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "HelveticaItalic";
|
font-family: "Helvetica56";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
src: url(${HelveticaItalic}) format('truetype');
|
src: url(${Helvetica56}) format('truetype');
|
||||||
}
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "HelveticaHeavy";
|
font-family: "Helvetica85";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
src: url(${HelveticaHeavy}) format('truetype');
|
src: url(${Helvetica85}) format('truetype');
|
||||||
}
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "HelveticaBlack";
|
font-family: "Helvetica95";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
src: url(${HelveticaBlack}) format('truetype');
|
src: url(${Helvetica95}) format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
//Patterns
|
//Patterns
|
||||||
html{
|
html{
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
height: 100vh;
|
||||||
}
|
}
|
||||||
h1{
|
h1{
|
||||||
${texts.h1}
|
${texts.h1}
|
||||||
|
|
|
@ -2,34 +2,34 @@ export const texts = {
|
||||||
h1: {
|
h1: {
|
||||||
fontSize: "28px",
|
fontSize: "28px",
|
||||||
paddingTop: "6px",
|
paddingTop: "6px",
|
||||||
fontFamily: "HelveticaRoman",
|
fontFamily: "Helvetica55",
|
||||||
},
|
},
|
||||||
h1Login: {
|
h1Login: {
|
||||||
fontSize: "32px",
|
fontSize: "32px",
|
||||||
paddingTop: "6px",
|
paddingTop: "6px",
|
||||||
fontFamily: "HelveticaHeavy",
|
fontFamily: "Helvetica85",
|
||||||
},
|
},
|
||||||
h2: {
|
h2: {
|
||||||
fontSize: "21px",
|
fontSize: "21px",
|
||||||
paddingTop: "6px",
|
paddingTop: "6px",
|
||||||
fontFamily: "HelveticaRoman",
|
fontFamily: "Helvetica55",
|
||||||
},
|
},
|
||||||
p18: {
|
p18: {
|
||||||
fontSize: "18px",
|
fontSize: "18px",
|
||||||
fontFamily: "HelveticaRoman",
|
fontFamily: "Helvetica55",
|
||||||
},
|
},
|
||||||
p16: {
|
p16: {
|
||||||
fontSize: "16px",
|
fontSize: "16px",
|
||||||
fontFamily: "HelveticaRoman",
|
fontFamily: "Helvetica55",
|
||||||
},
|
},
|
||||||
p14: {
|
p14: {
|
||||||
fontSize: "14px",
|
fontSize: "14px",
|
||||||
fontFamily: "HelveticaRoman",
|
fontFamily: "Helvetica55",
|
||||||
},
|
},
|
||||||
p14UnderLine: {
|
p14UnderLine: {
|
||||||
fontSize: "14px",
|
fontSize: "14px",
|
||||||
textDecoretion: "underline",
|
textDecoretion: "underline",
|
||||||
fontFamily: "HelveticaRoman",
|
fontFamily: "Helvetica55",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue