Fixed ui auth

This commit is contained in:
ChristianVisintin
2020-12-03 17:23:36 +01:00
parent f351ee1aea
commit a63af295de

View File

@@ -164,10 +164,10 @@ impl AuthActivity {
} }
} }
// Check username // Check username
if self.username.len() == 0 { //if self.username.len() == 0 {
self.popup_message = Some(String::from("Invalid username")); // self.popup_message = Some(String::from("Invalid username"));
return; // return;
} //}
// Everything OK, set enter // Everything OK, set enter
self.submit = true; self.submit = true;
self.popup_message = self.popup_message =
@@ -231,8 +231,8 @@ impl AuthActivity {
self.protocol = match self.protocol { self.protocol = match self.protocol {
FileTransferProtocol::Sftp => FileTransferProtocol::Ftp(true), // End of list (wrap) FileTransferProtocol::Sftp => FileTransferProtocol::Ftp(true), // End of list (wrap)
FileTransferProtocol::Ftp(ftps) => match ftps { FileTransferProtocol::Ftp(ftps) => match ftps {
true => FileTransferProtocol::Sftp, true => FileTransferProtocol::Ftp(false),
false => FileTransferProtocol::Ftp(true), false => FileTransferProtocol::Sftp,
} }
}; };
} }