This commit is contained in:
2026-04-11 16:00:05 -06:00
parent 316de93781
commit d2d2bf1477
4 changed files with 329 additions and 66 deletions

View File

@@ -85,10 +85,15 @@ pub struct LoginForm {
impl LoginForm {
pub fn new() -> Self {
Self {
url: String::from("https://docmost.nakano47.com"),
email: String::from("chamagua1@proton.me"),
url: std::env::var("DOCMOST_URL")
.unwrap_or_else(|_| "http://localhost:3000".to_string()),
email: std::env::var("DOCMOST_EMAIL").unwrap_or_default(),
password: String::new(),
active_field: LoginField::Email,
active_field: if std::env::var("DOCMOST_EMAIL").is_ok() {
LoginField::Password
} else {
LoginField::Email
},
error: None,
submitting: false,
}