diff --git a/dyesub-tool/index.html b/dyesub-tool/index.html index c84ca76..a8e7770 100644 --- a/dyesub-tool/index.html +++ b/dyesub-tool/index.html @@ -5,6 +5,7 @@ dyesub-tool +
diff --git a/dyesub-tool/src/main.rs b/dyesub-tool/src/main.rs index e756c60..f4fd3b1 100644 --- a/dyesub-tool/src/main.rs +++ b/dyesub-tool/src/main.rs @@ -35,12 +35,22 @@ enum Colorway { #[component] fn ResultMessage(cx: Scope, message: ReadSignal>) -> impl IntoView { - move || message().map(|ResultMessageData { title, message, colorway }| view! { cx, -
>::into(colorway)]> -

{title}

-

{message}

-
- }) + let (open, set_open) = create_signal(cx, true); + create_effect(cx, move |_| { + message.track(); + set_open(true); + }); + move || view! { cx, + + {move || message().map(|ResultMessageData { title, message, colorway }| view! { cx, +
>::into(colorway)] style="position: relative"> + {title} + +

{message}

+
+ })} +
+ } } #[derive(From, IntoStaticStr)]