Merge pull request #233 from coreos-inc/signupflow

Some small UI fixes
This commit is contained in:
josephschorr 2015-07-14 15:47:24 -04:00
commit 1ec02b5c15
7 changed files with 29 additions and 13 deletions

View file

@ -0,0 +1,7 @@
.signup-form-element {
position: relative;
}
.signup-form-element .co-alert {
color: black;
}

View file

@ -1238,7 +1238,7 @@ i.toggle-icon:hover {
color: white; color: white;
margin-bottom: 0px; margin-bottom: 0px;
padding-top: 120px; padding-top: 40px;
min-height: 440px; min-height: 440px;
} }

View file

@ -23,12 +23,10 @@
<div class="external-login-button" provider="google"></div> <div class="external-login-button" provider="google"></div>
</div> </div>
</form> </form>
<div ng-show="registering" style="text-align: center"> <div class="cor-loader" ng-show="registering"></div>
<div class="quay-spinner 2x"></div> <div class="co-alert co-alert-info"
</div> ng-show="awaitingConfirmation && hideRegisteredMessage != 'true'">
<div ng-show="awaitingConfirmation"> Thank you for registering! We have sent you an activation email.
<div class="sub-message"> You must <b>verify your email address</b> before you can continue.
Thank you for registering! We have sent you an activation email.
You must <b>verify your email address</b> before you can continue.</div>
</div> </div>
</div> </div>

View file

@ -10,7 +10,7 @@ angular.module('quay').directive('signupForm', function () {
restrict: 'C', restrict: 'C',
scope: { scope: {
'inviteCode': '=inviteCode', 'inviteCode': '=inviteCode',
'hideRegisteredMessage': '@hideRegisteredMessage',
'userRegistered': '&userRegistered' 'userRegistered': '&userRegistered'
}, },
controller: function($scope, $location, $timeout, ApiService, KeyService, UserService, Config, UIService) { controller: function($scope, $location, $timeout, ApiService, KeyService, UserService, Config, UIService) {
@ -35,11 +35,11 @@ angular.module('quay').directive('signupForm', function () {
mixpanel.alias($scope.newUser.username); mixpanel.alias($scope.newUser.username);
} }
$scope.userRegistered({'username': $scope.newUser.username});
if (!$scope.awaitingConfirmation) { if (!$scope.awaitingConfirmation) {
document.location = '/'; document.location = '/';
} }
$scope.userRegistered({'username': $scope.newUser.username});
}, function(result) { }, function(result) {
$scope.registering = false; $scope.registering = false;
UIService.showFormError('#signupButton', result); UIService.showFormError('#signupButton', result);

View file

@ -12,6 +12,7 @@
function LandingCtrl($scope, $location, UserService, ApiService, Features, Config) { function LandingCtrl($scope, $location, UserService, ApiService, Features, Config) {
$scope.namespace = null; $scope.namespace = null;
$scope.currentScreenshot = 'repo-view'; $scope.currentScreenshot = 'repo-view';
$scope.userRegistered = false;
$scope.$watch('namespace', function(namespace) { $scope.$watch('namespace', function(namespace) {
loadMyRepos(namespace); loadMyRepos(namespace);
@ -26,6 +27,10 @@
loadMyRepos($scope.namespace); loadMyRepos($scope.namespace);
}); });
$scope.handleUserRegistered = function() {
$scope.userRegistered = true;
};
$scope.changeScreenshot = function(screenshot) { $scope.changeScreenshot = function(screenshot) {
$scope.currentScreenshot = screenshot; $scope.currentScreenshot = screenshot;
}; };

View file

@ -104,7 +104,7 @@ angular.module('quay').factory('UIService', ['$timeout', '$rootScope', '$locatio
uiService.showFormError = function(elem, result, opt_placement) { uiService.showFormError = function(elem, result, opt_placement) {
var message = result.data['message'] || result.data['error_description'] || ''; var message = result.data['message'] || result.data['error_description'] || '';
if (message) { if (message) {
uiService.showPopover(elem, message, opt_placement); uiService.showPopover(elem, message, opt_placement || 'bottom');
} else { } else {
uiService.hidePopover(elem); uiService.hidePopover(elem);
} }

View file

@ -2,6 +2,11 @@
<div class="landing-background" ng-class="user.anonymous ? 'landing': 'signedin'"></div> <div class="landing-background" ng-class="user.anonymous ? 'landing': 'signedin'"></div>
<div class="landing-filter" ng-class="user.anonymous ? 'landing': 'signedin'"></div> <div class="landing-filter" ng-class="user.anonymous ? 'landing': 'signedin'"></div>
<div class="landing-content"> <div class="landing-content">
<div class="co-alert co-alert-info" style="color:black;" ng-show="userRegistered">
Thank you for registering! We have sent you an activation email.
You must <b>verify your email address</b> before you can continue.
</div>
<div class="cor-container"> <div class="cor-container">
<div class="row messages"> <div class="row messages">
<div class="col-md-7"> <div class="col-md-7">
@ -43,7 +48,8 @@
<div class="col-md-4 col-md-offset-1"> <div class="col-md-4 col-md-offset-1">
<div ng-show="user.anonymous"> <div ng-show="user.anonymous">
<div class="signup-form"></div> <div class="signup-form" user-registered="handleUserRegistered()"
hide-registered-message="true"></div>
</div> </div>
<div ng-show="!user.anonymous" class="user-welcome"> <div ng-show="!user.anonymous" class="user-welcome">
<span class="avatar" size="128" data="user.avatar"></span> <span class="avatar" size="128" data="user.avatar"></span>