Store the selected namespace in a persistent cookie, not a session cookie
This commit is contained in:
parent
a53106be3b
commit
8725b7a87c
1 changed files with 3 additions and 3 deletions
|
@ -1842,7 +1842,7 @@ quayApp.directive('namespaceSelector', function () {
|
|||
'namespace': '=namespace',
|
||||
'requireCreate': '=requireCreate'
|
||||
},
|
||||
controller: function($scope, $element, $routeParams, $cookieStore) {
|
||||
controller: function($scope, $element, $routeParams, $cookies) {
|
||||
$scope.namespaces = {};
|
||||
|
||||
$scope.initialize = function(user) {
|
||||
|
@ -1854,7 +1854,7 @@ quayApp.directive('namespaceSelector', function () {
|
|||
}
|
||||
}
|
||||
|
||||
var initialNamespace = $routeParams['namespace'] || $cookieStore.get('quay.currentnamespace') || $scope.user.username;
|
||||
var initialNamespace = $routeParams['namespace'] || $cookies.current_namespace|| $scope.user.username;
|
||||
$scope.namespaces = namespaces;
|
||||
$scope.setNamespace($scope.namespaces[initialNamespace]);
|
||||
};
|
||||
|
@ -1871,7 +1871,7 @@ quayApp.directive('namespaceSelector', function () {
|
|||
var newNamespace = namespaceObj.name || namespaceObj.username;
|
||||
$scope.namespaceObj = namespaceObj;
|
||||
$scope.namespace = newNamespace;
|
||||
$cookieStore.put('quay.currentnamespace', newNamespace);
|
||||
$cookies.current_namespace = newNamespace;
|
||||
};
|
||||
|
||||
$scope.$watch('user', function(user) {
|
||||
|
|
Reference in a new issue