while processing, make the whole app look non-interactive

This commit is contained in:
Bel LaPointe
2023-12-28 22:08:29 -05:00
parent ccc4d7fbd2
commit d13266dd73

View File

@@ -32,11 +32,19 @@ fn App(cx: Scope) -> Element {
let clipify_status = use_state(cx, || String::new());
let processing = use_state(cx, || false);
let analysis = use_state(cx, || Analysis::new());
let a_css = String::from_utf8_lossy(include_bytes!("./style.css"));
let processing_css = || {
match *processing.get() {
true => "body { background-color: lightgray !important; opacity: 0.75 !important; }".to_string(),
false => "".to_string(),
}
};
cx.render(rsx! {
header {
title { "home-video-blue-extractinator" }
style { "{a_css}" }
style { "{a_css} {processing_css()}" }
}
main {
rsx! {