--
This commit is contained in:
parent
8fcc733093
commit
231adbe93f
123 changed files with 16683 additions and 62496 deletions
33
frontend/src/components/modules/NavBar.jsx
Normal file
33
frontend/src/components/modules/NavBar.jsx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { faSignOutAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import React from 'react';
|
||||
import { Nav, Navbar, NavItem } from 'react-bootstrap';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import NavLinkItem from './NavLinkItem';
|
||||
import store from '../../redux/store';
|
||||
import LogOut from '../../auth/logout';
|
||||
|
||||
export default () => (
|
||||
<Navbar expand="lg" collapseOnSelect bg="dark" variant="dark" fixed="top">
|
||||
<Navbar.Brand>Geolosys Configurator</Navbar.Brand>
|
||||
<Navbar.Toggle aria-controls="responsive-navbar-nav" />
|
||||
<Navbar.Collapse>
|
||||
<Nav className="mr-auto">
|
||||
<NavLinkItem name="Blog" dest="/" icon={faBook} />
|
||||
{store.getState().isAuthenticated && (
|
||||
<div>
|
||||
<NavLinkItem name="Your Configs" dest="/manage" icon={faEdit} />
|
||||
<NavItem style={{ cursor: 'pointer' }} onClick={LogOut}>
|
||||
<div className="nav-link nav-sign-out">
|
||||
<span>
|
||||
<FontAwesomeIcon icon={faSignOutAlt} />
|
||||
{' '}
|
||||
Sign Out
|
||||
</span>
|
||||
</div>
|
||||
</NavItem>
|
||||
</div>
|
||||
)}
|
||||
</Nav>
|
||||
</Navbar.Collapse>
|
||||
</Navbar>
|
||||
);
|
||||
18
frontend/src/components/modules/NavLinkItem.jsx
Normal file
18
frontend/src/components/modules/NavLinkItem.jsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import React from 'react';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import { NavItem } from 'react-bootstrap';
|
||||
|
||||
export default ({
|
||||
name, dest, icon,
|
||||
}) => (
|
||||
<NavItem>
|
||||
<NavLink exact className="nav-link" activeClassName="nav-link active" to={dest}>
|
||||
<span>
|
||||
{icon && (<FontAwesomeIcon icon={icon} />)}
|
||||
{' '}
|
||||
{name}
|
||||
</span>
|
||||
</NavLink>
|
||||
</NavItem>
|
||||
);
|
||||
21
frontend/src/components/modules/Notification.jsx
Normal file
21
frontend/src/components/modules/Notification.jsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import React from 'react';
|
||||
import { Modal } from 'react-bootstrap';
|
||||
|
||||
export default ({
|
||||
title, contents, show, onHide,
|
||||
}) => (
|
||||
<Modal
|
||||
show={show}
|
||||
onHide={onHide}
|
||||
>
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title className="text-center">
|
||||
{title}
|
||||
</Modal.Title>
|
||||
</Modal.Header>
|
||||
|
||||
<Modal.Body>
|
||||
{contents}
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
);
|
||||
Loading…
Reference in a new issue