Add Frontend file and update README

This commit is contained in:
cediackermann 2025-01-06 13:16:43 +01:00
parent 5f8a6770e4
commit 2c148ea6d5
3 changed files with 53 additions and 18 deletions

44
Cargo.lock generated
View file

@ -1117,6 +1117,12 @@ version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "either"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]] [[package]]
name = "emath" name = "emath"
version = "0.29.1" version = "0.29.1"
@ -1961,6 +1967,18 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5"
[[package]]
name = "local-ip-address"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3669cf5561f8d27e8fc84cc15e58350e70f557d4d65f70e3154e54cd2f8e1782"
dependencies = [
"libc",
"neli",
"thiserror",
"windows-sys 0.59.0",
]
[[package]] [[package]]
name = "lock_api" name = "lock_api"
version = "0.4.12" version = "0.4.12"
@ -2140,6 +2158,31 @@ dependencies = [
"jni-sys", "jni-sys",
] ]
[[package]]
name = "neli"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1100229e06604150b3becd61a4965d5c70f3be1759544ea7274166f4be41ef43"
dependencies = [
"byteorder",
"libc",
"log",
"neli-proc-macros",
]
[[package]]
name = "neli-proc-macros"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c168194d373b1e134786274020dae7fc5513d565ea2ebb9bc9ff17ffb69106d4"
dependencies = [
"either",
"proc-macro2",
"quote",
"serde",
"syn 1.0.109",
]
[[package]] [[package]]
name = "nix" name = "nix"
version = "0.29.0" version = "0.29.0"
@ -3192,6 +3235,7 @@ dependencies = [
"bincode", "bincode",
"eframe", "eframe",
"egui_extras", "egui_extras",
"local-ip-address",
"rodio", "rodio",
"serde", "serde",
] ]

View file

@ -1 +1,6 @@
# syncaud # syncaud
## Featurelist
- Interactive UI
- Play sounds synchronously across multiple devices
- Upload mp3 files to play

View file

@ -33,7 +33,7 @@ fn main() -> eframe::Result {
}; };
eframe::run_native( eframe::run_native(
"My egui App", "Syncaud",
options, options,
Box::new(|cc| { Box::new(|cc| {
// This gives us image support: // This gives us image support:
@ -44,24 +44,10 @@ fn main() -> eframe::Result {
} }
struct UIApp { struct UIApp {
name: String, username: String,
age: u32, ip_address: String,
} }
impl eframe::App for UIApp { impl eframe::App for UIApp {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {}
egui::CentralPanel::default().show(ctx, |ui| {
ui.heading("My egui Application");
ui.horizontal(|ui| {
let name_label = ui.label("Your name: ");
ui.text_edit_singleline(&mut self.name)
.labelled_by(name_label.id);
});
ui.add(egui::Slider::new(&mut self.age, 0..=120).text("age"));
if ui.button("Increment").clicked() {
self.age += 1;
}
ui.label(format!("Hello '{}', age {}", self.name, self.age));
});
}
} }