41 lines
1.3 KiB
Rust
41 lines
1.3 KiB
Rust
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 SignupPage {
|
|
pub username: String,
|
|
pub displayname: Option<String>,
|
|
pub email: Option<String>,
|
|
pub password: String,
|
|
pub pw_verify: String,
|
|
}
|
|
|
|
#[derive(
|
|
Debug, Clone, Template, Default, Deserialize, Serialize, PartialEq, Eq, OptionalOptionalUser,
|
|
)]
|
|
#[template(path = "signup_success.html")]
|
|
pub struct SignupSuccessPage(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 LogoutSuccessPage;
|
|
|
|
#[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq, OptionalOptionalUser)]
|
|
#[template(path = "index.html")]
|
|
pub struct MainPage {
|
|
pub user: Option<User>,
|
|
}
|