feat: integrate dioxus-logger inline (#3302)
* feat: integrate dioxus-logger inline * remove log/simple logger references * fix: add dioxus-data-id-0 to root elements to not emit errors internally * drop config.toml and use cargo.toml profiles instead * make clippy happy with the unit value lint * feat: better presentation for logging
This commit is contained in:
1 parent
995a529b2f
commit
7d490dc3bd
36 files changed
+255
-169
No files matched your search
@@ -12,9 +12,9 @@ publish = false
|
||||
|
||||
[dependencies]
|
||||
manganis = { workspace = true }
|
||||
dioxus = { workspace = true }
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
dioxus = { path = "../../packages/dioxus", features = ["desktop"] }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
dioxus = { path = "../../packages/dioxus", features = ["web"] }
|
||||
[features]
|
||||
default = ["desktop"]
|
||||
web = ["dioxus/web"]
|
||||
desktop = ["dioxus/desktop"]
|
||||
@@ -1,14 +1,13 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
dioxus::launch(app);
|
||||
}
|
||||
|
||||
pub fn app() -> Element {
|
||||
fn app() -> Element {
|
||||
let grey_background = true;
|
||||
rsx! (
|
||||
|
||||
rsx! {
|
||||
document::Link { rel: "stylesheet", href: asset!("/public/tailwind.css") }
|
||||
div {
|
||||
header {
|
||||
@@ -66,11 +65,12 @@ pub fn app() -> Element {
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn StacksIcon() -> Element {
|
||||
rsx!(
|
||||
rsx! {
|
||||
svg {
|
||||
fill: "none",
|
||||
stroke: "currentColor",
|
||||
@@ -81,11 +81,12 @@ pub fn StacksIcon() -> Element {
|
||||
view_box: "0 0 24 24",
|
||||
path { d: "M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" }
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn RightArrowIcon() -> Element {
|
||||
rsx!(
|
||||
rsx! {
|
||||
svg {
|
||||
fill: "none",
|
||||
stroke: "currentColor",
|
||||
@@ -96,5 +97,5 @@ pub fn RightArrowIcon() -> Element {
|
||||
view_box: "0 0 24 24",
|
||||
path { d: "M5 12h14M12 5l7 7-7 7" }
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user