fixes
This commit is contained in:
11
src/app.rs
11
src/app.rs
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user