diff options
author | metamuffin <metamuffin@disroot.org> | 2023-08-02 15:08:43 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-08-02 15:08:43 +0200 |
commit | c81d8bbfd46d53fba6e0086b5f859f8af8639f4a (patch) | |
tree | 8088fcfad28e9fae3a0a70853b5fd12204cde35a /server/src/routes/ui/layout.rs | |
parent | 0d6a5fb84d3e0016c80baa1849612f550db31a81 (diff) | |
download | jellything-c81d8bbfd46d53fba6e0086b5f859f8af8639f4a.tar jellything-c81d8bbfd46d53fba6e0086b5f859f8af8639f4a.tar.bz2 jellything-c81d8bbfd46d53fba6e0086b5f859f8af8639f4a.tar.zst |
refactor admin panel
Diffstat (limited to 'server/src/routes/ui/layout.rs')
-rw-r--r-- | server/src/routes/ui/layout.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/src/routes/ui/layout.rs b/server/src/routes/ui/layout.rs index 7844e22..7e51e5c 100644 --- a/server/src/routes/ui/layout.rs +++ b/server/src/routes/ui/layout.rs @@ -62,6 +62,15 @@ markup::define! { } } } + + FlashDisplay(flash: Option<Result<String, String>>) { + @if let Some(flash) = &flash { + @match flash { + Ok(mesg) => { section.message { p.success { @mesg } } } + Err(err) => { section.message { p.error { @format!("{err}") } } } + } + } + } } pub type DynLayoutPage<'a> = LayoutPage<markup::DynRender<'a>>; |