Redo header bar to trim options when we can and make the repositories page the default landing page for logged in users
This commit is contained in:
parent
af468a8c6a
commit
2e3704f7ba
6 changed files with 47 additions and 32 deletions
|
@ -1,6 +1,7 @@
|
|||
(function() {
|
||||
/**
|
||||
* Landing page.
|
||||
* DEPRECATED: Remove the code for viewing when logged in.
|
||||
*/
|
||||
angular.module('quayPages').config(['pages', function(pages) {
|
||||
pages.create('landing', 'landing.html', LandingCtrl, {
|
||||
|
@ -8,7 +9,7 @@
|
|||
});
|
||||
}]);
|
||||
|
||||
function LandingCtrl($scope, UserService, ApiService, Features, Config) {
|
||||
function LandingCtrl($scope, $location, UserService, ApiService, Features, Config) {
|
||||
$scope.namespace = null;
|
||||
$scope.currentScreenshot = 'repo-view';
|
||||
|
||||
|
@ -16,7 +17,12 @@
|
|||
loadMyRepos(namespace);
|
||||
});
|
||||
|
||||
UserService.updateUserIn($scope, function() {
|
||||
UserService.updateUserIn($scope, function(user) {
|
||||
if (!user.anonymous && Config.isNewLayout()) {
|
||||
$location.path('/repository');
|
||||
return;
|
||||
}
|
||||
|
||||
loadMyRepos($scope.namespace);
|
||||
});
|
||||
|
||||
|
|
Reference in a new issue