diff options
Diffstat (limited to 'ui/src/components/message.rs')
| -rw-r--r-- | ui/src/components/message.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ui/src/components/message.rs b/ui/src/components/message.rs index a271d40..b4499ed 100644 --- a/ui/src/components/message.rs +++ b/ui/src/components/message.rs @@ -4,14 +4,12 @@ Copyright (C) 2026 metamuffin <metamuffin.org> */ use crate::RenderInfo; -use jellycommon::{MESSAGE_KIND, MESSAGE_TEXT, jellyobject::Object}; use markup::define; define! { - Message<'a>(ri: &'a RenderInfo<'a>, message: Object<'a>) { + Message<'a>(ri: &'a RenderInfo<'a>, kind: &'a str, text: &'a str) { @let _ = ri; - @let text = message.get(MESSAGE_TEXT).unwrap_or_default(); - @match message.get(MESSAGE_KIND).unwrap_or("neutral") { + @match *kind { "success" => { section.message { p.success { @text } } } "error" => { section.message { p.error { @text } } } "neutral" | _ => { section.message { p { @text } } } |