🎨 Replace sir with turf + move css to dedicated scss files

This commit is contained in:
2023-08-06 21:27:20 +02:00
parent 88b063b770
commit fd80b7fc10
16 changed files with 432 additions and 443 deletions

View File

@@ -2,8 +2,6 @@
use dioxus::prelude::*;
use dioxus_desktop::Config;
use sir::{global_css, AppStyle};
pub mod app_settings;
pub mod components;
pub mod matrix_client;
@@ -19,70 +17,18 @@ fn App(cx: Scope<AppSettings>) -> Element {
let app_context = use_shared_state::<AppSettings>(cx).unwrap();
global_css!(
"
body {
height: 100vh;
width: 100vw;
margin: 0px;
padding: 0px;
outline: 0px;
font-family: Tahoma, sans-serif;
}
#main {
height: 100%;
width: 100%;
}
.aero-button {
height: 50%;
min-height: 16px;
aspect-ratio: 1;
background-color: transparent;
border: 2px solid transparent;
background-size: contain !important;
margin-right: 1%;
}
.aero-button:hover {
border-image: url(./images/aerobutton_border.png) 2 round;
}
.aero-button:active {
border-image: url(./images/aerobutton_border_down.png) 2 round;
}
.button {
height: 50%;
min-height: 16px;
aspect-ratio: 1;
background-color: transparent;
border: 2px solid transparent;
background-size: contain !important;
margin-right: 1%;
}
.button:hover {
border-image: url(./images/button_border.png) 2 round;
}
.button:active {
border-image: url(./images/button_border_down.png) 2 round;
}
"
);
// let window = dioxus_desktop::use_window(cx);
// let dom = VirtualDom::new(ControlWindow);
// window.new_window(dom, cx.props.clone());
if app_context.read().store.is_logged {
cx.render(rsx! {
AppStyle {},
ContactWindow {},
})
} else {
cx.render(rsx! {
AppStyle {},
Login {}
})
}
cx.render(rsx! {
if app_context.read().store.is_logged {
rsx!(ContactWindow {})
}
else {
rsx!(Login {})
}
})
}
#[tokio::main]