Reshow the sign in button when the username is changed

This commit is contained in:
Joseph Schorr 2014-09-02 15:28:56 -04:00
parent 2dcdd7ba5b
commit 2cfab6e252

View file

@ -2278,6 +2278,14 @@ quayApp.directive('signinForm', function () {
}
};
$scope.$watch('user.username', function() {
$scope.tryAgainSoon = 0;
if ($scope.tryAgainInterval) {
$interval.cancel($scope.tryAgainInterval);
}
});
$scope.$on('$destroy', function() {
if ($scope.tryAgainInterval) {
$interval.cancel($scope.tryAgainInterval);
@ -2325,6 +2333,9 @@ quayApp.directive('signinForm', function () {
$scope.tryAgainSoon = 0;
}
}, 1000, $scope.tryAgainSoon);
$scope.needsEmailVerification = false;
$scope.invalidCredentials = false;
} else {
$scope.needsEmailVerification = result.data.needsEmailVerification;
$scope.invalidCredentials = result.data.invalidCredentials;