mcaptcha/pages/auth/
sudo.rs1use std::fmt::Display;
7
8use sailfish::runtime::Render;
9use sailfish::TemplateOnce;
10
11#[derive(Clone, TemplateOnce)]
12#[template(path = "auth/sudo/index.html")]
13pub struct SudoPage<'a, K, V>
14where
15 K: Display + Render,
16 V: Display + Render,
17{
18 url: &'a str,
19 data: Option<Vec<(K, V)>>,
20}
21
22pub const PAGE: &str = "Confirm Access";
23
24impl<'a, K, V> SudoPage<'a, K, V>
25where
26 K: Display + Render,
27 V: Display + Render,
28{
29 pub fn new(url: &'a str, data: Option<Vec<(K, V)>>) -> Self {
31 Self { url, data }
32 }
33}