Skip to content
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

Add preliminary control panel design #16

Merged
merged 15 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 14 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
8 changes: 7 additions & 1 deletion control-station/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<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,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&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.

8 changes: 4 additions & 4 deletions control-station/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Dashboard } from "@/views";

import "./App.css";
import { ControlPanel, Navbar, SensorData } from "@/components";

function App() {
return (
<main>
<Dashboard />
<Navbar />
<SensorData />
<ControlPanel />
</main>
);
}
Expand Down
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);
}
14 changes: 14 additions & 0 deletions control-station/src/components/ControlPanel/ControlPanel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import "./ControlPanel.css";

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>
);
}

export default ControlPanel;
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;
}
14 changes: 14 additions & 0 deletions control-station/src/components/Navbar/Navbar.tsx
taesungh marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import HX from "@/data/images/HX Logo.svg";

import "./Navbar.css";

function Navbar() {
return (
<header className="navbar">
<img alt="HX logo" src={HX} style={{ height: "60px" }} />
HyperXite
</header>
);
}

export default Navbar;
7 changes: 7 additions & 0 deletions control-station/src/components/SensorBoxes/Camera.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import "./SensorData.css";

function Camera() {
return <div className="camera"></div>;
}

export default Camera;
17 changes: 17 additions & 0 deletions control-station/src/components/SensorBoxes/Console.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import "./SensorData.css";

function Console() {
return (
<div className="console">
<h2>Console</h2>
<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>
);
}

export default Console;
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;
}
19 changes: 19 additions & 0 deletions control-station/src/components/SensorBoxes/SensorData.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Camera from "./Camera";
import Console from "./Console";
import SensorContainer from "./Sensors/SensorsContainer";

import "./SensorData.css";

function SensorData() {
return (
<div className="sensordata">
<SensorContainer />
<div style={{ width: "50%" }}>
<Camera />
<Console />
</div>
</div>
);
}

export default SensorData;
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;
}
12 changes: 12 additions & 0 deletions control-station/src/components/SensorBoxes/Sensors/SensorBox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import "./SensorBox.css";

function SensorBox() {
return (
<div className="sensorbox">
<h3 style={{ textAlign: "center", height: "10%" }}>Title</h3>
<p className="sensor-value">0</p>
</div>
);
}

export default SensorBox;
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import SensorBox from "./SensorBox";

function SensorContainer() {
return (
<div className="SensorContainer">
<SensorBox />
<SensorBox />
<SensorBox />
<SensorBox />
<SensorBox />
<SensorBox />
</div>
);
}

export default SensorContainer;
5 changes: 4 additions & 1 deletion control-station/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
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";
samderanova marked this conversation as resolved.
Show resolved Hide resolved
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;
}