Add route and page to enable experiment
This commit is contained in:
parent
24327f4964
commit
4dd6166d21
4 changed files with 35 additions and 2 deletions
19
static/js/pages/public-repo-exp.js
Normal file
19
static/js/pages/public-repo-exp.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
(function() {
|
||||
/**
|
||||
* Experiment enable new public repo
|
||||
*/
|
||||
angular.module('quayPages').config(['pages', function(pages) {
|
||||
pages.create('public-repo-exp', 'public-repo-exp.html', ExpCtrl, {
|
||||
'newLayout': true
|
||||
});
|
||||
}]);
|
||||
|
||||
function ExpCtrl($scope, CookieService) {
|
||||
$scope.isEnabled = CookieService.get('quay.public-repo-exp') == 'true';
|
||||
|
||||
$scope.setEnabled = function(value) {
|
||||
$scope.isEnabled = value;
|
||||
CookieService.putPermanent('quay.public-repo-exp', value.toString());
|
||||
};
|
||||
}
|
||||
}());
|
Reference in a new issue