-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Retheme announce button * Misc cleanup and styling on Live view (and fixed broken links) * Align the cert picker with the feedback template picker * Don't center .gameboard-table column headers by default * Styling for report multiselect * Fix visual bug in team detail in game center * Add context menu to practice tab in game center * Bug fix and live refresh timer * Better error handling for the ticket form. ID viewer on game center -> teams. Handle line breaks in tickets better
- Loading branch information
1 parent
0189a81
commit 90c91a4
Showing
26 changed files
with
270 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...-ui/src/app/admin/components/active-challenges-modal/active-challenges-modal.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...ameboard-ui/src/app/admin/components/active-teams-modal/active-teams-modal.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
.team-card { | ||
flex-basis: 30%; | ||
} | ||
|
||
input[type="button"] { | ||
appearance: none !important; | ||
} |
2 changes: 1 addition & 1 deletion
2
.../gameboard-ui/src/app/admin/components/active-teams-modal/active-teams-modal.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
projects/gameboard-ui/src/app/admin/components/admin-overview/admin-overview.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...e-center-practice-team-context-menu/game-center-practice-team-context-menu.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<ng-container *ngIf="user"> | ||
<div class="btn-group" dropdown> | ||
<button [id]="'game-center-practice-team-context-menu-button-{{user.id}}' + user.id" dropdownToggle | ||
type="button" class="btn ctx-menu-button rounded-circle" aria-controls="dropdown-basic"> | ||
<fa-icon [icon]="fa.ellipsisVertical" size="2x"></fa-icon> | ||
</button> | ||
<ul id="game-center-practice-team-context-menu-{{user.id}}" *dropdownMenu class="dropdown-menu" role="menu" | ||
aria-labelledby="button-basic"> | ||
<li role="menuitem"> | ||
<button class="dropdown-item btn" (click)="teamDetailClick.next(user)">More</button> | ||
</li> | ||
|
||
<ng-container *ngIf="user.activeChallenge"> | ||
<li class="divider dropdown-divider"></li> | ||
|
||
<li role="menuitem"> | ||
<button class="dropdown-item btn btn-danger" (click)="handleResetSessionClick()"> | ||
Reset Session | ||
</button> | ||
</li> | ||
</ng-container> | ||
</ul> | ||
</div> | ||
</ng-container> |
File renamed without changes.
63 changes: 63 additions & 0 deletions
63
...ame-center-practice-team-context-menu/game-center-practice-team-context-menu.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { Component, EventEmitter, inject, Input, Output } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { fa } from "@/services/font-awesome.service"; | ||
import { GameCenterPracticeContextUser } from '../game-center.models'; | ||
import { CoreModule } from '@/core/core.module'; | ||
import { SimpleEntity } from '@/api/models'; | ||
import { PracticeService } from '@/services/practice.service'; | ||
import { TeamService } from '@/api/team.service'; | ||
import { ToastService } from '@/utility/services/toast.service'; | ||
import { ModalConfirmService } from '@/services/modal-confirm.service'; | ||
|
||
@Component({ | ||
selector: 'app-game-center-practice-team-context-menu', | ||
standalone: true, | ||
imports: [ | ||
CommonModule, | ||
CoreModule, | ||
], | ||
templateUrl: './game-center-practice-team-context-menu.component.html', | ||
styleUrls: ['./game-center-practice-team-context-menu.component.scss'] | ||
}) | ||
export class GameCenterPracticeTeamContextMenuComponent { | ||
@Input() user?: GameCenterPracticeContextUser; | ||
@Input() game?: SimpleEntity; | ||
@Output() sessionReset = new EventEmitter<GameCenterPracticeContextUser>(); | ||
@Output() teamDetailClick = new EventEmitter<GameCenterPracticeContextUser>(); | ||
|
||
private practiceService = inject(PracticeService); | ||
private modalService = inject(ModalConfirmService); | ||
private teamService = inject(TeamService); | ||
private toastService = inject(ToastService); | ||
|
||
protected fa = fa; | ||
|
||
protected handleResetSessionClick() { | ||
if (!this.user?.activeChallenge) { | ||
throw new Error("User doesn't have an active practice challenge."); | ||
} | ||
|
||
this.modalService.openConfirm({ | ||
title: "Reset Practice Session?", | ||
subtitle: this.user.name, | ||
bodyContent: `Reset ${this.user.name}'s practice session? All of their progress in the current session will be erased. **You can't undo this**.`, | ||
renderBodyAsMarkdown: true, | ||
onConfirm: async () => { | ||
const session = await this.practiceService.getSession(); | ||
if (session) { | ||
try { | ||
await this.teamService.endSession({ teamId: session.teamId }); | ||
} | ||
catch (err: any) { | ||
this.toastService.showMessage(`Error resetting session: ${err}`); | ||
} | ||
} | ||
|
||
if (this.user) { | ||
this.toastService.showMessage(`User **${this.user.name}**'s practice session has been reset.`); | ||
this.sessionReset.emit(this.user); | ||
} | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.