Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PortalMEC-React
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PortalMEC
PortalMEC-React
Commits
8c40c6a4
Commit
8c40c6a4
authored
4 years ago
by
lfr20
Browse files
Options
Downloads
Patches
Plain Diff
change positions according width
parent
9b6098fa
No related branches found
No related tags found
6 merge requests
!57
Merge of develop into master
,
!56
Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...
,
!39
Update admin system
,
!32
Homologa
,
!31
Fix console error
,
!29
Training materials into fix console error
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Components/UserPageComponents/Cover.js
+13
-1
13 additions, 1 deletion
src/Components/UserPageComponents/Cover.js
with
13 additions
and
1 deletion
src/Components/UserPageComponents/Cover.js
+
13
−
1
View file @
8c40c6a4
...
@@ -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"
>
<
IconButton
style
=
{{
position
:
"
absolute
"
,
right
:
"
0
"
,
bottom
:
"
0
"
,
color
:
"
#fff
"
}}
color
=
"
primary
"
aria
-
label
=
"
upload picture
"
component
=
"
span
"
>
<
PhotoCamera
/>
<
/IconButton
>
<
/Tooltip>
:
<
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
"
,
righ
t
:
"
0
"
,
top
:
"
0
"
,
color
:
"
#fff
"
}}
color
=
"
primary
"
aria
-
label
=
"
upload picture
"
component
=
"
span
"
>
<
IconButton
style
=
{{
position
:
"
absolute
"
,
lef
t
:
"
0
"
,
top
:
"
0
"
,
color
:
"
#fff
"
}}
color
=
"
primary
"
aria
-
label
=
"
upload picture
"
component
=
"
span
"
>
<
PhotoCamera
/>
<
PhotoCamera
/>
<
/IconButton
>
<
/IconButton
>
<
/Tooltip
>
<
/Tooltip
>
}
<
/label
>
<
/label
>
<
/CoverContainer
>
<
/CoverContainer
>
<
/
>
<
/
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment