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/exp-new-sec-layout.js

19 lines
541 B
JavaScript
Raw Normal View History

(function() {
/**
* Experiment enable page: New layout
*/
angular.module('quayPages').config(['pages', function(pages) {
pages.create('exp-new-sec-layout', 'exp-new-sec-layout.html', ExpCtrl, {
'newLayout': true
});
}]);
function ExpCtrl($scope, CookieService) {
$scope.isEnabled = CookieService.get('quay.exp-new-sec-layout') == 'true';
$scope.setEnabled = function(value) {
$scope.isEnabled = value;
CookieService.putPermanent('quay.exp-new-sec-layout', value.toString());
};
}
}());