Skip to content
Snippets Groups Projects
Commit c881ec63 authored by Henrique Varella Ehrenfried's avatar Henrique Varella Ehrenfried :speech_balloon:
Browse files

Fix merge conflict

parents d246e8e7 0e0f0976
Branches
Tags
6 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system,!32Homologa,!31Fix console error,!29Training materials into fix console error
...@@ -37,45 +37,40 @@ export default function MenuBarMobile (props) { ...@@ -37,45 +37,40 @@ export default function MenuBarMobile (props) {
}; };
return ( return (
<>
<MobileDrawerMenu anchor={'left'} open={drawerOpen}
onClose={toggleDrawer(false)}
openSignUp={props.openSignUp} openLogin={props.openLogin}
/>
<OuterDiv> <OuterDiv>
<Grid container> <DrawerButtonDiv style={{justifySelf : "flex-start", position : "absolute", left : 0}}>
<Grid item xs={3} style={{display : "flex"}}>
<Button style={{ color: "#00bcd4" }} onClick={toggleDrawer(true)}> <Button style={{ color: "#00bcd4" }} onClick={toggleDrawer(true)}>
<MenuIcon className="icon" /> <MenuIcon className="icon" />
</Button> </Button>
</Grid> </DrawerButtonDiv>
<Grid item xs={9} justify={'center'}>
<div className="logo"> <div className="logo">
<Link to="/"> <Link to="/">
<img src={logo} alt={"Plataforma Integrada"} /> <img src={logo} alt={"Plataforma Integrada"} />
</Link> </Link>
</div> </div>
</Grid>
</Grid>
<MobileDrawerMenu anchor={'left'} open={drawerOpen}
onClose={toggleDrawer(false)}
openSignUp = {props.openSignUp} openLogin = {props.openLogin}
/>
</OuterDiv> </OuterDiv>
</>
) )
} }
const OuterDiv = styled.div` const OuterDiv = styled.div`
height : 48px; height : 48px;
margin : 5px 2px; width : 100%;
display : flex; display : flex;
flex-direction : column; flex-direction : row;
align-content : stretch; align-items : center;
justify-content : center; justify-content : center;
position : relative;
.logo { .logo {
height : 50px; align-content : center;
width : 150px; justify-self : center;
padding : 5px;
padding-top : 15px;
text-align : center; text-align : center;
img { img {
height : 38px; height : 38px;
overflow : hidden; overflow : hidden;
...@@ -98,3 +93,8 @@ const OuterDiv = styled.div ` ...@@ -98,3 +93,8 @@ const OuterDiv = styled.div `
color : inherit !important; color : inherit !important;
} }
` `
const DrawerButtonDiv = styled.div`
justify-self : center;
position : absolute;
left : 0;
`
\ No newline at end of file
...@@ -36,7 +36,8 @@ import HistoryIcon from '@material-ui/icons/History'; ...@@ -36,7 +36,8 @@ import HistoryIcon from '@material-ui/icons/History';
import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder'; import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder';
import FolderOpenIcon from '@material-ui/icons/FolderOpen'; import FolderOpenIcon from '@material-ui/icons/FolderOpen';
import SettingsIcon from '@material-ui/icons/Settings'; import SettingsIcon from '@material-ui/icons/Settings';
import {apiDomain, apiUrl} from '../env.js' import {apiDomain, apiUrl} from '../env.js';
import SearchIcon from '@material-ui/icons/Search';
import {getAxiosConfig} from './HelperFunctions/getAxiosConfig' import {getAxiosConfig} from './HelperFunctions/getAxiosConfig'
import axios from 'axios' import axios from 'axios'
...@@ -48,6 +49,7 @@ export default function MobileDrawerMenu (props) { ...@@ -48,6 +49,7 @@ export default function MobileDrawerMenu (props) {
{ name : "Sobre a Plataforma", href : "sobre", icon : <InfoIcon/>}, { name : "Sobre a Plataforma", href : "sobre", icon : <InfoIcon/>},
{ name : "Contato", href : "contato", icon : <MailOutlineIcon/>}, { name : "Contato", href : "contato", icon : <MailOutlineIcon/>},
{ name : "Central de Ajuda", href : "ajuda", icon : <HelpOutlineIcon/>}, { name : "Central de Ajuda", href : "ajuda", icon : <HelpOutlineIcon/>},
{ name: "Busca", href: `/busca?query=${state.search.query}&search_class=${state.search.class}`, icon : <SearchIcon/>},
{ name : "Termos de Uso", href : "termos", icon : <AssignmentIcon/>}, { name : "Termos de Uso", href : "termos", icon : <AssignmentIcon/>},
] ]
......
...@@ -25,6 +25,7 @@ import { WhiteContainer, StyledGrid } from '../StyledComponents.js' ...@@ -25,6 +25,7 @@ import { WhiteContainer, StyledGrid } from '../StyledComponents.js'
import { ButtonsAreaRecurso } from './ButtonsArea' import { ButtonsAreaRecurso } from './ButtonsArea'
export default function Template(props) { export default function Template(props) {
console.log(props.sliceArr);
return ( return (
<WhiteContainer> <WhiteContainer>
<Title <Title
...@@ -48,18 +49,18 @@ export default function Template(props) { ...@@ -48,18 +49,18 @@ export default function Template(props) {
props.sliceArr.map((card) => props.sliceArr.map((card) =>
<Grid item md={3} xs={12} key={card.id}> <Grid item md={3} xs={12} key={card.id}>
<ResourceCardFunction <ResourceCardFunction
avatar={card.publisher.avatar} avatar={card.submitter.avatar}
id={card.id} id={card.learning_object.id}
thumbnail={card.thumbnail} thumbnail={card.learning_object.thumbnail}
type={card.object_type ? card.object_type : "Outros"} type={card.learning_object.object_type ? card.learning_object.object_type : "Outros"}
title={card.name} title={card.learning_object.name}
published={false} published={false}
likeCount={card.likes_count} likeCount={card.learning_object.likes_count}
liked={card.liked} liked={card.learning_object.liked}
rating={card.review_average} rating={card.learning_object.review_average}
author={card.publisher.name} author={card.submitter.name}
tags={card.tags} tags={card.learning_object.tags}
href={"/recurso/" + card.id} href={"/recurso/" + card.learning_object.id}
downloadableLink={card.default_attachment_location} downloadableLink={card.default_attachment_location}
/> />
</Grid> </Grid>
......
...@@ -184,11 +184,11 @@ export const UserProfileInfoDiv = styled.div` ...@@ -184,11 +184,11 @@ export const UserProfileInfoDiv = styled.div`
` `
export const CheckTeacherDiv = styled.div` export const CheckTeacherDiv = styled.div`
@media screen and (min-width: 500px) {
padding-top : 10px; padding-top : 10px;
padding-left : 250px; padding-left : 250px;
margin-bottom : -10px; margin-bottom : -10px;
} display : absolute;
p { p {
margin : 0 0 10px; margin : 0 0 10px;
font-family: Roboto; font-family: Roboto;
...@@ -206,9 +206,6 @@ export const CheckTeacherDiv = styled.div` ...@@ -206,9 +206,6 @@ export const CheckTeacherDiv = styled.div`
} }
} }
} }
@media screen and (max-width: 499px) {
display : none;
}
` `
export const StyledTabs = styled(Tabs)` export const StyledTabs = styled(Tabs)`
......
...@@ -27,6 +27,8 @@ import ModalAlterarCover from '../ModalAlterarCover/ModalAlterarCover.js' ...@@ -27,6 +27,8 @@ import ModalAlterarCover from '../ModalAlterarCover/ModalAlterarCover.js'
export default function Cover (props) { export default function Cover (props) {
const {state} = useContext(Store) const {state} = useContext(Store)
const WIDTH = window.innerWidth;
const [currentCover, setCoverImg] = useState(state.currentUser.cover_file_name) const [currentCover, setCoverImg] = useState(state.currentUser.cover_file_name)
const [tempCover, setTempCover] = useState('') const [tempCover, setTempCover] = useState('')
...@@ -55,11 +57,21 @@ export default function Cover (props) { ...@@ -55,11 +57,21 @@ export default function Cover (props) {
{currentCover && <img src={apiDomain + currentCover} alt = '' style= {{width:"100%", height:"100%", objectFit : "cover" }}/>} {currentCover && <img src={apiDomain + currentCover} alt = '' style= {{width:"100%", height:"100%", objectFit : "cover" }}/>}
<input accept="image/*" style = {{display:"none"}} id="choose-cover-file" type="file" onChange={(e) => updateCover(e.target.files)}/> <input accept="image/*" style = {{display:"none"}} id="choose-cover-file" type="file" onChange={(e) => updateCover(e.target.files)}/>
<label htmlFor="choose-cover-file"> <label htmlFor="choose-cover-file">
{
WIDTH >= 545 ?
<Tooltip title={<span style={{fontSize:"14px", overflow:"hidden", transition:"all .5s ease"}}>ALTERAR CAPA</span>} placement="left"> <Tooltip title={<span style={{fontSize:"14px", overflow:"hidden", transition:"all .5s ease"}}>ALTERAR CAPA</span>} placement="left">
<IconButton style={{position:"absolute",right:"0",top:"0",color:"#fff"}}color="primary" aria-label="upload picture" component="span"> <IconButton style={{position:"absolute",right:"0",bottom: "0",color:"#fff"}}color="primary" aria-label="upload picture" component="span">
<PhotoCamera /> <PhotoCamera />
</IconButton> </IconButton>
</Tooltip> </Tooltip>
:
<Tooltip title={<span style={{fontSize:"14px", overflow:"hidden", transition:"all .5s ease"}}>ALTERAR CAPA</span>} placement="left">
<IconButton style={{position:"absolute",left:"0",top: "0",color:"#fff"}}color="primary" aria-label="upload picture" component="span">
<PhotoCamera />
</IconButton>
</Tooltip>
}
</label> </label>
</CoverContainer> </CoverContainer>
</> </>
......
...@@ -49,8 +49,8 @@ const EditProfileAnchor = styled(Link)` ...@@ -49,8 +49,8 @@ const EditProfileAnchor = styled(Link)`
box-shadow : 0 2px 5px 0 rgba(0,0,0,.26); box-shadow : 0 2px 5px 0 rgba(0,0,0,.26);
background-color : #fafafa; background-color : #fafafa;
position : absolute; position : absolute;
right : 5px; right : 10px;
bottom : 0; top : 10px;
margin-bottom : 20px; margin-bottom : 20px;
color : #666; color : #666;
padding : 0 10px; padding : 0 10px;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment