diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-02-27 14:40:15 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-02-27 14:40:15 +0100 |
| commit | c05bfcc2775f0e11db6e856bfcf06d0419c35d54 (patch) | |
| tree | ffd0e9fcf6b476a6198287085a514cfa7940c200 /ui/src/components/message.rs | |
| parent | 4ba86694e393c61107e27c4127efc0455b329524 (diff) | |
| download | jellything-c05bfcc2775f0e11db6e856bfcf06d0419c35d54.tar jellything-c05bfcc2775f0e11db6e856bfcf06d0419c35d54.tar.bz2 jellything-c05bfcc2775f0e11db6e856bfcf06d0419c35d54.tar.zst | |
ui changed before object slices
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 } } } |