Skip to content

Commit c12bcaf

Browse files
committed
upgrade to latest version of dioxus
1 parent d2f6e9e commit c12bcaf

File tree

11 files changed

+1380
-1149
lines changed

11 files changed

+1380
-1149
lines changed

Cargo.lock

Lines changed: 1349 additions & 1129 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,32 @@ image = { version = "0.25.2", features = ["png", "jpeg"] }
1414
uuid = { version = "1.4", features = ["v4", "serde"] }
1515
serde_yaml = "0.9"
1616
serde_json = "1.0"
17-
dioxus-logger = "0.5.1"
1817
log = "0.4.6"
1918
chrono = "0.4"
2019
rfd = "0.15.0"
21-
brotli = "6.0.0"
20+
brotli = "7.0.0"
2221
base64 = "0.22.1"
2322
webp = "0.3"
2423
rand = "0.8.5"
2524
rusttype = "0.9.3"
2625
imageproc = "0.25.0"
2726
hex_color = "3.0.0"
2827
qrcode = "0.14.1"
29-
usvg = "0.43.0"
30-
resvg = "0.43.0"
28+
usvg = "0.44.0"
29+
resvg = "0.44.0"
3130
tiny-skia = "0.11.4"
32-
31+
tracing = "0.1.41"
3332

3433
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
35-
dioxus = { version = "0.5", features = ["desktop", "router"] }
34+
dioxus = { version = "0.6.0", features = ["desktop", "router"] }
3635
tokio = { version = "1.0", features = ["time"] }
37-
dioxus-desktop = "0.5.6"
36+
dioxus-desktop = "0.6.0"
3837
arboard = "3.4.1"
3938
image = { version = "0.25.2", features = ["webp"] }
4039

4140

4241
[target.'cfg(target_arch = "wasm32")'.dependencies]
43-
dioxus = { version = "0.5", features = ["web", "router"] }
42+
dioxus = { version = "0.6.0", features = ["web", "router"] }
4443
wasm-logger = "0.2.0"
4544
console_error_panic_hook = "0.1.7"
4645
futures-channel = "0.3"
@@ -51,3 +50,15 @@ js-sys = "0.3.70"
5150

5251
[target.'cfg(all(target_os = "linux", not(target_arch = "wasm32")))'.dependencies]
5352
wl-clipboard-rs = "0.9.0"
53+
54+
[profile]
55+
56+
[profile.wasm-dev]
57+
inherits = "dev"
58+
opt-level = 1
59+
60+
[profile.server-dev]
61+
inherits = "dev"
62+
63+
[profile.android-dev]
64+
inherits = "dev"

src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#![allow(non_snake_case)]
22

3-
use dioxus_logger::tracing::{info, Level};
4-
53
use dioxus::prelude::*;
4+
use tracing::info;
65

76
mod app;
87
mod models;
@@ -14,7 +13,6 @@ mod utils;
1413
mod yaml_manager;
1514

1615
fn main() {
17-
dioxus_logger::init(Level::INFO).expect("logger failed to init");
1816

1917
info!("starting app");
2018
launch(app::App);

src/state_manager.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ use crate::models::{MyLifeApp, Yaml};
44
#[cfg(target_arch = "wasm32")]
55
use crate::utils::compression::decode_and_decompress;
66
use crate::yaml_manager::{get_yaml, get_yaml_manager};
7-
use dioxus_logger::tracing::error;
7+
use dioxus::prelude::*;
8+
use tracing::error;
89

910
pub fn initialize_state(y: &str) -> (Yaml, MyLifeApp) {
1011
let yaml_state = if !y.is_empty() {

src/ui/edit_legend_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::utils::date_utils::is_valid_date;
33
use crate::yaml_manager::update_yaml;
44
use chrono::{Local, NaiveDate};
55
use dioxus::prelude::*;
6-
use dioxus_logger::tracing::{debug, warn};
6+
use tracing::{debug, warn};
77

88
fn is_valid_hex_color(color: &str) -> bool {
99
color.len() == 7 && color.starts_with('#') && color[1..].chars().all(|c| c.is_ascii_hexdigit())

src/ui/lifetime_view.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::models::{CellData, LifePeriod, SizeInfo, Yaml};
22
use chrono::{Duration, Local, NaiveDate};
33
use dioxus::prelude::*;
4-
use dioxus_logger::tracing::{debug, error};
4+
use tracing::{debug, error};
55
use uuid::Uuid;
66

77
fn calculate_grid_dimensions(size_info: &SizeInfo, life_expectancy: u32) -> (usize, usize) {

src/ui/top_panel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::yaml_manager::{export_yaml, get_available_yamls, get_yaml_manager, im
55
#[cfg(not(target_arch = "wasm32"))]
66
use arboard::Clipboard;
77
use dioxus::prelude::*;
8-
use dioxus_logger::tracing::error;
8+
use tracing::error;
99
use qrcode::render::svg;
1010
use qrcode::QrCode;
1111

src/ui/window_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ pub fn WindowSizeManager() -> Element {
7878

7979
provide_context(size_info);
8080

81-
None
81+
return rsx! {}
8282
}

src/utils/compression.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine as _};
22
use brotli::enc::BrotliEncoderParams;
3+
use dioxus::prelude::*;
34
#[cfg(target_arch = "wasm32")]
45
use brotli::Decompressor;
56
#[cfg(target_arch = "wasm32")]
6-
use dioxus_logger::tracing::error;
7+
use tracing::error;
78
use serde_json;
89
use serde_yaml;
910
#[cfg(target_arch = "wasm32")]

src/utils/image_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
use crate::models::LegendItem;
44
#[cfg(not(target_arch = "wasm32"))]
5-
use dioxus_logger::tracing::error;
6-
use dioxus_logger::tracing::info;
5+
use tracing::error;
6+
use tracing::info;
77

88
use hex_color::HexColor;
99
#[cfg(target_arch = "wasm32")]

0 commit comments

Comments
 (0)