mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 04:33:06 +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() {
|
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)]
|
||||||
|
|
Loading…
Reference in a new issue