feat: Add desktop client and update workspace
Adds the desktop client as a new workspace member and includes its initial Cargo.toml and main.rs files. This lays the groundwork for the desktop application's user interface and integration with the common library.
This commit is contained in:
Generated
+3196
-42
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,5 +1,5 @@
|
||||
[workspace]
|
||||
members = ["server", "doctate-common"]
|
||||
members = ["server", "doctate-common", "client-desktop"]
|
||||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "doctate-desktop"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Desktop dictation client for the doctate medical dictation system"
|
||||
|
||||
[dependencies]
|
||||
doctate-common = { path = "../doctate-common" }
|
||||
eframe = "0.28"
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
@@ -0,0 +1,42 @@
|
||||
use eframe::egui;
|
||||
use tracing::info;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
|
||||
fn main() -> eframe::Result {
|
||||
tracing_subscriber::fmt()
|
||||
.with_env_filter(
|
||||
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("doctate_desktop=info")),
|
||||
)
|
||||
.init();
|
||||
|
||||
info!("starting doctate-desktop");
|
||||
|
||||
let options = eframe::NativeOptions {
|
||||
viewport: egui::ViewportBuilder::default()
|
||||
.with_inner_size([320.0, 200.0])
|
||||
.with_resizable(false),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
eframe::run_native(
|
||||
"doctate",
|
||||
options,
|
||||
Box::new(|_cc| Ok(Box::<DoctateApp>::default())),
|
||||
)
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct DoctateApp;
|
||||
|
||||
impl eframe::App for DoctateApp {
|
||||
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.add_space(20.0);
|
||||
ui.heading("doctate");
|
||||
ui.add_space(20.0);
|
||||
ui.label("Skelett — Buttons kommen in Schritt 4e.");
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user