feat(ui-dioxus): switch to Blitz/wgpu native renderer (no WebView)
This commit is contained in:
parent
f3d2ca78ba
commit
d5172275e2
2 changed files with 5 additions and 15 deletions
|
|
@ -9,7 +9,7 @@ license = "MIT"
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
dioxus = { version = "0.7", features = ["desktop"] }
|
dioxus = { version = "0.7", features = ["native"] }
|
||||||
agor-core = { path = "../agor-core" }
|
agor-core = { path = "../agor-core" }
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
|
|
|
||||||
|
|
@ -35,20 +35,9 @@ use components::status_bar::{FleetState, StatusBar};
|
||||||
use state::demo_projects;
|
use state::demo_projects;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
dioxus::LaunchBuilder::new()
|
// Native/Blitz mode: wgpu renderer, no WebView
|
||||||
.with_cfg(dioxus::desktop::Config::new()
|
// CSS is injected via the <style> element in the RSX tree (see App component)
|
||||||
.with_window(
|
dioxus::launch(App);
|
||||||
dioxus::desktop::WindowBuilder::new()
|
|
||||||
.with_title("Agent Orchestrator — Dioxus Prototype")
|
|
||||||
.with_inner_size(dioxus::desktop::LogicalSize::new(1400.0, 900.0))
|
|
||||||
)
|
|
||||||
.with_custom_head(format!(
|
|
||||||
"<style>{}</style>",
|
|
||||||
theme::generate_css()
|
|
||||||
))
|
|
||||||
.with_background_color((30, 30, 46, 255)) // --ctp-base
|
|
||||||
)
|
|
||||||
.launch(App);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Root application component.
|
/// Root application component.
|
||||||
|
|
@ -107,6 +96,7 @@ fn App() -> Element {
|
||||||
};
|
};
|
||||||
|
|
||||||
rsx! {
|
rsx! {
|
||||||
|
style { {theme::generate_css()} }
|
||||||
div {
|
div {
|
||||||
class: "app-shell",
|
class: "app-shell",
|
||||||
onkeydown: on_keydown,
|
onkeydown: on_keydown,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue