mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
tweak crm
This commit is contained in:
parent
85c7c22619
commit
83462badd1
1 changed files with 12 additions and 18 deletions
|
@ -4,13 +4,11 @@ use dioxus::router::prelude::*;
|
|||
|
||||
fn main() {
|
||||
LaunchBuilder::new()
|
||||
.with_cfg(desktop!(
|
||||
{
|
||||
use dioxus::desktop::{LogicalSize, WindowBuilder};
|
||||
dioxus::desktop::Config::default()
|
||||
.with_window(WindowBuilder::new().with_inner_size(LogicalSize::new(800, 600)))
|
||||
}
|
||||
))
|
||||
.with_cfg(desktop!({
|
||||
use dioxus::desktop::{LogicalSize, WindowBuilder};
|
||||
dioxus::desktop::Config::default()
|
||||
.with_window(WindowBuilder::new().with_inner_size(LogicalSize::new(800, 600)))
|
||||
}))
|
||||
.launch(|| {
|
||||
rsx! {
|
||||
link {
|
||||
|
@ -20,23 +18,19 @@ fn main() {
|
|||
crossorigin: "anonymous"
|
||||
}
|
||||
style { {r#" .red { background-color: rgb(202, 60, 60) !important; } "#} }
|
||||
body {
|
||||
padding: "20px",
|
||||
h1 { "Dioxus CRM Example" }
|
||||
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.
|
||||
static CLIENTS: GlobalSignal<Vec<Client>> = Signal::global(|| Vec::new());
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct Client {
|
||||
pub first_name: String,
|
||||
pub last_name: String,
|
||||
pub description: String,
|
||||
struct Client {
|
||||
first_name: String,
|
||||
last_name: String,
|
||||
description: String,
|
||||
}
|
||||
|
||||
#[derive(Routable, Clone)]
|
||||
|
|
Loading…
Reference in a new issue