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

Manage settings from web interface #36

Merged
merged 10 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .github/workflows/pre-commit-updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ jobs:
body: Update pre-commit hooks
labels: dependencies
delete-branch: True
assignees: "fredclausen"
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,13 @@ repos:
- id: fmt
- id: cargo-check
- id: clippy

- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
args: ["--manifest-path", "./sh-frontend/Cargo.toml", "--"]
- id: cargo-check
args: ["--manifest-path", "./sh-frontend/Cargo.toml"]
- id: clippy
args: ["--manifest-path", "./sh-frontend/Cargo.toml"]
29 changes: 15 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Sorry, there is no migration path from ACARS Hub to SDR-E Hub. The data that ACA
- [x] GitHub CI
- [ ] FIXME/TODO Cleanup
- [ ] Code documentation
- [ ] Unit Tests
- [ ] Alpha 2
- [ ] Connect to data providers
- [ ] ADSB
Expand All @@ -43,17 +44,20 @@ Sorry, there is no migration path from ACARS Hub to SDR-E Hub. The data that ACA
- [ ] Display data on the web interface
- [ ] FIXME/TODO Cleanup
- [ ] Code documentation
- [ ] Unit Tests
- [ ] Alpha 3
- [ ] Implement database storage
- [ ] RRD style data storage for relevant stats
- [ ] SQL storage for historical data
- [ ] General stats
- [ ] FIXME/TODO Cleanup
- [ ] Code documentation
- [ ] Unit Tests
- [ ] Beta 1
- [ ] Focus on interface; clean it up, mobile functionality, etc
- [ ] FIXME/TODO Cleanup
- [ ] Code documentation
- [ ] Unit Tests

## Thank you

Expand All @@ -63,7 +67,7 @@ ACARS Hub was a labor of love driven by the boundless enthusiasm of everyone tha

### Why Rust?

I chose Rust mostly because I wanted to. The other option was to stick with python and TypeScript/NodeJS, which would have been signifiantly easier. The code would have been easier to write, the support of npm packages to do tasks is much bigger, and lastly the ability to search the web and find answers to questions is so much easier.
I chose Rust mostly because I wanted to. The other option was to stick with python and TypeScript/NodeJS, which would have been much easier. The code would have been easier to write, the support of npm packages to do tasks is much bigger, and lastly the ability to search the web and find answers to questions is so much easier.

That said, one of the main goals of this project was to be as performant as possible, as well as a unified code base that could generate both a web application and a desktop application. Rust makes this pretty easy.

Expand Down
30 changes: 21 additions & 9 deletions sh-frontend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions sh-frontend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,18 @@ anyhow = "1.0.86"
futures = "0.3.30"
gloo = "0.11.0"
gloo-utils = "0.2.0"
leaflet = "0.4.0"
leaflet = "0.4.1"
log = "0.4.21"
serde = { version = "1.0.202", features = ["derive"] }
serde_derive = "1.0.202"
serde = { version = "1.0.203", features = ["derive"] }
serde_derive = "1.0.203"
serde_json = "1.0.117"
reqwasm = "0.5.0"
yew = { version = "0.21.0", features = ["csr"] }
yew-alert = "0.1.0"
yewdux = "0.10.0"
yew-websocket = "1.21.0"
yew-router = "0.18.0"
yew-hooks = "0.3.1"
yew-hooks = "0.3.2"
wasm-bindgen = "0.2.92"
wasm-bindgen-futures = "0.4.42"
wasm-logger = "0.2.0"
Expand All @@ -63,6 +64,7 @@ web-sys = { version = "0.3.69", features = [
"HtmlCollection",
"KeyboardEvent",
"EventTarget",
"HtmlFormElement",
] }

sh-common = { path = "../src/libraries/sh-common" }
Expand Down
15 changes: 15 additions & 0 deletions sh-frontend/css/app.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (C) 2024 Fred Clausen
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.

@use "utility/base";
@use "utility/buttons";
@use "utility/alerts";
@use "components/search";
@use "components/navbar";
@use "components/live";
@use "components/settings";
@use "components/footer";

@import url("https://unpkg.com/[email protected]/dist/leaflet.css");
21 changes: 21 additions & 0 deletions sh-frontend/css/components/_footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (C) 2024 Fred Clausen
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.

@use "../config/colors";
@use "../config/config";
@use "../mixins/border" as b;

.footer {
margin-top: config.$normal-margin;
padding: 0rem;
display: flex;
flex-direction: row;
width: 100%;
@include b.border;

& > div {
margin: config.$double-margin;
}
}
40 changes: 40 additions & 0 deletions sh-frontend/css/components/_live.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (C) 2024 Fred Clausen
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.

@use "../config/colors";
@use "../config/config";
@use "../mixins/border" as b;

@mixin live_panel($width: 100%, $margin-left: 0rem) {
margin: 0px;
margin-top: config.$normal-margin;
margin-left: $margin-left;
height: 100%;
width: $width;
max-width: 100%;
max-height: 100%;
overflow: hidden;
@include b.border;
display: block;
}

.live-panel-left {
@include live_panel(24rem);

@media (max-width: config.$transition-to-mobile) {
width: 100%;
max-width: 100%;
}
}

.live-panel-right {
@include live_panel(100%, config.$double-margin);

@media (max-width: config.$transition-to-mobile) {
& {
display: none;
}
}
}
Loading
Loading