Make the GUI a library to support multiple platforms
This commit is contained in:
parent
d3f89a8757
commit
0d900024cb
24 changed files with 76 additions and 39 deletions
21
web/src/main.rs
Normal file
21
web/src/main.rs
Normal 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(),
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue