while processing, make the whole app look non-interactive
This commit is contained in:
@@ -32,11 +32,19 @@ fn App(cx: Scope) -> Element {
|
|||||||
let clipify_status = use_state(cx, || String::new());
|
let clipify_status = use_state(cx, || String::new());
|
||||||
let processing = use_state(cx, || false);
|
let processing = use_state(cx, || false);
|
||||||
let analysis = use_state(cx, || Analysis::new());
|
let analysis = use_state(cx, || Analysis::new());
|
||||||
|
|
||||||
let a_css = String::from_utf8_lossy(include_bytes!("./style.css"));
|
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! {
|
cx.render(rsx! {
|
||||||
header {
|
header {
|
||||||
title { "home-video-blue-extractinator" }
|
title { "home-video-blue-extractinator" }
|
||||||
style { "{a_css}" }
|
style { "{a_css} {processing_css()}" }
|
||||||
}
|
}
|
||||||
main {
|
main {
|
||||||
rsx! {
|
rsx! {
|
||||||
|
|||||||
Reference in New Issue
Block a user