diff --git a/frontend/index.tsx b/frontend/index.tsx index 19f44d64..9f6bed48 100644 --- a/frontend/index.tsx +++ b/frontend/index.tsx @@ -167,6 +167,7 @@ declare global { instructionsPostProcessing?: (() => void)[], MathJax: any, blocklyUserScale: number, + TASK_NEEDS_ADDITIONAL_CHECKS?: boolean, } } diff --git a/frontend/lang/en-US.ts b/frontend/lang/en-US.ts index 18fde74c..e5269b3c 100644 --- a/frontend/lang/en-US.ts +++ b/frontend/lang/en-US.ts @@ -247,6 +247,7 @@ export default { TASK_BLOCK_CATEGORY_UNDEFINED: "Other", TASK_LIMIT_TIME: "Time limit:", TASK_LIMIT_MEMORY: "Memory limit:", + TASK_NOT_READY: "This task needs to be verified. If everything works correctly, remove the line \"window.TASK_NEEDS_ADDITIONAL_CHECKS = true\" at the top of the index.html file, and this banner will disappear.", LAYOUT_TYPE_REQUIRED_LABEL: "Preview a specific layout:", LAYOUT_DefaultLayoutDesktop: 'Desktop', diff --git a/frontend/lang/fr-FR.ts b/frontend/lang/fr-FR.ts index fbb52335..12fa1eeb 100644 --- a/frontend/lang/fr-FR.ts +++ b/frontend/lang/fr-FR.ts @@ -253,6 +253,7 @@ export default { TASK_BLOCK_CATEGORY_UNDEFINED: "Divers", TASK_LIMIT_TIME: "Limite de temps :", TASK_LIMIT_MEMORY: "Limite de mémoire :", + TASK_NOT_READY: "Ce sujet doit être vérifié. Si tout fonctionne bien, retirez la ligne \"window.TASK_NEEDS_ADDITIONAL_CHECKS = true\" en haut du fichier index.html, ce bandeau disparaîtra.", LAYOUT_TYPE_REQUIRED_LABEL: "Se placer dans un agencement :", LAYOUT_DefaultLayoutDesktop: 'Ordinateur', diff --git a/frontend/task/TaskApp.tsx b/frontend/task/TaskApp.tsx index 16525d84..022575ad 100644 --- a/frontend/task/TaskApp.tsx +++ b/frontend/task/TaskApp.tsx @@ -154,6 +154,10 @@ export function TaskApp() { ALGO + {!!window.TASK_NEEDS_ADDITIONAL_CHECKS &&
+

{getMessage('TASK_NOT_READY')}

+
} + {taskLevels && 1 < Object.keys(taskLevels).length && }
diff --git a/frontend/task/task.scss b/frontend/task/task.scss index 93681166..b76ab911 100644 --- a/frontend/task/task.scss +++ b/frontend/task/task.scss @@ -1223,3 +1223,17 @@ pre, #app .ace_editor, .stack-view, .subtitles-band-frame { align-items: center; border: none; } + +.task-warning-banner { + display: flex; + align-items: center; + justify-content: center; + background: #efa124; + font-weight: bold; + text-align: center; + padding: 16px; + + p { + margin-bottom: 0; + } +}