tweak crm

This commit is contained in:
Jonathan Kelley 2024-01-19 17:06:46 -08:00
parent 85c7c22619
commit 83462badd1
No known key found for this signature in database
GPG key ID: 1FBB50F7EB0A08BE

View file

@ -4,13 +4,11 @@ use dioxus::router::prelude::*;
fn main() { fn main() {
LaunchBuilder::new() LaunchBuilder::new()
.with_cfg(desktop!( .with_cfg(desktop!({
{ use dioxus::desktop::{LogicalSize, WindowBuilder};
use dioxus::desktop::{LogicalSize, WindowBuilder}; dioxus::desktop::Config::default()
dioxus::desktop::Config::default() .with_window(WindowBuilder::new().with_inner_size(LogicalSize::new(800, 600)))
.with_window(WindowBuilder::new().with_inner_size(LogicalSize::new(800, 600))) }))
}
))
.launch(|| { .launch(|| {
rsx! { rsx! {
link { link {
@ -20,23 +18,19 @@ fn main() {
crossorigin: "anonymous" crossorigin: "anonymous"
} }
style { {r#" .red { background-color: rgb(202, 60, 60) !important; } "#} } style { {r#" .red { background-color: rgb(202, 60, 60) !important; } "#} }
body { h1 { "Dioxus CRM Example" }
padding: "20px", Router::<Route> {}
h1 { "Dioxus CRM Example" }
Router::<Route> {}
}
} }
}); });
} }
/// We only have one list of clients for the whole app, so we can use a global signal. /// We only have one list of clients for the whole app, so we can use a global signal.
static CLIENTS: GlobalSignal<Vec<Client>> = Signal::global(|| Vec::new()); static CLIENTS: GlobalSignal<Vec<Client>> = Signal::global(|| Vec::new());
#[derive(Clone, Debug, Default)] struct Client {
pub struct Client { first_name: String,
pub first_name: String, last_name: String,
pub last_name: String, description: String,
pub description: String,
} }
#[derive(Routable, Clone)] #[derive(Routable, Clone)]