diff --git a/projects/gameboard-mks/src/app/console/console.component.html b/projects/gameboard-mks/src/app/console/console.component.html index abbca36f..a2df9ae0 100644 --- a/projects/gameboard-mks/src/app/console/console.component.html +++ b/projects/gameboard-mks/src/app/console/console.component.html @@ -15,8 +15,7 @@ -
+

{{shadowstate}}

@@ -89,7 +88,7 @@

{{stateIcon}}

- -
- -
Drag in a yaml game array or
- +
+ + +

OR

+ + +
+
Drag in a yaml game array
+
@@ -136,12 +141,9 @@ container="body" [adaptivePosition]="true" placement="top">
-
- -
+ +
Announcement
+ + +
+ +
+
+ + +
+ +
+
diff --git a/projects/gameboard-ui/src/app/admin/dashboard/dashboard.component.scss b/projects/gameboard-ui/src/app/admin/dashboard/dashboard.component.scss index 8b19de4d..a716bb83 100644 --- a/projects/gameboard-ui/src/app/admin/dashboard/dashboard.component.scss +++ b/projects/gameboard-ui/src/app/admin/dashboard/dashboard.component.scss @@ -1,8 +1,21 @@ @import '../../../scss/variables'; -.wrapper { - // position: relative; +.new-game-controls { + height: 340px; + padding: .25rem; } + +::ng-deep app-dropzone .dropzone { + flex-grow: 1 !important; +} + +.dropzone-target { + border: .25rem dashed lightgray; + border-radius: .25rem; + height: 100%; + padding: .25rem; +} + .overlay { position: absolute; top: 0rem; @@ -13,10 +26,6 @@ background-color: rgba(black, .8); z-index: 10; } -.dropzone { - border-radius: 0; - border: 0; -} .table-wrapper { overflow-x: auto; diff --git a/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.html b/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.html index 8d7f3719..4fde5eff 100644 --- a/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.html +++ b/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.html @@ -116,12 +116,16 @@

Select an image for the game card shown in the public-facing portion of the app. For best results, use an image with an aspect ratio of 1:1.44 (e.g. 750x1080).

- - - + +
+ +
diff --git a/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.scss b/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.scss index 5dac2752..34646c09 100644 --- a/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.scss +++ b/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.scss @@ -1,3 +1,5 @@ +@import "../../../scss/variables"; + label { margin-bottom: 0; } @@ -7,6 +9,10 @@ label { width: 240px; } +.dropzone-target { + border: dashed 1px $foreground; +} + .section-header { font-weight: 300; cursor: pointer; diff --git a/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.ts b/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.ts index cca79eb5..c4f6d314 100644 --- a/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.ts +++ b/projects/gameboard-ui/src/app/admin/game-editor/game-editor.component.ts @@ -98,7 +98,7 @@ export class GameEditorComponent implements AfterViewInit { } if (this.needsPracticeModeEnabledRefresh) { - this.practiceService.gamePlayerModeChanged({ gameId: game.id, isPractice: game.isPracticeMode }) + this.practiceService.gamePlayerModeChanged({ gameId: game.id, isPractice: game.isPracticeMode }); this.needsPracticeModeEnabledRefresh = false; } })) 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 8a785b46..2474e4c8 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 @@ -59,42 +59,13 @@

Challenge Specs

Sync with Source -
-
-
- {{item.name}} -
-
-
- - -
-
-
-
- - - -
-
-
-
- - - -
-
-
- - - Delete - -
-
-
+ + @@ -102,7 +73,6 @@

Challenge Specs

-
diff --git a/projects/gameboard-ui/src/app/admin/player-names/player-names.component.html b/projects/gameboard-ui/src/app/admin/player-names/player-names.component.html index d023a89d..c0ac54aa 100644 --- a/projects/gameboard-ui/src/app/admin/player-names/player-names.component.html +++ b/projects/gameboard-ui/src/app/admin/player-names/player-names.component.html @@ -28,16 +28,17 @@

Players

- Results limited to {{search.take}}. Refine search - term if necessary. + + Results limited to {{search.take}}. Refine search term if necessary. +
count: {{players.length}}
- +
{{player.approvedName}} diff --git a/projects/gameboard-ui/src/app/admin/player-names/player-names.component.ts b/projects/gameboard-ui/src/app/admin/player-names/player-names.component.ts index bf97dfd7..dffe8d25 100644 --- a/projects/gameboard-ui/src/app/admin/player-names/player-names.component.ts +++ b/projects/gameboard-ui/src/app/admin/player-names/player-names.component.ts @@ -1,9 +1,9 @@ // Copyright 2021 Carnegie Mellon University. All Rights Reserved. // Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information. -import { Component, OnInit } from '@angular/core'; +import { Component } from '@angular/core'; import { faSearch, faFilter, faCheck, faArrowLeft, faTimes, faUndo } from '@fortawesome/free-solid-svg-icons'; -import { BehaviorSubject, combineLatest, interval, Observable, scheduled, timer } from 'rxjs'; +import { BehaviorSubject, combineLatest, firstValueFrom, Observable, timer } from 'rxjs'; import { debounceTime, switchMap, tap } from 'rxjs/operators'; import { Player, PlayerSearch } from '../../api/player-models'; import { PlayerService } from '../../api/player.service'; @@ -13,7 +13,7 @@ import { PlayerService } from '../../api/player.service'; templateUrl: './player-names.component.html', styleUrls: ['./player-names.component.scss'] }) -export class PlayerNamesComponent implements OnInit { +export class PlayerNamesComponent { refresh$ = new BehaviorSubject(true); players$: Observable; source: Player[] = []; @@ -51,9 +51,6 @@ export class PlayerNamesComponent implements OnInit { } - ngOnInit(): void { - } - toggleFilter(role: string): void { this.filter = this.filter !== role ? role : ''; if (!!this.filter) { @@ -69,8 +66,13 @@ export class PlayerNamesComponent implements OnInit { this.refresh$.next(true); } - update(model: Player): void { - this.api.update(model).subscribe(); + async update(model: Player): Promise { + await firstValueFrom(this.api.update({ + id: model.id, + name: model.name, + approvedName: model.approvedName, + nameStatus: model.nameStatus + })); } approveName(model: Player): void { diff --git a/projects/gameboard-ui/src/app/admin/player-registrar/player-registrar.component.html b/projects/gameboard-ui/src/app/admin/player-registrar/player-registrar.component.html index ee4f8f28..feda6370 100644 --- a/projects/gameboard-ui/src/app/admin/player-registrar/player-registrar.component.html +++ b/projects/gameboard-ui/src/app/admin/player-registrar/player-registrar.component.html @@ -130,7 +130,8 @@

Players — {{ctx.game.name}}

-
diff --git a/projects/gameboard-ui/src/app/admin/player-registrar/player-registrar.component.ts b/projects/gameboard-ui/src/app/admin/player-registrar/player-registrar.component.ts index 6b6682f1..0a3b7097 100644 --- a/projects/gameboard-ui/src/app/admin/player-registrar/player-registrar.component.ts +++ b/projects/gameboard-ui/src/app/admin/player-registrar/player-registrar.component.ts @@ -4,7 +4,7 @@ import { Component } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { BsModalService } from 'ngx-bootstrap/modal'; -import { asyncScheduler, BehaviorSubject, combineLatest, firstValueFrom, iif, interval, Observable, of, scheduled, timer } from 'rxjs'; +import { asyncScheduler, BehaviorSubject, combineLatest, firstValueFrom, interval, Observable, scheduled, timer } from 'rxjs'; import { debounceTime, filter, first, map, mergeAll, switchMap, tap } from 'rxjs/operators'; import { BoardService } from '../../api/board.service'; import { Game } from '../../api/game-models'; diff --git a/projects/gameboard-ui/src/app/admin/player-sponsor-report/player-sponsor-report.component.html b/projects/gameboard-ui/src/app/admin/player-sponsor-report/player-sponsor-report.component.html index 2885f97e..1ddfe76e 100644 --- a/projects/gameboard-ui/src/app/admin/player-sponsor-report/player-sponsor-report.component.html +++ b/projects/gameboard-ui/src/app/admin/player-sponsor-report/player-sponsor-report.component.html @@ -27,12 +27,14 @@

Board Reports

- +
- +
@@ -61,7 +63,8 @@
Board: {{g.gameName}}
Player Count
-
{{s.name}}
+
{{s.name}}
{{s.count}}
@@ -75,7 +78,9 @@
All Sponsors
User Count
-
{{s.name}}
+
{{s.name}} +
{{s.count}}
diff --git a/projects/gameboard-ui/src/app/admin/player-sponsor-report/player-sponsor-report.component.ts b/projects/gameboard-ui/src/app/admin/player-sponsor-report/player-sponsor-report.component.ts index 0bcf6785..3a683c38 100644 --- a/projects/gameboard-ui/src/app/admin/player-sponsor-report/player-sponsor-report.component.ts +++ b/projects/gameboard-ui/src/app/admin/player-sponsor-report/player-sponsor-report.component.ts @@ -1,8 +1,7 @@ // Copyright 2021 Carnegie Mellon University. All Rights Reserved. // Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information. -import { Component, OnInit, ViewChild } from '@angular/core'; -import { PlatformLocation } from '@angular/common'; +import { Component, ViewChild } from '@angular/core'; import { faArrowLeft } from '@fortawesome/free-solid-svg-icons'; import { FormGroup, NgForm } from '@angular/forms'; import { Search } from '../../api/models'; @@ -17,7 +16,7 @@ import { SponsorService } from '../../api/sponsor.service'; templateUrl: './player-sponsor-report.component.html', styleUrls: ['./player-sponsor-report.component.scss'] }) -export class PlayerSponsorReportComponent implements OnInit { +export class PlayerSponsorReportComponent { @ViewChild(NgForm) form!: FormGroup; gameSponsorReport?: GameSponsorReport; sponsors?: SponsorReport; @@ -31,8 +30,7 @@ export class PlayerSponsorReportComponent implements OnInit { constructor( private api: ReportService, private gameService: GameService, - private sponsorService: SponsorService, - private platform: PlatformLocation + private sponsorService: SponsorService ) { this.gameService.list(this.search).subscribe( r => { @@ -42,7 +40,6 @@ export class PlayerSponsorReportComponent implements OnInit { this.api.gameSponsorReport(this.currentGame.id).subscribe( r => { - r.stats.forEach(gss => gss.stats.forEach(ss => ss.logo = sponsorService.getLogoUrl(ss.logo))); this.gameSponsorReport = r; } ); @@ -53,15 +50,11 @@ export class PlayerSponsorReportComponent implements OnInit { this.api.sponsorReport().subscribe( r => { this.sponsors = r; - r.stats.forEach(ss => ss.logo = sponsorService.getLogoUrl(ss.logo)); this.sponsorStats = r.stats; } ); } - ngOnInit(): void { - } - updateGame(id: string) { if (this.games) { this.currentGame = this.games.find(g => g.id == id); @@ -69,7 +62,6 @@ export class PlayerSponsorReportComponent implements OnInit { if (this.currentGame) { this.api.gameSponsorReport(this.currentGame.id).subscribe( r => { - r.stats.forEach(gss => gss.stats.forEach(ss => ss.logo = this.sponsorService.getLogoUrl(ss.logo))); this.gameSponsorReport = r; } ); diff --git a/projects/gameboard-ui/src/app/admin/practice/practice-challenges/practice-challenges.component.html b/projects/gameboard-ui/src/app/admin/practice/practice-challenges/practice-challenges.component.html deleted file mode 100644 index 614768ce..00000000 --- a/projects/gameboard-ui/src/app/admin/practice/practice-challenges/practice-challenges.component.html +++ /dev/null @@ -1,5 +0,0 @@ -
-

A coolified view of active practice challenges is coming soon!

-
- - diff --git a/projects/gameboard-ui/src/app/admin/practice/practice-challenges/practice-challenges.component.ts b/projects/gameboard-ui/src/app/admin/practice/practice-challenges/practice-challenges.component.ts deleted file mode 100644 index fd515b64..00000000 --- a/projects/gameboard-ui/src/app/admin/practice/practice-challenges/practice-challenges.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { GameCardContext } from '@/api/game-models'; -import { PracticeService } from '@/services/practice.service'; -import { Component, OnInit } from '@angular/core'; -import { firstValueFrom } from 'rxjs'; - -interface PracticeChallengesContext { - games: GameCardContext[]; - practiceModeIntroText: string; -} - -@Component({ - selector: 'app-practice-challenges', - templateUrl: './practice-challenges.component.html', - styleUrls: ['./practice-challenges.component.scss'] -}) -export class PracticeChallengesComponent implements OnInit { - protected ctx: PracticeChallengesContext | null = null; - - constructor(private practiceService: PracticeService) { } - - async ngOnInit(): Promise { - this.ctx = { - games: await firstValueFrom(this.practiceService.listGames()), - practiceModeIntroText: "" - }; - } -} diff --git a/projects/gameboard-ui/src/app/admin/practice/practice-settings/practice-settings.component.html b/projects/gameboard-ui/src/app/admin/practice/practice-settings/practice-settings.component.html index 081ff2a7..20d5a022 100644 --- a/projects/gameboard-ui/src/app/admin/practice/practice-settings/practice-settings.component.html +++ b/projects/gameboard-ui/src/app/admin/practice/practice-settings/practice-settings.component.html @@ -1,10 +1,9 @@ -
-

Practice Page Greeting

+
+

Practice Page Greeting

- This text appears on the practice page to introduce players to playing in the Practice Area. Edit it below to - customize it - to your needs. + This text appears on the practice page to introduce players to playing in the Practice Area. Edit it below + to customize it to your needs.

-
-

Certificate Template

+
+

Suggested searches

+ +

+ These search terms will appear on the homepage of the Practice Area, just below the greeting. You can use + these to direct players to useful or interesting subsets of the available practice challenges. +

+ + + NOTE: Enter one suggested search per line. +
+ +
+

Certificate Template

Players are able to save certificates in PDF format for each practice challenge they fully complete. Use - this field - to customize the appearance of these certificates. + this field to customize the appearance of these certificates.