Handle the case where the user has not selected the correct namespace in the repo list

This commit is contained in:
Joseph Schorr 2014-02-13 18:15:19 -05:00
parent 0379baac6c
commit 895a00de31
2 changed files with 18 additions and 4 deletions

View file

@ -66,9 +66,11 @@ function TutorialCtrl($scope, AngularTour, AngularTourSignals, UserService) {
'title': 'Sign in to get started',
'templateUrl': '/static/tutorial/signup.html',
'signal': function($tourScope) {
$tourScope.username = UserService.currentUser().username;
$tourScope.email = UserService.currentUser().email;
return !UserService.currentUser().anonymous;
var user = UserService.currentUser();
$tourScope.username = user.username;
$tourScope.email = user.email;
$tourScope.inOrganization = user.organizations && user.organizations.length > 0;
return !user.anonymous;
}
},
{
@ -121,7 +123,12 @@ function TutorialCtrl($scope, AngularTour, AngularTourSignals, UserService) {
'mixpanelEvent': 'tutorial_push_complete'
},
{
'content': 'Waiting for the page to load',
'templateUrl': '/static/tutorial/view-repo.html',
'signal': AngularTourSignals.matchesLocation('/repository/'),
'overlayable': true
},
{
'templateUrl': '/static/tutorial/waiting-repo-list.html',
'signal': AngularTourSignals.elementAvaliable('*[data-repo="{{username}}/{{repoName}}"]'),
'overlayable': true
},

View file

@ -0,0 +1,7 @@
<p>
Waiting for your repository to be listed.
</p>
<p ng-show="tour.tourScope.inOrganization">
Please make sure the <strong>{{ tour.tourScope.username }}</strong> namespace is selected.
</p>