Skip to content

Add preliminary control panel design #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions control-station/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<title>HyperXite 9 Control Station</title>
</head>
<body>
Expand Down
6 changes: 0 additions & 6 deletions control-station/src/App.css

This file was deleted.

12 changes: 5 additions & 7 deletions control-station/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { Dashboard } from "@/views";
import { ControlPanel, Navbar, SensorData } from "@/components";

import "./App.css";

function App() {
export default function App() {
return (
<main>
<Dashboard />
<Navbar />
<SensorData />
<ControlPanel />
</main>
);
}

export default App;
30 changes: 30 additions & 0 deletions control-station/src/components/ControlPanel/ControlPanel.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.controlpanel {
position: fixed;
bottom: 0;
width: 100%;
background-color: black;
height: 9%;
display: flex;
justify-content: space-evenly;
align-items: center;
}

.button {
padding: 10px 10px 10px 10px;
min-width: 200px;
border-radius: 10px;
font-size: 1.5rem;
color: white;
}
.start {
background-color: rgb(35, 128, 30);
}
.stop {
background-color: rgb(235, 63, 51);
}
.force {
background-color: rgb(149, 46, 46);
}
.load {
background-color: rgb(0, 101, 188);
}
20 changes: 20 additions & 0 deletions control-station/src/components/ControlPanel/ControlPanel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import "./controlpanel.css";

export default function ControlPanel() {
return (
<div className="controlpanel">
<button className="button start">
Start
</button>
<button className="button stop">
Stop
</button>
<button className="button force">
Force Stop
</button>
<button className="button load">
Load
</button>
</div>
);
}
10 changes: 10 additions & 0 deletions control-station/src/components/Navbar/Navbar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.navbar {
font-size: 2rem;
background-color: black;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 700;
padding: 10px 10px 10px 10px;
}
10 changes: 10 additions & 0 deletions control-station/src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import "./navbar.css";
import HX from "@/data/images/HX Logo.svg";
export default function Navbar() {
return (
<header className="navbar">
<img alt="HX logo" src={HX} style={{ height: "60px" }} />
HyperXite
</header>
);
}
4 changes: 4 additions & 0 deletions control-station/src/components/SensorBoxes/Camera.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import "./sensorboxct.css";
export default function Camera() {
return <div className="camera"></div>;
}
15 changes: 15 additions & 0 deletions control-station/src/components/SensorBoxes/Console.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import "./sensorboxct.css";

export default function Console() {
return (
<div className="console">
<h1>Console</h1>
<ul className="console-list">
<li className="console-list-item">Start Sent</li>
<li className="console-list-item">Stop Sent</li>
<li className="console-list-item">Load Sent</li>
<li className="console-list-item">Force Stop Sent</li>
</ul>
</div>
);
}
44 changes: 44 additions & 0 deletions control-station/src/components/SensorBoxes/SensorData.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.sensordata {
display: flex;
flex-grow: 1;
}
.camera {
height: 45%;
background-color: rgb(143, 143, 143);
border-radius: 20px;
margin: 1% 1% 2% 1%;
border: 1px solid black;
}
.CCcontainer {
width: 50vw;
}

.console {
height: 50%;
background-color: rgb(255, 255, 255);
border-radius: 20px;
margin: 2% 1% 1% 1%;
border: 1px solid black;
overflow-y: auto;
}

.console > h1 {
text-align: center;
font-size: 2.6rem;
}

.console-list {
margin: 0;
padding: 0;
}

.console-list-item {
border-bottom: 0.5px solid rgb(170, 170, 170);
text-decoration: none;
list-style-type: none;
font-size: 0.9rem;
padding-left: 4%;
margin-top: 1%;
font-family: "Ubuntu Mono", monospace;
position: relative;
}
17 changes: 17 additions & 0 deletions control-station/src/components/SensorBoxes/SensorData.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Camera from "./Camera";
import Console from "./Console";
import SensorContainer from "./Sensors/SensorsContainer";

import "./SensorData.css";

export default function SensorData() {
return (
<div className="sensordata">
<SensorContainer />
<div style={{ width: "50%" }}>
<Camera />
<Console />
</div>
</div>
);
}
25 changes: 25 additions & 0 deletions control-station/src/components/SensorBoxes/Sensors/SensorBox.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.sensorbox {
height: 25vh;
width: 40%;
border-radius: 15px;
margin-top: 1%;
margin-bottom: 1%;
background: #e0e0e0;
}
.SensorContainer {
width: 65vw;
height: 80%;
height: auto;
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
flex-basis: 50%;
}

.sensor-value {
display: flex;
justify-content: center;
align-items: center;
height: 90%;
font-size: 3rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import "./sensorbox.css";
export default function SensorBox() {
return (
<div className="sensorbox">
<h1 style={{ textAlign: "center", height: "10%" }}>Title</h1>
<h1 className="sensor-value">0</h1>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import SensorBox from "./SensorBox";

export default function SensorContainer() {
return (
<div className="SensorContainer">
<SensorBox />
<SensorBox />
<SensorBox />
<SensorBox />
<SensorBox />
<SensorBox />
</div>
);
}
6 changes: 5 additions & 1 deletion control-station/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export { default as Status } from "./Status/Status";
export { default as ControlPanel } from "./ControlPanel/ControlPanel";
export { default as Navbar } from "./Navbar/Navbar";
export { default as SensorData } from "./SensorBoxes/SensorData";
export { default as Status } from "./status/Status";

7 changes: 7 additions & 0 deletions control-station/src/data/images/HX Logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 4 additions & 13 deletions control-station/src/index.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;

color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;

font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
font-family: "Roboto", sans-serif;
}
body {
margin: 0 0 0 0;
}
2 changes: 1 addition & 1 deletion control-station/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@/": "/src/",
"@/": "/src/"
},
},
});