From 4a28b3ec800ebbc96f19e8d73637fee67105bc40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Gerrit=20G=C3=B6bel?= <86782124+jggoebel@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:51:24 +0200 Subject: [PATCH] fix: respect courses pauseable flag (#210) Co-authored-by: Philip Prinz --- src/app/course/course.ts | 1 + src/app/scenario/step.component.html | 2 +- src/app/scenario/step.component.ts | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/app/course/course.ts b/src/app/course/course.ts index 3c053256..2f16330a 100644 --- a/src/app/course/course.ts +++ b/src/app/course/course.ts @@ -6,5 +6,6 @@ export class Course { // These are Scenario IDs scenarios: string[]; keep_vm: boolean; + pauseable: boolean; virtualmachines: Map[]; } diff --git a/src/app/scenario/step.component.html b/src/app/scenario/step.component.html index 41d6d2af..86eda6e3 100644 --- a/src/app/scenario/step.component.html +++ b/src/app/scenario/step.component.html @@ -31,7 +31,7 @@

Finish - + diff --git a/src/app/scenario/step.component.ts b/src/app/scenario/step.component.ts index 0ed96133..628ad72a 100644 --- a/src/app/scenario/step.component.ts +++ b/src/app/scenario/step.component.ts @@ -586,6 +586,14 @@ export class StepComponent implements OnInit, AfterViewInit, OnDestroy { return exists; } + isPauseable(): boolean { + if (this.isContentOnly !== '' && this.isContentOnly) return false; + if (this.course) { + return this.course.pauseable; + } + return this.scenario.pauseable; + } + getBrawlLanguages() { return this.languageCommandService.getLanguageNames(); }