Skip to content

Commit 8995c1e

Browse files
authored
Merge pull request #9 from ucfcs/Frontend
Frontend
2 parents be2e803 + 32ff06d commit 8995c1e

11 files changed

Lines changed: 50 additions & 67 deletions

File tree

duct-drone-app/dist/index.html

Lines changed: 0 additions & 7 deletions
This file was deleted.

duct-drone-app/dist/main.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

duct-drone-app/src/App.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
.container {
22
position: relative;
33
}
4+
.Sidebar {
5+
margin-top:150px;
6+
margin-left: -40px;
7+
margin-right: -50px;
8+
}
49
#feed {
10+
511
border-width: 2px;
612
height:70%;
713
width:100%;
14+
margin-top: 10px;
815
border-style: solid;
916
color:#007bff;
1017
border-radius: 20px;

duct-drone-app/src/App.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,35 @@ import Control from './Control';
66
import Login from './Login';
77
import Row from 'react-bootstrap/Row';
88
import Col from 'react-bootstrap/Col';
9-
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
9+
import Sidebar from './Sidebar';
10+
import { BrowserRouter as Router, Redirect, Route, Link, Switch, IndexRedirect} from "react-router-dom";
1011
import { Navbar, Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap';
1112
import './App.css';
1213

1314

1415
class App extends Component {
1516
render() {
16-
const InApp = () =>
17-
<Container>
17+
return(
18+
<Router>
19+
<Container>
1820
<Row>
19-
<Col><div id="feed"></div></Col>
21+
<Col><div className="Sidebar"><Sidebar/></div></Col>
22+
<Col xs={10}><div id="feed"></div></Col>
23+
<Col></Col>
2024
</Row>
2125
<Row>
22-
<Col>
26+
<Col></Col>
27+
<Col xs={10}>
2328
<Switch>
2429
<Route path="/app/control/" exact component={Control}/>
25-
<Route path="/app/data/" component={DataTable}/>
26-
</Switch>
27-
</Col>
30+
<Route path="/app/data/" component={DataTable}/>
31+
<Route path="/app/logs/" component={DataTable}/>
32+
</Switch>
33+
</Col>
34+
<Col></Col>
2835
</Row>
2936
<Navigation/>
3037
</Container>
31-
return(
32-
<Router>
33-
<Switch>
34-
<Route path="/app/" component={InApp}/>
35-
<Route path="/" component={Login}/>
36-
</Switch>
3738
</Router>
3839
);
3940
}

duct-drone-app/src/Control.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
}
66
@media only screen and (max-device-width : 812px) {
77
.ReactNipple {
8+
89
}
910

1011
}

duct-drone-app/src/Control.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Control extends React.Component {
1717
<ReactNipple
1818
// supports all nipplejs options
1919
// see https://github.com/yoannmoinet/nipplejs#options
20-
options={{ size: 200, mode: 'static',color: 'blue', position: { top: '50%', left: '50%' } }}
20+
options={{ size: 150, mode: 'static',color: 'blue', position: { top: '50%', left: '50%' } }}
2121
// any unknown props will be passed to the container element, e.g. 'title', 'style' etc
2222
// all events supported by nipplejs are available as callbacks
2323
// see https://github.com/yoannmoinet/nipplejs#start

duct-drone-app/src/DataTable.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
}
77
.table {
88
position: relative;
9-
height:25%;
9+
height:22.5%;
1010
}

duct-drone-app/src/DataTable.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ import React, { Component } from 'react';
22
import Table from 'react-bootstrap/Table';
33
import './DataTable.css'
44
class DataTable extends React.Component {
5+
// constructor(props) {
6+
7+
// }
58
render() {
69
var isActive = false;
710
return (
8-
<Table responsive bordered="true" striped bordered size="md">
11+
<Table responsive bordered="true" striped bordered size="sm">
912
<thead>
1013
<tr>
1114
<th>#</th>

duct-drone-app/src/Navigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Navigation extends React.Component {
1616
<Link to="/app/data/">Data</Link>
1717
</Nav.Item>
1818
<Nav.Item>
19-
Logs
19+
<Link to="/app/logs/">Logs</Link>
2020
</Nav.Item>
2121
<Nav.Item>
2222
View Map

duct-drone-app/src/Sidebar.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.button {
2+
3+
}

0 commit comments

Comments
 (0)