This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/pages/public-repo-exp.js
2016-09-20 17:27:48 -04:00

19 lines
529 B
JavaScript

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