Connect on select() if credentials are already set

This commit is contained in:
AlexKvazos
2015-04-29 23:36:34 -05:00
parent 1e7be7cfd7
commit 341b6973cd
@@ -9,6 +9,11 @@ module.exports = function($scope, socket, servers) {
$scope.select = function(id) {
$scope.ip = servers.select(id).ip;
$scope.port = servers.select(id).port;
if ($scope.username.length > 0 && $scope.password.length > 0) {
$scope.connect();
}
};
// connect handler