Merge branch 'master' of https://github.com/AdvancedAlgos/MasterApp into feature/client-sendgrid

This commit is contained in:
Barry Low committed 2018-11-09 11:39:56 -08:00
commit 661e6637be
11 files changed
+295 -120

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@
sessionToken: '',
executingAt: 'Master App',
visible: false,
topMargin: 180,
topMargin: 130,
urlPrefix: 'https://develop.advancedalgos.net/' , /* 'http://localhost:1337/' */ /* 'https://develop.advancedalgos.net/' */
graphQL: {
masterAppApiUrl: 'https://app-api.advancedalgos.net/graphql'
+18 -16
View File
@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@advancedalgos/events-client": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/@advancedalgos/events-client/-/events-client-0.0.2.tgz",
"integrity": "sha512-VtM158wFdArNrjYGMnB6XCn9Bo0ziBGU3Qy1+1w81zCDLeF+bGJdBtUnGPjz7nMcZnJDkCjryst/7RIM6NxPgQ==",
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/@advancedalgos/events-client/-/events-client-0.0.4.tgz",
"integrity": "sha512-8kwr6IB7AaoZzhLzeGZFTLowTxetOWOwSX4vb0YJQZBA1FJ/CQSU7ARD3WPdyTQAWOOSrquddC6SzLgg11MuiA==",
"dev": true,
"requires": {
"@material-ui/core": "^3.2.0",
@@ -26,9 +26,9 @@
}
},
"@advancedalgos/key-vault-client": {
"version": "0.0.20",
"resolved": "https://registry.npmjs.org/@advancedalgos/key-vault-client/-/key-vault-client-0.0.20.tgz",
"integrity": "sha512-YCzmzmEK2jOSDl0o9bT+2vYefbq1gXSlQDnQR5ZBVxWoachK+02yLDXRD5LNdu77962aR7auX+pReJ9wy7BT5A==",
"version": "0.0.21",
"resolved": "https://registry.npmjs.org/@advancedalgos/key-vault-client/-/key-vault-client-0.0.21.tgz",
"integrity": "sha512-qLuWI/mcHO8UuebUtHQM4U0uTWOcpIpmo7nhNzue6/al0hHH0NYziqmPET5N0dKjtImX9pTr3uj802GyMfAI0A==",
"dev": true,
"requires": {
"@material-ui/core": "^3.2.2",
@@ -37,16 +37,18 @@
"classnames": "^2.2.6",
"graphql": "^14.0.2",
"graphql-tag": "^2.10.0",
"react": "^16.5.2",
"luxon": "^1.4.4",
"material-ui-pickers": "^1.0.1",
"react": "^16.6.1",
"react-apollo": "^2.2.4",
"react-dom": "^16.5.2",
"react-dom": "^16.6.1",
"react-router-dom": "^4.3.1"
}
},
"@advancedalgos/teams-client": {
"version": "0.0.25",
"resolved": "https://registry.npmjs.org/@advancedalgos/teams-client/-/teams-client-0.0.25.tgz",
"integrity": "sha512-hO4eQTe1hpLO9PsI2QrUu80ouQCGbs4uz2xhlHSMtmhcLcBMQaH2QBYOAJI6lcalF8GvdlyhDrlbjr1T/H5I1w==",
"version": "0.0.26",
"resolved": "https://registry.npmjs.org/@advancedalgos/teams-client/-/teams-client-0.0.26.tgz",
"integrity": "sha512-7WgJ3OFDZql2h7A1AlAGq7PevfhNs9KL2hnd1oBNyjKSezsJ4j6JUIQt/GTl+0W19S22EHUjUhUVpnnCi8g0mg==",
"dev": true,
"requires": {
"@advancedalgos/web-components": "0.0.13",
@@ -79,9 +81,9 @@
}
},
"@advancedalgos/users-client": {
"version": "0.0.18",
"resolved": "https://registry.npmjs.org/@advancedalgos/users-client/-/users-client-0.0.18.tgz",
"integrity": "sha512-uxHVl8hOyMeAbKdyP+Jt7BmX4Gw/gE4Wm2lWvgxQxLjf6lZxwMfrQPaGZgfv/qxEkbaK0rkJzCMVT71LRyMhFg==",
"version": "0.0.19",
"resolved": "https://registry.npmjs.org/@advancedalgos/users-client/-/users-client-0.0.19.tgz",
"integrity": "sha512-quYzZvQVIN4UFQFPIvt21Dko7mRdRpRbQXxRdvithoIB5ej/NNamwJAIZJ0ILXRkEQiuEfAi/f4DEmAKOShVGA==",
"dev": true,
"requires": {
"@material-ui/core": "^3.2.0",
@@ -90,9 +92,9 @@
"graphql": "^14.0.2",
"graphql-tag": "^2.10.0",
"prop-types": "^15.6.2",
"react": "^16.5.2",
"react": "^16.6.1",
"react-apollo": "^2.2.4",
"react-dom": "^16.5.2",
"react-dom": "^16.6.1",
"react-router-dom": "^4.3.1",
"react-scripts": "^2.0.4",
"recompose": "^0.30.0"
+4 -4
View File
@@ -21,10 +21,10 @@
},
"homepage": "https://github.com/Algoteers/MasterApp#readme",
"devDependencies": {
"@advancedalgos/events-client": "0.0.2",
"@advancedalgos/key-vault-client": "^0.0.20",
"@advancedalgos/teams-client": "0.0.25",
"@advancedalgos/users-client": "^0.0.18",
"@advancedalgos/events-client": "^0.0.4",
"@advancedalgos/key-vault-client": "^0.0.21",
"@advancedalgos/teams-client": "^0.0.26",
"@advancedalgos/users-client": "^0.0.19",
"@advancedalgos/web-components": "0.0.13",
"@babel/core": "^7.1.2",
"@babel/plugin-proposal-class-properties": "^7.1.0",
@@ -1,24 +1,3 @@
body{
overflow-y:scroll;
&::-webkit-scrollbar-track {
border: 1px solid #000;
padding: 2px 0;
background-color: #404040;
}
&::-webkit-scrollbar {
width: 10px;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #737272;
border: 1px solid #000;
}
}
$break-big: 1280px;
$break-middle: 992px;
$break-small: 768px;
@@ -40,6 +19,52 @@ $transition-time: 0.3s;
$advanced-algos-red: rgb(245,88,88);
@function strip-unit($value) {
@return $value / ($value * 0 + 1);
}
@mixin fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size) {
$u1: unit($min-vw);
$u2: unit($max-vw);
$u3: unit($min-font-size);
$u4: unit($max-font-size);
@if $u1 == $u2 and $u1 == $u3 and $u1 == $u4 {
& {
font-size: $min-font-size;
@media screen and (min-width: $min-vw) {
font-size: calc(#{$min-font-size} + #{strip-unit($max-font-size - $min-font-size)} * ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)}));
}
@media screen and (min-width: $max-vw) {
font-size: $max-font-size;
}
}
}
}
body{
overflow-y:scroll;
&::-webkit-scrollbar-track {
border: 1px solid #000;
padding: 2px 0;
background-color: #404040;
}
&::-webkit-scrollbar {
width: 10px;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #737272;
border: 1px solid #000;
}
}
header.menu{
transition: $transition-time;
&.notOnTop{
@@ -177,6 +202,19 @@ header.menu{
min-width: 240px;
min-height: 50px;
border-bottom: 1px solid white;
&.hasChildren{
&:after{
content: '';
float: right;
border: solid white;
border-width: 0 2px 2px 0;
padding: 3px;
margin-top: 18px;
margin-right: 7px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
}
&:last-child{
border-bottom: 0;
}
@@ -191,6 +229,9 @@ header.menu{
padding: 0 40px 0 30px;
text-decoration: none;
color: white;
&:hover{
color: $advanced-algos-red;
}
}
ul.subMenu{
display: none;
@@ -225,8 +266,26 @@ header.menu{
padding-bottom: ( $height-large-device - $text-height ) / 2;
padding-right: 21px;
padding-left: 21px;
&.hasChildren{
&:after{
content: '';
border: solid white;
border-width: 0 2px 2px 0;
display: inline-block;
padding: 3px;
margin-bottom: 2px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
>a{
margin-right:6px;
}
}
a{
color: white;
&:hover{
color: $advanced-algos-red;
}
text-decoration: none;
&.selected{
color: $advanced-algos-red;
@@ -265,3 +324,102 @@ header.menu{
}
}
}
.bannerTopBar{
background-position: center center;
background-image: url(https://advancedalgos.net/img/photos/teams.jpg);
width: 100%;
height: 220px;
&.big{
height: 100vh;
.caption{
display: block;
top: 42%;
}
}
&.medium{
height: 50vh;
.caption{
display: block;
top: 46%;
}
}
.caption{
display: none;
position: relative;
top: 50%;
font-family: Saira;
.title{
color: white;
font-size: 64px;
line-height: 78px;
font-weight: 100;
@include fluid-type($break-extra-small, $break-big, 26px, 64px);
}
.text{
color: white;
line-height: 30px;
font-weight: 600;
padding: 20px 0 0.5em 0;
@include fluid-type($break-extra-small, $break-big, 18px, 20px);
}
}
}
.homePage{
padding-top: 70px;
padding-bottom: 70px;
margin-right: auto;
margin-left: auto;
@media screen and (min-width: $break-small) {
width: 750px;
}
@media screen and (min-width: $break-middle) {
width: 970px;
}
@media screen and (min-width: 1200px) {
width: 1170px;
}
.title{
padding: 0 0 10px 0;
font-size: 45px;
line-height: 55px;
padding: 40px 0 0.5em 0;
font-weight: 100;
}
.subtitle{
padding-bottom: 5px;
font-size: 20px;
line-height: 19px;
font-weight: 100;
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 1em;
}
.column{
vertical-align: top;
display: inline-block;
width: 100%;
padding: 10px;
@media screen and (min-width: $break-small) {
width: 50%;
}
p{
font-size: 16px;
line-height: 25px;
margin-bottom: 0.75em;
margin-top: 0.75em;
font-size: 16px;
font-weight: 300;
color: #5a6266;
text-size-adjust: 100%;
a{
text-decoration: none;
transition: all 0.3s ease-in-out 0s;
color: #CC5835;
}
}
}
}
+18
View File
@@ -0,0 +1,18 @@
import React from 'react'
import Typography from '@material-ui/core/Typography'
const BannerTopBar = ({
size,
backgroundUrl,
title,
text
}) => (
<div className={`bannerTopBar ${size}`} style={backgroundUrl ? { backgroundImage: `url(${backgroundUrl})` } : {}}>
<div className='caption'>
<Typography className='title' variant='h1' align='center'>{title}</Typography>
<Typography className='text' variant='h2' align='center'>{text}</Typography>
</div>
</div>
)
export default BannerTopBar
+7 -1
View File
@@ -2,6 +2,7 @@ import React, { Component } from 'react'
import { withStyles } from '@material-ui/core/styles'
import { connect } from 'react-redux'
import BannerTopBar from '../BannerTopBar'
const styles = theme => ({
'@global': {
@@ -39,7 +40,12 @@ class Charts extends Component {
render () {
return (
<React.Fragment />
<BannerTopBar
size='medium'
title=''
text='Charts loading...'
backgroundUrl='https://aacorporatesitedevelop.azurewebsites.net/img/photos/superalgos-platform.jpg'
/>
)
}
}
+31 -49
View File
@@ -1,63 +1,45 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import CssBaseline from '@material-ui/core/CssBaseline'
import Typography from '@material-ui/core/Typography'
import { withStyles } from '@material-ui/core/styles'
const styles = theme => ({
'@global': {
body: {
backgroundColor: theme.palette.common.white
}
},
layout: {
width: '100%',
height: '100%'
},
heroContent: {
textColor: theme.palette.common.white,
maxWidth: 600,
height: 800,
margin: '0 auto',
padding: `${theme.spacing.unit * 8}px 0 ${theme.spacing.unit * 6}px`
}
})
import BannerTopBar from '../BannerTopBar'
import { Typography } from '@material-ui/core'
class Home extends Component {
render () {
const { classes } = this.props
return (
<React.Fragment>
<CssBaseline />
<main className={classes.layout}>
<div className={classes.heroContent}>
<Typography
variant='h2'
align='center'
color='textPrimary'
gutterBottom
>
Collaborate. Innovate. Evolve.
<BannerTopBar
size='big'
title='Advanced Algos Platform'
text='Enabling the evolutionary race towards the emergence of superalgos'
backgroundUrl='https://aacorporatesitedevelop.azurewebsites.net/img/photos/superalgos-platform.jpg'
/>
<div className='homePage'>
<Typography variant='h1' align='center' className='title'>Welcome to the Superalgos Platform!</Typography>
<Typography variant='h2' align='center' className='subtitle'>CO-CREATE >> COMPETE >> EVOLVE</Typography>
<div className='column'>
<Typography align='justify'>
Before you begin, please be aware <strong>this is a development environment in pre-alpha stage</strong>.
The features available as of today are limited but already functional.
However, you may encounter occasional instability and errors.
</Typography>
<Typography
variant='h6'
align='center'
color='textSecondary'
component='h3'
>
Welcome to the Advanced Algos Platform
<Typography align='justify'>
The Superalgos Platform is the place is which we meet to collaborate in the quest to make trading algorithms evolve.
You will be able to register, create or join a team, fork a functional trading bot and eventually put it to compete with other people's forks.
</Typography>
</div>
</main>
<div className='column'>
<Typography align='justify'>
Feel free to explore the menu in the top-right corner or visit the <a href='https://www.advancedalgos.net/documentation-quick-start.shtml' target='_blank'>Quick Start Guide</a>.
Reporting of bugs at the corresponding <a href='https://github.com/AdvancedAlgos' target='_blank' rel='nofollow'>Advanced Algos Github repository</a> is highly appreciated.
</Typography>
<Typography align='justify'>
Get in touch with the rest of the community and get answers to your questions in our <a href='https://t.me/advancedalgoscommunity' target='_blank' rel='nofollow'>Telegram Group</a>.
Have fun!
</Typography>
</div>
</div>
</React.Fragment>
)
}
}
Home.propTypes = {
classes: PropTypes.object.isRequired
}
export default withStyles(styles)(Home)
export default Home
+1
View File
@@ -43,6 +43,7 @@ class Footer extends Component {
<Typography variant='subtitle1' className={classes.textLight}>
<Link to='legal-privacy-statement.shtml' className={classes.linkLight}>Privacy Statement</Link> | <a href='legal-terms-of-service.shtml' className={classes.linkLight}>Terms of Service</a>
</Typography>
<Typography variant='body2' className={classNames(classes.textLight, classes.copyright)} gutterBottom>&copy; Advanced Algos, Ltd. 2018 | All Rights Reserved.</Typography>
</Grid>
</Grid>
<Grid item xs={12} sm={1} md={1} />
+3
View File
@@ -10,6 +10,9 @@ const styles = theme => ({
textSuccess: {
color: lightGreen[400]
},
copyright: {
paddingTop: theme.spacing.unit * 3
},
linkLight: {
color: theme.palette.secondary.main,
textDecoration: 'none'
+19 -16
View File
@@ -3,21 +3,23 @@ import {
GamepadRounded,
AccessibilityNew,
LibraryAdd,
Home,
ImportContacts,
BugReport,
People
People,
Group,
Adb,
VpnKey,
AddCircleOutline
} from '@material-ui/icons'
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: '/report/users', icon: BugReport },
{ title: 'Your Profile', to: '/users/user', icon: People }
{ title: 'Report', to: 'https://github.com/AdvancedAlgos/UsersModule/issues/new', icon: BugReport, externalLink: true },
{ title: 'Your Profile', to: '/users/user', icon: People, authenticated: true }
]
}
@@ -26,10 +28,10 @@ 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: 'Report', to: '/report/teams', icon: LibraryAdd }
{ title: 'Your teams', to: '/teams/manage-teams', icon: Group, authenticated: true },
{ title: 'Team members', to: '/teams/team-members', icon: People, authenticated: true },
{ title: 'Financial beings', to: '/teams/financial-beings', icon: Adb, authenticated: true },
{ title: 'Report', to: 'https://github.com/AdvancedAlgos/TeamsModule/issues/new', icon: BugReport, externalLink: true }
]
}
@@ -38,20 +40,21 @@ 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: 'Report', to: '/report/events', 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: BugReport, externalLink: true }
]
}
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 },
{ title: 'Report', to: '/report/key-vault', icon: LibraryAdd }
{ title: 'Manage keys', to: '/key-vault/browse', icon: VpnKey },
{ title: 'Add key', to: '/key-vault/addKey', icon: AddCircleOutline },
{ title: 'Report', to: 'https://github.com/AdvancedAlgos/KeyVaultModule/issues/new', icon: BugReport, externalLink: true }
]
}
+14 -12
View File
@@ -4,12 +4,6 @@ import { Link } from 'react-router-dom'
import jwtDecode from 'jwt-decode'
import withWidth from '@material-ui/core/withWidth'
// icons
import ExitIcon from '@material-ui/icons/ExitToApp'
// styles
import './styles.scss'
// components
import { LoggedIn } from './LoggedIn'
@@ -81,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 && !(this.state.user !== undefined && this.state.user !== null)) {
return
}
return (
<li
onMouseEnter={() => this.toggleMenuOpen(index, bigScreen)}
@@ -92,7 +89,15 @@ 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 }, subindex) => {
submenus.map(({ icon: Icon, to: subTo, title: subTitle, externalLink, authenticated: subAuthenticated }, subindex) => {
if (subAuthenticated && !(this.state.user !== undefined && this.state.user !== null)) {
return
}
if (externalLink) {
return (
<li key={subindex}><a href={subTo}> <Icon /> {subTitle} </a></li>
)
}
return (
<li key={subindex}><Link to={subTo} onClick={() => this.closeAll(index)}> <Icon /> {subTitle} </Link></li>
)
@@ -112,7 +117,7 @@ class Header extends Component {
<nav className={mobileOpen ? 'links openedMobile' : 'links'}>
<ul className='primaryMenu'>
<li className='primaryLink'>
<Link to='/'> Charts </Link>
<Link to='/charts'> Charts </Link>
</li>
{menus}
<li className='primaryLink'>
@@ -134,9 +139,6 @@ class Header extends Component {
<a href='#' onClick={() => auth.login()}> Login / Sign Up </a>
</li>
)}
<li className='primaryLink'>
<a href='https://www.advancedalgos.net'> <ExitIcon /> </a>
</li>
</ul>
</nav>
</div>