Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ declare global {
instructionsPostProcessing?: (() => void)[],
MathJax: any,
blocklyUserScale: number,
TASK_NEEDS_ADDITIONAL_CHECKS?: boolean,
}
}

Expand Down
1 change: 1 addition & 0 deletions frontend/lang/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions frontend/lang/fr-FR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 4 additions & 0 deletions frontend/task/TaskApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ export function TaskApp() {
<span className="task-header__algo">ALGO</span>
</div>

{!!window.TASK_NEEDS_ADDITIONAL_CHECKS && <div className="task-warning-banner">
<p>{getMessage('TASK_NOT_READY')}</p>
</div>}

{taskLevels && 1 < Object.keys(taskLevels).length && <TaskLevelTabs/>}

<div className="task-body">
Expand Down
14 changes: 14 additions & 0 deletions frontend/task/task.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Loading