diff --git a/projects/gameboard-ui/src/app/admin/components/challenge-spec-editor/challenge-spec-editor.component.html b/projects/gameboard-ui/src/app/admin/components/challenge-spec-editor/challenge-spec-editor.component.html
index b5db2f2b..d4c8e989 100644
--- a/projects/gameboard-ui/src/app/admin/components/challenge-spec-editor/challenge-spec-editor.component.html
+++ b/projects/gameboard-ui/src/app/admin/components/challenge-spec-editor/challenge-spec-editor.component.html
@@ -38,6 +38,7 @@
{{ spec.name }}
diff --git a/projects/gameboard-ui/src/app/admin/components/challenge-spec-editor/challenge-spec-editor.component.ts b/projects/gameboard-ui/src/app/admin/components/challenge-spec-editor/challenge-spec-editor.component.ts
index aa5d153a..77e133a3 100644
--- a/projects/gameboard-ui/src/app/admin/components/challenge-spec-editor/challenge-spec-editor.component.ts
+++ b/projects/gameboard-ui/src/app/admin/components/challenge-spec-editor/challenge-spec-editor.component.ts
@@ -13,24 +13,14 @@ import { Subject, debounceTime, filter, firstValueFrom, switchMap, tap } from 'r
})
export class ChallengeSpecEditorComponent implements OnChanges {
@Input() spec?: Spec;
+ @Output() specDelete = new EventEmitter();
@Output() specUpdate = new EventEmitter();
protected fa = fa;
protected slug = slug;
protected requestUpdateSpec$ = new Subject();
- constructor(
- private specService: SpecService,
- private unsub: UnsubscriberService) {
- this.unsub.add(
- this.requestUpdateSpec$.pipe(
- debounceTime(500),
- filter(s => s.points >= 0),
- switchMap(s => this.specService.update(s)),
- tap(s => this.specUpdate.emit(s)),
- ).subscribe()
- );
- }
+ constructor() { }
ngOnChanges(changes: SimpleChanges): void {
if (!this.spec) {
@@ -38,8 +28,11 @@ export class ChallengeSpecEditorComponent implements OnChanges {
}
}
- async handleSpecUpdated(spec: Spec) {
- this.requestUpdateSpec$.next(spec);
+ protected handleSpecUpdated(spec: Spec) {
this.specUpdate.emit(spec);
}
+
+ protected handleSpecDeleted(spec: Spec) {
+ this.specDelete.emit(spec);
+ }
}
diff --git a/projects/gameboard-ui/src/app/admin/game-mapper/game-mapper.component.html b/projects/gameboard-ui/src/app/admin/game-mapper/game-mapper.component.html
index 214fa8a2..dc45413e 100644
--- a/projects/gameboard-ui/src/app/admin/game-mapper/game-mapper.component.html
+++ b/projects/gameboard-ui/src/app/admin/game-mapper/game-mapper.component.html
@@ -32,9 +32,6 @@
Reset
-
-
-
Alt+Drag (Option+Drag on Macs) to resize hotspots
@@ -61,8 +58,8 @@ Challenge Specs