aboutsummaryrefslogtreecommitdiff
path: root/ui/src/error.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-04-30 11:24:14 +0200
committermetamuffin <metamuffin@disroot.org>2025-04-30 11:24:14 +0200
commitd6a039a10ac3c81d410beb9b648d29524ca1e278 (patch)
treefa521277e3ea94f796e21071f4d2b372c5b9830c /ui/src/error.rs
parenta2ef3f6ec4c830611fde1a2e935588ccbbc61c03 (diff)
downloadjellything-d6a039a10ac3c81d410beb9b648d29524ca1e278.tar
jellything-d6a039a10ac3c81d410beb9b648d29524ca1e278.tar.bz2
jellything-d6a039a10ac3c81d410beb9b648d29524ca1e278.tar.zst
smaller fixes and remove useless deps
Diffstat (limited to 'ui/src/error.rs')
-rw-r--r--ui/src/error.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/ui/src/error.rs b/ui/src/error.rs
new file mode 100644
index 0000000..ddf05bb
--- /dev/null
+++ b/ui/src/error.rs
@@ -0,0 +1,27 @@
+/*
+ This file is part of jellything (https://codeberg.org/metamuffin/jellything)
+ which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
+ Copyright (C) 2025 metamuffin <metamuffin.org>
+*/
+
+use crate::Page;
+use jellycommon::routes::u_account_login;
+
+impl Page for ErrorPage {
+ fn title(&self) -> String {
+ "Error".to_string()
+ }
+ fn to_render(&self) -> markup::DynRender {
+ markup::new!(@self)
+ }
+}
+
+markup::define! {
+ ErrorPage(status: String) {
+ h2 { "Error" }
+ p { @status }
+ // @if status == Status::NotFound {
+ p { "You might need to " a[href=u_account_login()] { "log in" } ", to see this page" }
+ // }
+ }
+}