diff --git a/static/directives/new-header-bar.html b/static/directives/new-header-bar.html
index 9938674bf..1b9c88460 100644
--- a/static/directives/new-header-bar.html
+++ b/static/directives/new-header-bar.html
@@ -5,20 +5,26 @@
-
+
-
diff --git a/static/js/directives/ui/header-bar.js b/static/js/directives/ui/header-bar.js
index 9bfc8bb4f..63dd9bfeb 100644
--- a/static/js/directives/ui/header-bar.js
+++ b/static/js/directives/ui/header-bar.js
@@ -13,26 +13,30 @@ angular.module('quay').directive('headerBar', function () {
scope: {
},
controller: function($rootScope, $scope, $element, $location, $timeout, hotkeys, UserService, PlanService, ApiService, NotificationService, Config, CreateService) {
- // Register hotkeys:
- hotkeys.add({
- combo: '/',
- description: 'Show search',
- callback: function(e) {
- e.preventDefault();
- e.stopPropagation();
- $scope.toggleSearch();
- }
- });
+ $scope.isNewLayout = Config.isNewLayout();
- hotkeys.add({
- combo: 'alt+c',
- description: 'Create new repository',
- callback: function(e) {
- e.preventDefault();
- e.stopPropagation();
- $location.url('/new');
- }
- });
+ if ($scope.isNewLayout) {
+ // Register hotkeys:
+ hotkeys.add({
+ combo: '/',
+ description: 'Show search',
+ callback: function(e) {
+ e.preventDefault();
+ e.stopPropagation();
+ $scope.toggleSearch();
+ }
+ });
+
+ hotkeys.add({
+ combo: 'alt+c',
+ description: 'Create new repository',
+ callback: function(e) {
+ e.preventDefault();
+ e.stopPropagation();
+ $location.url('/new');
+ }
+ });
+ }
$scope.notificationService = NotificationService;
$scope.searchVisible = false;
@@ -43,7 +47,6 @@ angular.module('quay').directive('headerBar', function () {
// Monitor any user changes and place the current user into the scope.
UserService.updateUserIn($scope);
- $scope.isNewLayout = Config.isNewLayout();
$scope.currentPageContext = {};
diff --git a/static/js/pages/landing.js b/static/js/pages/landing.js
index eefd7e400..ddb012f69 100644
--- a/static/js/pages/landing.js
+++ b/static/js/pages/landing.js
@@ -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);
});
diff --git a/static/js/pages/organizations.js b/static/js/pages/organizations.js
index 1158b01bc..ccc5cf898 100644
--- a/static/js/pages/organizations.js
+++ b/static/js/pages/organizations.js
@@ -1,6 +1,6 @@
(function() {
/**
- * Page which displays the list of organizations of which the user is a member.
+ * DEPRECATED: Page which displays the list of organizations of which the user is a member.
*/
angular.module('quayPages').config(['pages', function(pages) {
pages.create('organizations', 'organizations.html', OrgsCtrl, {
diff --git a/static/js/services/user-service.js b/static/js/services/user-service.js
index 7d9cd7aca..d6bce37cc 100644
--- a/static/js/services/user-service.js
+++ b/static/js/services/user-service.js
@@ -12,7 +12,8 @@ function(ApiService, CookieService, $rootScope, Config) {
username: null,
email: null,
organizations: [],
- logins: []
+ logins: [],
+ beforeload: true
}
var userService = {}
diff --git a/static/partials/repo-list.html b/static/partials/repo-list.html
index e1024dadb..07590a0ac 100644
--- a/static/partials/repo-list.html
+++ b/static/partials/repo-list.html
@@ -11,10 +11,10 @@
-