🎉 First commit (💩)

This commit is contained in:
2023-08-03 20:44:53 +02:00
commit 54a50c1ff0
28 changed files with 1077 additions and 0 deletions

55
src/main.rs Normal file
View File

@@ -0,0 +1,55 @@
#![allow(non_snake_case)]
use dioxus::prelude::*;
use dioxus_desktop::Config;
use sir::{global_css, AppStyle};
pub mod app_settings;
pub mod components;
pub mod matrix_client;
use crate::app_settings::AppSettings;
use crate::components::control_window::ControlWindow;
use crate::components::login::Login;
mod base;
fn App(cx: Scope<AppSettings>) -> Element {
use_shared_state_provider(cx, || cx.props.clone());
global_css!(
"
body {
height: 100vh;
width: 100vw;
margin: 0px;
padding: 0px;
outline: 0px;
font-family: Tahoma, sans-serif;
}
#main {
height: 100%;
width: 100%;
}"
);
// let window = dioxus_desktop::use_window(cx);
// let dom = VirtualDom::new(ControlWindow);
// window.new_window(dom, cx.props.clone());
cx.render(rsx! {
AppStyle {},
// Login {}
ControlWindow {}
})
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt::init();
let app_settings = AppSettings::new();
dioxus_desktop::launch_with_props(App, app_settings, Config::default());
Ok(())
}