diff options
Diffstat (limited to 'server/src/routes/ui/account')
-rw-r--r-- | server/src/routes/ui/account/mod.rs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/server/src/routes/ui/account/mod.rs b/server/src/routes/ui/account/mod.rs index 2c27f0c..e7031ff 100644 --- a/server/src/routes/ui/account/mod.rs +++ b/server/src/routes/ui/account/mod.rs @@ -6,21 +6,22 @@ pub mod admin; pub mod session; -use super::error::MyError; -use super::layout::LayoutPage; -use crate::database::Database; -use crate::database::User; -use crate::routes::ui::error::MyResult; -use crate::routes::ui::home::rocket_uri_macro_r_home; -use crate::routes::ui::layout::DynLayoutPage; -use crate::CONF; +use super::{error::MyError, layout::LayoutPage}; +use crate::{ + database::{Database, User}, + routes::ui::{error::MyResult, home::rocket_uri_macro_r_home, layout::DynLayoutPage}, + CONF, +}; use anyhow::anyhow; use argon2::{Argon2, PasswordHasher}; -use rocket::form::Contextual; -use rocket::form::Form; -use rocket::http::{Cookie, CookieJar}; -use rocket::response::Redirect; -use rocket::{get, post, uri, FromForm, State}; +use rocket::{ + form::{Contextual, Form}, + get, + http::{Cookie, CookieJar}, + post, + response::Redirect, + uri, FromForm, State, +}; #[derive(FromForm)] pub struct RegisterForm { @@ -74,7 +75,7 @@ pub fn r_account_login() -> DynLayoutPage<'static> { input[type="text", id="inp-username", name="username"]; br; label[for="inp-password"] { "Password: " } input[type="password", id="inp-password", name="password"]; br; - + input[type="submit", value="Login"]; p { "While logged in, a cookie will be used to identify you." } |