use askama::Template; use serde::{Deserialize, Serialize}; use crate::{OptionalOptionalUser, User}; #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq, OptionalOptionalUser)] #[template(path = "signup.html")] pub struct CreateUser { pub username: String, pub displayname: Option, pub email: Option, pub password: String, pub pw_verify: String, } #[derive( Debug, Clone, Template, Default, Deserialize, Serialize, PartialEq, Eq, OptionalOptionalUser, )] #[template(path = "signup_success.html")] pub struct CreateUserSuccess(pub User); #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq, OptionalOptionalUser)] #[template(path = "login_page.html")] pub struct LoginPage { pub username: String, pub password: String, } #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq, OptionalOptionalUser)] #[template(path = "logout_page.html")] pub struct LogoutPage; #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq, OptionalOptionalUser)] #[template(path = "logout_success.html")] pub struct LogoutSuccess; #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq, OptionalOptionalUser)] #[template(path = "index.html")] pub struct MainPage { pub user: Option, }