Merge pull request #75 from nikolabjelo/master
Authentificated only links and adapting heights of text in banner
This commit is contained in:
3 files changed
+18
-12
No files matched your search
@@ -334,19 +334,20 @@ header.menu{
|
||||
height: 100vh;
|
||||
.caption{
|
||||
display: block;
|
||||
top: 42%;
|
||||
}
|
||||
}
|
||||
&.medium{
|
||||
height: 50vh;
|
||||
.caption{
|
||||
display: block;
|
||||
top: 46%;
|
||||
}
|
||||
}
|
||||
.caption{
|
||||
display: none;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translateY(-100%);
|
||||
font-family: Saira;
|
||||
.title{
|
||||
color: white;
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
GamepadRounded,
|
||||
AccessibilityNew,
|
||||
LibraryAdd,
|
||||
Home,
|
||||
ImportContacts,
|
||||
BugReport,
|
||||
People
|
||||
@@ -13,11 +12,10 @@ const usersMenus = {
|
||||
title: 'Users',
|
||||
to: '/users',
|
||||
submenus: [
|
||||
{ title: 'Home', to: '/users/', icon: Home },
|
||||
{ title: 'Directory', to: '/users/browse', icon: ImportContacts },
|
||||
{ title: 'Search', to: '/users/search', icon: Search },
|
||||
{ title: 'Report', to: 'https://github.com/AdvancedAlgos/UsersModule/issues/new', icon: BugReport, externalLink: true },
|
||||
{ title: 'Your Profile', to: '/users/user', icon: People }
|
||||
{ title: 'Your Profile', to: '/users/user', icon: People, authenticated: true }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -26,9 +24,9 @@ const teamsMenus = {
|
||||
to: '/teams',
|
||||
submenus: [
|
||||
{ title: 'All teams', to: '/teams', icon: Search },
|
||||
{ title: 'Your teams', to: '/teams/manage-teams', icon: GamepadRounded },
|
||||
{ title: 'Team members', to: '/teams/team-members', icon: GamepadRounded },
|
||||
{ title: 'Financial beings', to: '/teams/financial-beings', icon: GamepadRounded },
|
||||
{ title: 'Your teams', to: '/teams/manage-teams', icon: GamepadRounded, authenticated: true },
|
||||
{ title: 'Team members', to: '/teams/team-members', icon: GamepadRounded, authenticated: true },
|
||||
{ title: 'Financial beings', to: '/teams/financial-beings', icon: GamepadRounded, authenticated: true },
|
||||
{ title: 'Report', to: 'https://github.com/AdvancedAlgos/TeamsModule/issues/new', icon: LibraryAdd, externalLink: true }
|
||||
]
|
||||
}
|
||||
@@ -38,9 +36,9 @@ const eventsMenus = {
|
||||
to: '/events',
|
||||
submenus: [
|
||||
{ title: 'All events', to: '/events', icon: Search },
|
||||
{ title: 'Your events', to: '/events/my', icon: GamepadRounded },
|
||||
{ title: 'Your hosted events', to: '/events/host', icon: AccessibilityNew },
|
||||
{ title: 'Host an event', to: '/events/create', icon: LibraryAdd },
|
||||
{ title: 'Your events', to: '/events/my', icon: GamepadRounded, authenticated: true },
|
||||
{ title: 'Your hosted events', to: '/events/host', icon: AccessibilityNew, authenticated: true },
|
||||
{ title: 'Host an event', to: '/events/create', icon: LibraryAdd, authenticated: true },
|
||||
{ title: 'Report', to: 'https://github.com/AdvancedAlgos/UsersModule/issues/new', icon: LibraryAdd, externalLink: true }
|
||||
]
|
||||
}
|
||||
@@ -48,6 +46,7 @@ const eventsMenus = {
|
||||
const keyvaultMenus = {
|
||||
title: 'Key Vault',
|
||||
to: '/key-vault',
|
||||
authenticated: true,
|
||||
submenus: [
|
||||
{ title: 'Manage keys', to: '/key-vault/browse', icon: Search },
|
||||
{ title: 'Add key', to: '/key-vault/addKey', icon: GamepadRounded },
|
||||
|
||||
@@ -75,7 +75,10 @@ class Header extends Component {
|
||||
}
|
||||
let user = JSON.parse(this.state.user)
|
||||
|
||||
const menus = allMenus.map(({ to, title, submenus }, index) => {
|
||||
const menus = allMenus.map(({ to, title, submenus, authenticated }, index) => {
|
||||
if (authenticated) {
|
||||
return
|
||||
}
|
||||
return (
|
||||
<li
|
||||
onMouseEnter={() => this.toggleMenuOpen(index, bigScreen)}
|
||||
@@ -86,7 +89,10 @@ class Header extends Component {
|
||||
<Link to={to} onClick={() => this.toggleMenuOpen(index, true)}> {title} </Link>
|
||||
<ul className='subMenu'>
|
||||
{
|
||||
submenus.map(({ icon: Icon, to: subTo, title: subTitle, externalLink }, subindex) => {
|
||||
submenus.map(({ icon: Icon, to: subTo, title: subTitle, externalLink, authenticated: subAuthenticated }, subindex) => {
|
||||
if (subAuthenticated) {
|
||||
return
|
||||
}
|
||||
if (externalLink) {
|
||||
return (
|
||||
<li key={subindex}><a href={subTo}> <Icon /> {subTitle} </a></li>
|
||||
|
||||
Reference in new issue
Block a user