From 4841c08da8afa3e42c354fbc325ce56b6f997079 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 28 Feb 2026 00:24:52 +0100 Subject: bad pagination --- server/src/request_info.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server/src/request_info.rs') diff --git a/server/src/request_info.rs b/server/src/request_info.rs index 0adfe96..55dde0d 100644 --- a/server/src/request_info.rs +++ b/server/src/request_info.rs @@ -26,6 +26,7 @@ pub struct RequestInfo<'a> { pub debug: &'a str, pub user: Option>, pub state: Arc, + pub no_scaffold: bool, pub flash: Option>, } @@ -48,6 +49,7 @@ impl<'a> RequestInfo<'a> { accept: Accept::from_request_ut(request), user: user_from_request(state, request)?, state: state.clone(), + no_scaffold: request.query_value::("no_scaff").is_some(), debug: request .query_value::<&str>("debug") .transpose() @@ -78,7 +80,11 @@ impl<'a> RequestInfo<'a> { } } pub fn respond_ui(&self, page: &dyn Page) -> RawHtml { - RawHtml(Scaffold { page }.to_string()) + if self.no_scaffold { + RawHtml(page.render().to_string()) + } else { + RawHtml(Scaffold { page }.to_string()) + } } } -- cgit v1.3