mirror of https://github.com/embarklabs/embark.git
Adding home container
This commit is contained in:
parent
83c56b6740
commit
5039d8b414
|
@ -0,0 +1,27 @@
|
|||
import React from 'react';
|
||||
import {Grid, Card} from 'tabler-react';
|
||||
|
||||
const Console = () => (
|
||||
<Grid.Row cards>
|
||||
<Grid.Col>
|
||||
<Card>
|
||||
<Card.Header>
|
||||
<Card.Title>Console</Card.Title>
|
||||
</Card.Header>
|
||||
<Card.Body>
|
||||
<div className="log">
|
||||
<p>Welcome!</p>
|
||||
</div>
|
||||
<div className="command-line">
|
||||
<div className="form-group">
|
||||
<input type="text" className="form-control" name="example-text-input"
|
||||
placeholder="type a command (e.g help)" />
|
||||
</div>
|
||||
</div>
|
||||
</Card.Body>
|
||||
</Card>
|
||||
</Grid.Col>
|
||||
</Grid.Row>
|
||||
);
|
||||
|
||||
export default Console;
|
|
@ -1,7 +0,0 @@
|
|||
import React from 'react';
|
||||
|
||||
const Home = () => (
|
||||
<p>Home</p>
|
||||
);
|
||||
|
||||
export default Home;
|
|
@ -0,0 +1,61 @@
|
|||
import React from 'react';
|
||||
import {Grid, Card} from 'tabler-react';
|
||||
|
||||
const Status = () => (
|
||||
<Grid.Row cards>
|
||||
<Grid.Col sm={6} lg={3}>
|
||||
<Card className="p-3">
|
||||
<div className="d-flex align-items-center">
|
||||
<span className="stamp stamp-md bg-blue mr-3">
|
||||
<i className="fe fa-cube"></i>
|
||||
</span>
|
||||
<div>
|
||||
<h4 className="m-0"><a href="javascript:void(0)">IPFS</a></h4>
|
||||
<small className="text-muted">version 2.5</small>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Grid.Col>
|
||||
<Grid.Col sm={6} lg={3}>
|
||||
<Card className="p-3">
|
||||
<div className="d-flex align-items-center">
|
||||
<span className="stamp stamp-md bg-green mr-3">
|
||||
<i className="fe fe-check"></i>
|
||||
</span>
|
||||
<div>
|
||||
<h4 className="m-0"><a href="javascript:void(0)">Ethereum</a></h4>
|
||||
<small className="text-muted">Geth 1.6.7-stable</small>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Grid.Col>
|
||||
<Grid.Col sm={6} lg={3}>
|
||||
<Card className="p-3">
|
||||
<div className="d-flex align-items-center">
|
||||
<span className="stamp stamp-md bg-red mr-3">
|
||||
<i className="fe fe-message-square"></i>
|
||||
</span>
|
||||
<div>
|
||||
<h4 className="m-0"><a href="javascript:void(0)">Whisper</a></h4>
|
||||
<small className="text-muted">V5</small>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Grid.Col>
|
||||
<Grid.Col sm={6} lg={3}>
|
||||
<Card className="p-3">
|
||||
<div className="d-flex align-items-center">
|
||||
<span className="stamp stamp-md bg-yellow mr-3">
|
||||
<i className="fe fe-server"></i>
|
||||
</span>
|
||||
<div>
|
||||
<h4 className="m-0"><a href="javascript:void(0)">Webserver</a></h4>
|
||||
<small className="text-muted">http://localhost:8000</small>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Grid.Col>
|
||||
</Grid.Row>
|
||||
);
|
||||
|
||||
export default Status;
|
|
@ -0,0 +1,23 @@
|
|||
import React, {Component} from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import {Page} from "tabler-react";
|
||||
|
||||
import Status from '../components/Status';
|
||||
import Console from '../components/Console';
|
||||
|
||||
class HomeContainer extends Component {
|
||||
render() {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Page.Title className="my-5">Dashboard</Page.Title>
|
||||
<Status />
|
||||
<Console />
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
null,
|
||||
)(HomeContainer);
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import {Route, Switch} from 'react-router-dom';
|
||||
|
||||
import Home from './components/Home';
|
||||
import HomeContainer from './containers/HomeContainer';
|
||||
import NoMatch from './components/NoMatch';
|
||||
import ExplorerLayout from './components/ExplorerLayout';
|
||||
import ProcessesLayout from './components/ProcessesLayout';
|
||||
|
@ -9,7 +9,7 @@ import ProcessesLayout from './components/ProcessesLayout';
|
|||
const routes = (
|
||||
<React.Fragment>
|
||||
<Switch>
|
||||
<Route exact path="/embark/" component={Home} />
|
||||
<Route exact path="/embark/" component={HomeContainer} />
|
||||
<Route path="/embark/explorer/" component={ExplorerLayout} />
|
||||
<Route path="/embark/processes/" component={ProcessesLayout} />
|
||||
<Route component={NoMatch} />
|
||||
|
|
|
@ -71,7 +71,6 @@ class Server {
|
|||
|
||||
this.app.use(express.static(path.join(fs.dappPath(this.dist)), {'index': ['index.html', 'index.htm']}));
|
||||
this.app.use('/embark', express.static(path.join(__dirname, '../../../embark-ui/build')));
|
||||
this.app.use(cors());
|
||||
|
||||
app.use(bodyParser.json()); // support json encoded bodies
|
||||
app.use(bodyParser.urlencoded({extended: true})); // support encoded bodies
|
||||
|
|
Loading…
Reference in New Issue