Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frontend-MECRED
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
MECRED
Frontend-MECRED
Commits
eaa0cfbd
Commit
eaa0cfbd
authored
3 months ago
by
Guilherme Eduardo
Committed by
jsk22
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#288
: UPDATE change order icons sidebar
parent
1eb3f2cb
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/app/components/NavigationBar.js
+4
-4
4 additions, 4 deletions
src/app/components/NavigationBar.js
src/app/components/Overlay.js
+1
-1
1 addition, 1 deletion
src/app/components/Overlay.js
src/app/components/SideBar.js
+38
-21
38 additions, 21 deletions
src/app/components/SideBar.js
with
43 additions
and
26 deletions
src/app/components/NavigationBar.js
+
4
−
4
View file @
eaa0cfbd
...
@@ -53,12 +53,12 @@ export default function NavigationBar({ mobileSearch}) {
...
@@ -53,12 +53,12 @@ export default function NavigationBar({ mobileSearch}) {
const
navItems
=
[
const
navItems
=
[
{
label
:
"
Pesquisar
"
,
href
:
"
#
"
,
icon
:
SearchIcon
},
{
label
:
"
Pesquisar
"
,
href
:
"
#
"
,
icon
:
SearchIcon
},
{
label
:
"
Recursos
"
,
href
:
"
/busca?page=LearningObject
"
,
icon
:
SubjectIcon
},
{
label
:
"
Coleções
"
,
href
:
"
/busca?page=Collection
"
,
icon
:
CollectionsBookmarkIcon
},
{
label
:
"
Publicar
"
,
href
:
"
/publicar
"
,
icon
:
FileUploadIcon
},
{
label
:
"
MEC
"
,
href
:
"
/busca?page=MEC
"
,
icon
:
VerifiedIcon
},
{
label
:
"
Perfil
"
,
href
:
"
/perfil
"
,
icon
:
Person
},
{
label
:
"
Perfil
"
,
href
:
"
/perfil
"
,
icon
:
Person
},
{
label
:
"
Coleções
"
,
href
:
"
/busca?page=Collection
"
,
icon
:
CollectionsBookmarkIcon
},
{
label
:
"
Recursos
"
,
href
:
"
/busca?page=LearningObject
"
,
icon
:
SubjectIcon
},
{
label
:
"
Sobre
"
,
href
:
"
/sobre
"
,
icon
:
HelpIcon
},
{
label
:
"
Sobre
"
,
href
:
"
/sobre
"
,
icon
:
HelpIcon
},
{
label
:
"
MEC
"
,
href
:
"
/busca?page=MEC
"
,
icon
:
VerifiedIcon
},
{
label
:
"
Publicar
"
,
href
:
"
/publicar
"
,
icon
:
FileUploadIcon
},
{
label
:
"
Contato
"
,
href
:
"
/contato
"
,
icon
:
EmailRoundedIcon
},
{
label
:
"
Contato
"
,
href
:
"
/contato
"
,
icon
:
EmailRoundedIcon
},
{
label
:
"
Sair
"
,
href
:
""
,
icon
:
LogoutRounded
},
{
label
:
"
Sair
"
,
href
:
""
,
icon
:
LogoutRounded
},
]
]
...
...
This diff is collapsed.
Click to expand it.
src/app/components/Overlay.js
+
1
−
1
View file @
eaa0cfbd
...
@@ -89,7 +89,7 @@ export default function Overlay({
...
@@ -89,7 +89,7 @@ export default function Overlay({
<
div
<
div
className
=
"
grid w-full pt-[160px] h-dvh text-base 2xl:grid-cols-[150px_minmax(0,1fr)_500px] xl:grid-cols-[150px_minmax(0,1fr)_400px] grid-cols-[150px_minmax(0,1fr)]
"
className
=
"
grid w-full pt-[160px] h-dvh text-base 2xl:grid-cols-[150px_minmax(0,1fr)_500px] xl:grid-cols-[150px_minmax(0,1fr)_400px] grid-cols-[150px_minmax(0,1fr)]
"
>
>
<
div
className
=
"
min-h-0
"
>
<
div
className
=
"
min-h-0
overflow-y-auto
"
>
<
SideBar
setFilterState
=
{
setFilterState
}
filterState
=
{
filterState
}
/
>
<
SideBar
setFilterState
=
{
setFilterState
}
filterState
=
{
filterState
}
/
>
<
/div
>
<
/div
>
{
children
}
{
children
}
...
...
This diff is collapsed.
Click to expand it.
src/app/components/SideBar.js
+
38
−
21
View file @
eaa0cfbd
...
@@ -12,8 +12,10 @@ import { Person } from "@mui/icons-material";
...
@@ -12,8 +12,10 @@ import { Person } from "@mui/icons-material";
import
FileUploadIcon
from
'
@mui/icons-material/FileUpload
'
;
import
FileUploadIcon
from
'
@mui/icons-material/FileUpload
'
;
import
{
isLoggedIn
,
useLoggedIn
,
userData
}
from
"
../handlers/loginHandler
"
;
import
{
isLoggedIn
,
useLoggedIn
,
userData
}
from
"
../handlers/loginHandler
"
;
import
NeedLoginModal
from
"
./needLoginModal
"
;
import
NeedLoginModal
from
"
./needLoginModal
"
;
import
LogoutRounded
from
'
@mui/icons-material/LogoutRounded
'
;
import
{
import
{
getStoredValue
,
getStoredValue
,
removeFromLocalStorage
,
}
from
"
../handlers/localStorageHandler
"
;
}
from
"
../handlers/localStorageHandler
"
;
/**
/**
...
@@ -24,18 +26,11 @@ import {
...
@@ -24,18 +26,11 @@ import {
const
acessoRapido
=
[
const
acessoRapido
=
[
{
{
title
:
"
Publicar
"
,
title
:
"
Meu perfil
"
,
icon
:
FileUploadIcon
,
icon
:
Person
,
href
:
"
/publicar
"
,
href
:
"
/perfil
"
,
id
:
"
Publicar Recurso
"
,
id
:
"
Perfil
"
,
},
{
title
:
"
MEC
"
,
icon
:
VerifiedIcon
,
href
:
"
MEC
"
,
id
:
"
MEC
"
,
},
},
{
{
title
:
"
Coleções
"
,
title
:
"
Coleções
"
,
icon
:
CollectionsBookmarkIcon
,
icon
:
CollectionsBookmarkIcon
,
...
@@ -48,23 +43,35 @@ const acessoRapido = [
...
@@ -48,23 +43,35 @@ const acessoRapido = [
href
:
"
LearningObject
"
,
href
:
"
LearningObject
"
,
id
:
"
Recursos
"
,
id
:
"
Recursos
"
,
},
},
{
title
:
"
Perfil
"
,
icon
:
Person
,
href
:
"
/perfil
"
,
id
:
"
Perfil
"
,
},
{
{
title
:
"
Sobre
"
,
title
:
"
Sobre
"
,
icon
:
HelpIcon
,
icon
:
HelpIcon
,
href
:
"
/sobre
"
,
href
:
"
/sobre
"
,
id
:
"
Sobre
"
,
id
:
"
Sobre
"
,
},
},
{
title
:
"
MEC
"
,
icon
:
VerifiedIcon
,
href
:
"
MEC
"
,
id
:
"
MEC
"
,
},
{
title
:
"
Publicar
"
,
icon
:
FileUploadIcon
,
href
:
"
/publicar
"
,
id
:
"
Publicar Recurso
"
,
},
{
{
title
:
"
Contato
"
,
title
:
"
Contato
"
,
icon
:
EmailRoundedIcon
,
icon
:
EmailRoundedIcon
,
href
:
"
/contato
"
,
href
:
"
/contato
"
,
id
:
"
Contato
"
,
id
:
"
Contato
"
,
},
{
title
:
"
Sair
"
,
icon
:
LogoutRounded
,
href
:
"
/sobre
"
,
id
:
"
sobre
"
,
}
}
];
];
...
@@ -111,6 +118,16 @@ export default function SideBar({ setFilterState, filterState }) {
...
@@ -111,6 +118,16 @@ export default function SideBar({ setFilterState, filterState }) {
const
[
needLoginOpen
,
setNeedLoginOpen
]
=
useState
(
false
);
const
[
needLoginOpen
,
setNeedLoginOpen
]
=
useState
(
false
);
const
handleLogout
=
()
=>
{
removeFromLocalStorage
(
"
access_token
"
);
removeFromLocalStorage
(
"
user_data
"
);
removeFromLocalStorage
(
"
uid
"
);
removeFromLocalStorage
(
"
expiry
"
);
removeFromLocalStorage
(
"
token-type
"
);
removeFromLocalStorage
(
"
client
"
);
window
.
location
.
reload
();
}
const
handleOpenLogin
=
()
=>
{
const
handleOpenLogin
=
()
=>
{
if
(
!
loggedIn
)
{
if
(
!
loggedIn
)
{
...
@@ -133,9 +150,9 @@ export default function SideBar({ setFilterState, filterState }) {
...
@@ -133,9 +150,9 @@ export default function SideBar({ setFilterState, filterState }) {
<
NeedLoginModal
open
=
{
needLoginOpen
}
setOpen
=
{
setNeedLoginOpen
}
/
>
<
NeedLoginModal
open
=
{
needLoginOpen
}
setOpen
=
{
setNeedLoginOpen
}
/
>
<
div
className
=
"
max-md:hidden min-h-0 overflow-y-auto flex flex-col text-darkGray-HC-white-underline font-light
"
>
<
div
className
=
"
max-md:hidden min-h-0 overflow-y-auto flex flex-col text-darkGray-HC-white-underline font-light
"
>
<
div
className
=
"
flex flex-col justify-start items-center gap-3 w-full
"
>
<
div
className
=
"
flex flex-col justify-start items-center gap-3 w-full
mb-5
"
>
{
acessoRapido
{
acessoRapido
.
filter
(
item
=>
isLoggedIn
()
||
item
.
href
!==
"
/perfil
"
)
.
filter
(
item
=>
isLoggedIn
()
||
(
item
.
title
!==
"
Sair
"
&&
item
.
href
!==
"
/perfil
"
)
)
.
map
((
item
,
index
)
=>
{
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
Link
<
Link
...
@@ -144,7 +161,7 @@ export default function SideBar({ setFilterState, filterState }) {
...
@@ -144,7 +161,7 @@ export default function SideBar({ setFilterState, filterState }) {
key
=
{
index
}
key
=
{
index
}
alt
=
{
item
.
title
}
alt
=
{
item
.
title
}
title
=
{
item
.
title
}
title
=
{
item
.
title
}
className
=
{
`aspect-square cursor-pointer hover:bg-lightGray-HC-white hover:text-darkGray-HC-dark-underline focus:bg-lightGray-HC-white
text-center rounded-lg pt-2 w-[8
0
px]
className
=
{
`aspect-square cursor-pointer hover:bg-lightGray-HC-white hover:text-darkGray-HC-dark-underline focus:bg-lightGray-HC-white text-center rounded-lg pt-2 w-[8
8
px]
${(
page
===
item
.
href
)
||
(
pathname
.
startsWith
(
item
.
href
))
?
"
bg-lightGray-HC-white text-darkGray-HC-dark-underline font-bold
"
:
""
}
${(
page
===
item
.
href
)
||
(
pathname
.
startsWith
(
item
.
href
))
?
"
bg-lightGray-HC-white text-darkGray-HC-dark-underline font-bold
"
:
""
}
`
}
`
}
>
>
...
...
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