cipher-workshop/web/src/components/error_box.rs
Kristofers Solo c208ce2e81
feat(web): create AES-CBC page
The AES-CBC page supports:
    - Text input: Large textarea for typing/pasting plaintext or ciphertext
    - File input: File upload for binary encryption/decryption
    - IV input: Hex-based 16-byte initialization vector
    - Download: Download encrypted/decrypted output as a file
    - Output formats: Hex, Binary, Octal, Text for decryption output
2025-12-31 05:29:11 +02:00

15 lines
361 B
Rust

use leptos::prelude::*;
#[component]
pub fn ErrorBox(error_msg: ReadSignal<String>) -> AnyView {
view! {
{move || {
if error_msg.get().is_empty() {
return view! { <span></span> }.into_any();
}
view! { <div class="error-box">{error_msg.get()}</div> }.into_any()
}}
}
.into_any()
}