Skip to content

Commit 1ad9abd

Browse files
committed
feat: update call sites for Dioxus 0.7
Fix the `Key` import path (moved from `dioxus::events` to `dioxus::html`), update the About pane runtime label, and resolve a clippy warning in the Raft view where a conditional `class` attribute resolved to the same value on both branches.
1 parent fe81a99 commit 1ad9abd

3 files changed

Lines changed: 63 additions & 9 deletions

File tree

nodedb-studio/src/modals/preferences.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ fn AboutPane() -> Element {
180180
div { style: "font-family: var(--font-mono); font-size: 11px; line-height: 1.8; margin-top: 14px;",
181181
AboutRow { k: "version", v: "dev" }
182182
AboutRow { k: "build", v: "2026.06.13" }
183-
AboutRow { k: "runtime", v: "dioxus 0.6" }
183+
AboutRow { k: "runtime", v: "dioxus 0.7" }
184184
AboutRow { k: "platform", v: "darwin-arm64" }
185185
AboutRow { k: "license", v: "Apache 2.0" }
186186
}

nodedb-studio/src/routes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! share `StudioLayout`, which renders the persistent chrome (rail, topbar,
66
//! statusbar) around the content `Outlet`.
77
8-
use dioxus::events::Key;
8+
use dioxus::html::Key;
99
use dioxus::prelude::*;
1010

1111
use crate::components::command_palette::CommandPalette;

nodedb-studio/src/views/admin/raft.rs

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,66 @@ pub fn RaftView() -> Element {
77
// (node, leader?, match_index, lag, lag_warn, heartbeat, state, state_pill)
88
let rows = [
99
("node-1", true, "1,488,201", "—", false, "—", "—", ""),
10-
("node-2", false, "1,488,201", "0", false, "12 ms", "replicating", ""),
11-
("node-3", false, "1,488,198", "3", false, "14 ms", "replicating", ""),
12-
("node-4", false, "1,488,200", "1", false, "15 ms", "replicating", ""),
13-
("node-5", false, "1,486,892", "1,309", true, "88 ms", "catching up", "warn"),
14-
("node-6", false, "1,488,201", "0", false, "11 ms", "replicating", ""),
15-
("node-7", false, "1,488,199", "2", false, "13 ms", "replicating", ""),
10+
(
11+
"node-2",
12+
false,
13+
"1,488,201",
14+
"0",
15+
false,
16+
"12 ms",
17+
"replicating",
18+
"",
19+
),
20+
(
21+
"node-3",
22+
false,
23+
"1,488,198",
24+
"3",
25+
false,
26+
"14 ms",
27+
"replicating",
28+
"",
29+
),
30+
(
31+
"node-4",
32+
false,
33+
"1,488,200",
34+
"1",
35+
false,
36+
"15 ms",
37+
"replicating",
38+
"",
39+
),
40+
(
41+
"node-5",
42+
false,
43+
"1,486,892",
44+
"1,309",
45+
true,
46+
"88 ms",
47+
"catching up",
48+
"warn",
49+
),
50+
(
51+
"node-6",
52+
false,
53+
"1,488,201",
54+
"0",
55+
false,
56+
"11 ms",
57+
"replicating",
58+
"",
59+
),
60+
(
61+
"node-7",
62+
false,
63+
"1,488,199",
64+
"2",
65+
false,
66+
"13 ms",
67+
"replicating",
68+
"",
69+
),
1670
];
1771
rsx! {
1872
div { class: "subview active",
@@ -38,7 +92,7 @@ pub fn RaftView() -> Element {
3892
if r.1 { span { class: "pill info", "leader" } }
3993
}
4094
td { class: "mono", "{r.2}" }
41-
td { class: if r.4 { "mono" } else { "mono" }, style: if r.4 { "color:var(--text-warning)" } else { "" }, "{r.3}" }
95+
td { class: "mono", style: if r.4 { "color:var(--text-warning)" } else { "" }, "{r.3}" }
4296
td { class: "mono", "{r.5}" }
4397
td {
4498
if r.7 == "warn" {

0 commit comments

Comments
 (0)