Add route and page to enable experiment

This commit is contained in:
Ian Minoso 2016-09-20 17:10:09 -04:00
parent 24327f4964
commit 4dd6166d21
4 changed files with 35 additions and 2 deletions

View 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());
};
}
}());