Make the GUI a library to support multiple platforms

This commit is contained in:
traxys 2023-08-07 17:27:11 +02:00
parent d3f89a8757
commit 0d900024cb
24 changed files with 76 additions and 39 deletions

21
web/src/main.rs Normal file
View file

@ -0,0 +1,21 @@
use regalade_gui::{App, AppContext, AppProps};
struct WebApp {}
impl AppContext for WebApp {}
fn main() {
console_log::init_with_level(log::Level::Info).unwrap();
let html = gloo_utils::document_element();
html.set_attribute("data-bs-theme", "dark")
.expect("could not set dark theme");
dioxus_web::launch_with_props(
App,
AppProps {
context: &WebApp {},
},
dioxus_web::Config::new(),
)
}