diff --git a/admin/static/js/app.js b/admin/static/js/app.js index 6f693e47..3d6f65b1 100644 --- a/admin/static/js/app.js +++ b/admin/static/js/app.js @@ -384,6 +384,7 @@ angular.module("FICApp") $scope.types = { "welcome": "Messages de bienvenue", + "countdown": "Compte à rebours", "message": "Message", "panel": "Boîte", "exercice": "Exercice", @@ -391,16 +392,18 @@ angular.module("FICApp") "rank": "Classement", }; $scope.welcome_types = { - "init": "Accueil des équipes", + "teams": "Accueil des équipes", "public": "Accueil du public", - "countdown": "Compte à rebours lancement", }; - $scope.panel_types = { - "panel-default": "Default", - "panel-info": "Info", - "panel-success": "Success", - "panel-warning": "Warning", - "panel-danger": "Danger", + $scope.colors = { + "primary": "Primaire", + "secondary": "Secondaire", + "info": "Info", + "success": "Success", + "warning": "Warning", + "danger": "Danger", + "light": "Clair", + "dark": "Foncé", }; $scope.rank_types = { "general": "Classement général", @@ -415,6 +418,50 @@ angular.module("FICApp") $scope.someUpdt = true; $scope.scenes = []; }; + $scope.presetScene = function(scene) { + $scope.someUpdt = true; + if (scene == "registration") + $scope.scenes = [ + { + type: "welcome", + params: { kind: "teams" }, + }, + { + type: "welcome", + params: { kind: "public", notitle: true }, + }, + ]; + else if (scene == "welcome") + $scope.scenes = [ + { + type: "welcome", + params: { kind: "public" }, + }, + ]; + else if (scene == "start") + $scope.scenes = [ + { + type: "welcome", + params: { kind: "public" }, + }, + { + type: "countdown", + params: { color: "success", end: null, lead: "Go, go, go !", title: "Le challenge forensic va bientôt commencer !" }, + }, + ]; + else if (scene == "summary") { + $scope.scenes = [ + { + type: "table", + params: { kind: "levels", themes: $scope.themes.map(function(z, i) { return z.id; }), total: true }, + }, + { + type: "rank", + params: { limit: 5, which: "general" }, + }, + ]; + } + }; $scope.saveScenes = function() { $scope.someUpdt = false; var prms = Scene.update($scope.scenes); diff --git a/admin/static/views/public.html b/admin/static/views/public.html index 22f1b550..46eab8a9 100644 --- a/admin/static/views/public.html +++ b/admin/static/views/public.html @@ -1,133 +1,175 @@