Replaced material design with Antd.
This commit is contained in:
@@ -4,8 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"license": "Copyright Snapt Software (C) 2019",
|
"license": "Copyright Snapt Software (C) 2019",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@material-ui/core": "^4.7.1",
|
"antd": "^3.26.0",
|
||||||
"@material-ui/icons": "^4.5.1",
|
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"node-sass": "^4.13.0",
|
"node-sass": "^4.13.0",
|
||||||
"react": "^16.12.0",
|
"react": "^16.12.0",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@import '~antd/dist/antd.css';
|
||||||
|
|
||||||
.App {
|
.App {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,175 +1,63 @@
|
|||||||
import React from "react";
|
import React, { Component } from "react";
|
||||||
|
import { Menu, Icon } from 'antd';
|
||||||
|
|
||||||
//Local Imports
|
const { SubMenu } = Menu;
|
||||||
import { default as SearchBox } from "../search-box/search-box.component";
|
class HeaderAppBar extends Component {
|
||||||
|
state = {
|
||||||
|
current: "alipay"
|
||||||
|
};
|
||||||
|
|
||||||
//Styles
|
handleClick = e => {
|
||||||
import AppBarStyles from "./header-app-bar.styles";
|
console.log("click ", e);
|
||||||
|
this.setState({
|
||||||
|
current: e.key
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
//Material UI Imports
|
render() {
|
||||||
import AppBar from "@material-ui/core/AppBar";
|
|
||||||
import Toolbar from "@material-ui/core/Toolbar";
|
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
|
||||||
//import Typography from "@material-ui/core/Typography";
|
|
||||||
import Badge from "@material-ui/core/Badge";
|
|
||||||
import MenuItem from "@material-ui/core/MenuItem";
|
|
||||||
import Menu from "@material-ui/core/Menu";
|
|
||||||
import MenuIcon from "@material-ui/icons/Menu";
|
|
||||||
import AccountCircle from "@material-ui/icons/AccountCircle";
|
|
||||||
import MailIcon from "@material-ui/icons/Mail";
|
|
||||||
import NotificationsIcon from "@material-ui/icons/Notifications";
|
|
||||||
import MoreIcon from "@material-ui/icons/MoreVert";
|
|
||||||
|
|
||||||
import SearchIcon from "@material-ui/icons/Search";
|
|
||||||
import InputBase from "@material-ui/core/InputBase";
|
|
||||||
|
|
||||||
|
|
||||||
export default function PrimarySearchAppBar() {
|
|
||||||
const classes = AppBarStyles();
|
|
||||||
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
||||||
const [mobileMoreAnchorEl, setMobileMoreAnchorEl] = React.useState(null);
|
|
||||||
|
|
||||||
const isMenuOpen = Boolean(anchorEl);
|
|
||||||
const isMobileMenuOpen = Boolean(mobileMoreAnchorEl);
|
|
||||||
|
|
||||||
const handleProfileMenuOpen = event => {
|
|
||||||
setAnchorEl(event.currentTarget);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleMobileMenuClose = () => {
|
|
||||||
setMobileMoreAnchorEl(null);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleMenuClose = () => {
|
|
||||||
setAnchorEl(null);
|
|
||||||
handleMobileMenuClose();
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleMobileMenuOpen = event => {
|
|
||||||
setMobileMoreAnchorEl(event.currentTarget);
|
|
||||||
};
|
|
||||||
|
|
||||||
const menuId = 'primary-search-account-menu';
|
|
||||||
const renderMenu = (
|
|
||||||
<Menu
|
|
||||||
anchorEl={anchorEl}
|
|
||||||
anchorOrigin={{ vertical: 'top', horizontal: 'right' }}
|
|
||||||
id={menuId}
|
|
||||||
keepMounted
|
|
||||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
|
||||||
open={isMenuOpen}
|
|
||||||
onClose={handleMenuClose}
|
|
||||||
>
|
|
||||||
<MenuItem onClick={handleMenuClose}>Profile</MenuItem>
|
|
||||||
<MenuItem onClick={handleMenuClose}>My account</MenuItem>
|
|
||||||
</Menu>
|
|
||||||
);
|
|
||||||
|
|
||||||
const mobileMenuId = 'primary-search-account-menu-mobile';
|
|
||||||
const renderMobileMenu = (
|
|
||||||
<Menu
|
|
||||||
anchorEl={mobileMoreAnchorEl}
|
|
||||||
anchorOrigin={{ vertical: 'top', horizontal: 'right' }}
|
|
||||||
id={mobileMenuId}
|
|
||||||
keepMounted
|
|
||||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
|
||||||
open={isMobileMenuOpen}
|
|
||||||
onClose={handleMobileMenuClose}
|
|
||||||
>
|
|
||||||
<MenuItem>
|
|
||||||
<IconButton aria-label="show 4 new mails" color="inherit">
|
|
||||||
<Badge badgeContent={4} color="secondary">
|
|
||||||
<MailIcon />
|
|
||||||
</Badge>
|
|
||||||
</IconButton>
|
|
||||||
<p>Messages</p>
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem>
|
|
||||||
<IconButton aria-label="show 11 new notifications" color="inherit">
|
|
||||||
<Badge badgeContent={11} color="secondary">
|
|
||||||
<NotificationsIcon />
|
|
||||||
</Badge>
|
|
||||||
</IconButton>
|
|
||||||
<p>Notifications</p>
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem onClick={handleProfileMenuOpen}>
|
|
||||||
<IconButton
|
|
||||||
aria-label="account of current user"
|
|
||||||
aria-controls="primary-search-account-menu"
|
|
||||||
aria-haspopup="true"
|
|
||||||
color="inherit"
|
|
||||||
>
|
|
||||||
<AccountCircle />
|
|
||||||
</IconButton>
|
|
||||||
<p>Profile</p>
|
|
||||||
</MenuItem>
|
|
||||||
</Menu>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.grow}>
|
<Menu
|
||||||
<AppBar position="static">
|
onClick={this.handleClick}
|
||||||
<Toolbar>
|
selectedKeys={[this.state.current]}
|
||||||
<IconButton
|
mode="horizontal"
|
||||||
edge="start"
|
>
|
||||||
className={classes.menuButton}
|
<Menu.Item key="mail">
|
||||||
color="inherit"
|
<Icon type="mail" />
|
||||||
aria-label="open drawer"
|
Navigation One
|
||||||
>
|
</Menu.Item>
|
||||||
<MenuIcon />
|
<Menu.Item key="app" disabled>
|
||||||
</IconButton>
|
<Icon type="appstore" />
|
||||||
<SearchBox />
|
Navigation Two
|
||||||
<div className={classes.search}>
|
</Menu.Item>
|
||||||
<div className={classes.searchIcon}>
|
<SubMenu
|
||||||
<SearchIcon />
|
title={
|
||||||
</div>
|
<span className="submenu-title-wrapper">
|
||||||
<InputBase
|
<Icon type="setting" />
|
||||||
placeholder="Search…"
|
Navigation Three - Submenu
|
||||||
classes={{
|
</span>
|
||||||
root: classes.inputRoot,
|
}
|
||||||
input: classes.inputInput,
|
>
|
||||||
}}
|
<Menu.ItemGroup title="Item 1">
|
||||||
inputProps={{ 'aria-label': 'search' }}
|
<Menu.Item key="setting:1">Option 1</Menu.Item>
|
||||||
/>
|
<Menu.Item key="setting:2">Option 2</Menu.Item>
|
||||||
</div>
|
</Menu.ItemGroup>
|
||||||
<div className={classes.grow} />
|
<Menu.ItemGroup title="Item 2">
|
||||||
<div className={classes.sectionDesktop}>
|
<Menu.Item key="setting:3">Option 3</Menu.Item>
|
||||||
<IconButton aria-label="show 4 new mails" color="inherit">
|
<Menu.Item key="setting:4">Option 4</Menu.Item>
|
||||||
<Badge badgeContent={4} color="secondary">
|
</Menu.ItemGroup>
|
||||||
<MailIcon />
|
</SubMenu>
|
||||||
</Badge>
|
<Menu.Item key="alipay">
|
||||||
</IconButton>
|
<a
|
||||||
<IconButton aria-label="show 17 new notifications" color="inherit">
|
href="https://ant.design"
|
||||||
<Badge badgeContent={17} color="secondary">
|
target="_blank"
|
||||||
<NotificationsIcon />
|
rel="noopener noreferrer"
|
||||||
</Badge>
|
>
|
||||||
</IconButton>
|
Navigation Four - Link
|
||||||
<IconButton
|
</a>
|
||||||
edge="end"
|
</Menu.Item>
|
||||||
aria-label="account of current user"
|
</Menu>
|
||||||
aria-controls={menuId}
|
|
||||||
aria-haspopup="true"
|
|
||||||
onClick={handleProfileMenuOpen}
|
|
||||||
color="inherit"
|
|
||||||
>
|
|
||||||
<AccountCircle />
|
|
||||||
</IconButton>
|
|
||||||
</div>
|
|
||||||
<div className={classes.sectionMobile}>
|
|
||||||
<IconButton
|
|
||||||
aria-label="show more"
|
|
||||||
aria-controls={mobileMenuId}
|
|
||||||
aria-haspopup="true"
|
|
||||||
onClick={handleMobileMenuOpen}
|
|
||||||
color="inherit"
|
|
||||||
>
|
|
||||||
<MoreIcon />
|
|
||||||
</IconButton>
|
|
||||||
</div>
|
|
||||||
</Toolbar>
|
|
||||||
</AppBar>
|
|
||||||
{renderMobileMenu}
|
|
||||||
{renderMenu}
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default HeaderAppBar;
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
import SearchBoxStyles from "./search-box.styles";
|
|
||||||
|
|
||||||
//Material UI Imports
|
|
||||||
import SearchIcon from "@material-ui/icons/Search";
|
|
||||||
import InputBase from "@material-ui/core/InputBase";
|
|
||||||
|
|
||||||
export default function SearchBox() {
|
|
||||||
const classes = SearchBoxStyles();
|
|
||||||
return (
|
|
||||||
<div className={classes.search}>
|
|
||||||
<div className={classes.searchIcon}>
|
|
||||||
<SearchIcon />
|
|
||||||
</div>
|
|
||||||
<InputBase
|
|
||||||
placeholder="Search…"
|
|
||||||
classes={{
|
|
||||||
root: classes.inputRoot,
|
|
||||||
input: classes.inputInput
|
|
||||||
}}
|
|
||||||
inputProps={{ "aria-label": "search" }}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
import { fade, makeStyles } from "@material-ui/core/styles";
|
|
||||||
export default makeStyles(theme => ({
|
|
||||||
search: {
|
|
||||||
position: "relative",
|
|
||||||
borderRadius: theme.shape.borderRadius,
|
|
||||||
backgroundColor: fade(theme.palette.common.white, 0.15),
|
|
||||||
"&:hover": {
|
|
||||||
backgroundColor: fade(theme.palette.common.white, 0.25)
|
|
||||||
},
|
|
||||||
marginRight: theme.spacing(2),
|
|
||||||
marginLeft: 0,
|
|
||||||
width: "100%",
|
|
||||||
[theme.breakpoints.up("sm")]: {
|
|
||||||
marginLeft: theme.spacing(3),
|
|
||||||
width: "auto"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
searchIcon: {
|
|
||||||
width: theme.spacing(7),
|
|
||||||
height: "100%",
|
|
||||||
position: "absolute",
|
|
||||||
pointerEvents: "none",
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center"
|
|
||||||
},
|
|
||||||
inputRoot: {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
inputInput: {
|
|
||||||
padding: theme.spacing(1, 1, 1, 7),
|
|
||||||
transition: theme.transitions.create("width"),
|
|
||||||
width: "100%",
|
|
||||||
[theme.breakpoints.up("md")]: {
|
|
||||||
width: 200
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
1040
client/yarn.lock
1040
client/yarn.lock
File diff suppressed because it is too large
Load Diff
30
server.pass.key
Normal file
30
server.pass.key
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
Proc-Type: 4,ENCRYPTED
|
||||||
|
DEK-Info: DES-EDE3-CBC,1A1ACAB16FB7DBFA
|
||||||
|
|
||||||
|
OUyvmLtCOnxYqlxwgp+ObGz1vI3BTxGgoI1S3+VkLOj9qzucmhD4MqDYDKRlEo0l
|
||||||
|
4NWTGoK3GDu+Fl5J/Ps4fvYrNOdmsS+1wCOLEt5GV18CYEdRx4C9zMIu1+XYsY0N
|
||||||
|
2Y3Jb66Mewe3vuL4LgVfiw4iI2f/k3mLGsurL88430DTdW8MpifGjFhdBOxMQ/xA
|
||||||
|
XrTtkxMquynL3LGELwzevAvv4ewFn8XMkKT4ZriuZwp58IMHg3xoAlMjxgtKzsy0
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9fshIWsyIhi9UYxMt0
|
||||||
|
wa471bxWGnZgnAXTgrVUjjPjzsU9arY9pIeRR5xM0hSBAbPyemRhkIl+jZ/xKArd
|
||||||
|
TnFXePQPuF/1Grh8LzjpipgDCs5/zwguWBzB+KmOKycVoTYfG66CWtVFTyhZDWZW
|
||||||
|
cBiBzUT5VIvPBQs6b0Mbx5R2WyIsIAZzWUHLiO7lFctUbRxTgVhgZuNJjaOI5IYi
|
||||||
|
1wCfACUOE2uBjkzxI+DHX0lywMmuy8vK4jsXVBxUdjbJouIfh/NBvVUFR0/st7G7
|
||||||
|
1qjo0ys1WBTfKFX0nGs+6zSxrMJMVxusc6Vt/sqKeLRZH3PkAZjUf8ABc0aIO6Lz
|
||||||
|
I3714iwiObVqS2xeZamzB/9IlyEmlkrFXF4E2YhWmKxN168merd1KybylTxqMs+l
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
Reference in New Issue
Block a user