-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add input to display drawing
- Loading branch information
Showing
6 changed files
with
413 additions
and
408 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
2 changes: 1 addition & 1 deletion
2
...pp/game/game-intermediate-result/game-drawing-feedback/game-drawing-feedback.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,124 +1,124 @@ | ||
<div class="result-container-background container-background"> | ||
<button class="logo"> | ||
<img src="assets/logo/IO-logo-inverted_transparent-bg.png" alt="logo" aria-label="Gå til admin side" /> | ||
</button> | ||
<div class="result-container"> | ||
<div class="result-section"> | ||
<div id="header"> | ||
<p id="header-text"> | ||
@if (!ismultiplayer) { | ||
{{ 'DIFFICULTY' | translate }}: | ||
<span id="difficulty-text"> | ||
@switch (difficulty) { @case (1){ | ||
{{ 'EASY_BUTTON' | translate }} | ||
} @case(2) { | ||
{{ 'MEDIUM_BUTTON' | translate }} | ||
} @case(3) { | ||
{{ 'HARD_BUTTON' | translate }} | ||
} @default { | ||
{{ 'EASY_BUTTON' | translate }} | ||
} }</span | ||
> | ||
} | ||
</p> | ||
<div id="highscore-section"> | ||
@if (newHighscore) { | ||
<h2 id="highscore-number">{{ 'NEW_HIGHSCORE_TEXT' | translate }}</h2> | ||
} @else { | ||
<h2 id="header-text"> | ||
{{ 'TODAYS_HIGHSCORE_TEXT' | translate }} | ||
<span id="highscore-points"> {{ todaysHighscore.toString() }} {{ 'POINTS' | translate }}</span> | ||
</h2> | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
<div [@fadeIn]="IState" id="i-text-box-container"> | ||
<app-i-avatar [height]="190" [width]="38" [color]="CustomColorsIO.white" /> | ||
<app-speech-bubble | ||
[pointerSide]="PointerSide.Left" | ||
[arrowAlignment]="ArrowAlignment.Top" | ||
[titleText]="''" | ||
[bodyText]="''" | ||
[textColor]="CustomColorsIO.white" | ||
[bubbleColor]="CustomColorsIO.pastelBlue" | ||
[bubbleSize]="'large'" | ||
> | ||
<ng-content slot="body-alt"> | ||
<h1> | ||
@if (ismultiplayer && score > opponentScore && score > 0) { | ||
{{ 'SUMMARY_I_MULTIPLAYER_WIN' | translate }} | ||
<span id="points">{{ score }} {{ 'POINTS' | translate }} </span> | ||
}@else if (ismultiplayer && score === opponentScore) { | ||
{{ 'SUMMARY_I_MULTIPLAYER_DRAW' | translate }} | ||
<span id="points">{{ score }} {{ 'POINTS' | translate }}</span> | ||
} @else if (ismultiplayer && score < opponentScore) { | ||
{{ 'SUMMARY_I_MULTIPLAYER_LOSS' | translate }} | ||
<span id="points"> {{ score }} {{ 'POINTS' | translate }} </span> | ||
} @else if (score === 0) { {{ 'SUMMARY_I_NO_POINTS_1' | translate }} <span id="o-avatar">O</span> | ||
{{ 'SUMMARY_I_NO_POINTS_2' | translate }} <span id="points">{{ 'SUMMARY_I_NO_POINTS_3' | translate }}</span> | ||
} @else { | ||
{{ 'SUMMARY_I_1' | translate }} <span id="o-avatar">O</span> {{ 'SUMMARY_I_2' | translate }} | ||
<span id="points"> {{ score }} {{ 'SUMMARY_I_3' | translate }}</span> | ||
} | ||
</h1> | ||
<div id="result-card-container"> | ||
@for (result of results; track result) { | ||
<div id="result-card"> | ||
<img | ||
mat-card-image | ||
[src]="result.imageData" | ||
[className]="result.hasWon ? 'game-result-img card-won' : 'game-result-img card-loss'" | ||
alt="" | ||
/> | ||
<p id="result-subtitle"> | ||
@if (result.word) { | ||
<span class="result-word">{{ result.word | titlecase }} </span> | ||
<span [className]="result.hasWon ? 'score win' : 'score loss'"> {{ result.score }} p</span> | ||
} | ||
</p> | ||
</div> | ||
} | ||
</div> | ||
</ng-content></app-speech-bubble | ||
> | ||
</div> | ||
|
||
<div [@fadeIn]="OState" id="o-text-box-container"> | ||
<app-speech-bubble | ||
id="o-speech-bubble" | ||
[pointerSide]="PointerSide.Right" | ||
[arrowAlignment]="ArrowAlignment.Center" | ||
[titleText]="''" | ||
[bodyText]="''" | ||
[textColor]="CustomColorsIO.white" | ||
[bubbleColor]="CustomColorsIO.indigo" | ||
[bubbleSize]="'medium'" | ||
> | ||
<ng-content slot="body-alt"> | ||
<h1> | ||
@if (score === 0) { | ||
{{ 'SUMMARY_O_NO_POINTS' | translate }} | ||
} @else { | ||
{{ 'SUMMARY_O' | translate }} | ||
} | ||
</h1> | ||
</ng-content> | ||
</app-speech-bubble> | ||
<app-o-avatar [height]="130" [width]="130" [color]="CustomColorsIO.white" /> | ||
</div> | ||
|
||
<div id="summary-buttons-container"> | ||
<button (click)="endGame()" class="btn btn-secondary"> | ||
<div class="btn-text btn-text-secondary"> | ||
{{ 'END_GAME_BUTTON' | translate }} | ||
</div> | ||
</button> | ||
<button (click)="playAgain()" class="btn"> | ||
<div class="btn-text"> | ||
{{ 'PLAY_AGAIN_BUTTON' | translate }} | ||
</div> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="result-container-background container-background"> | ||
<button class="logo"> | ||
<img src="assets/logo/IO-logo-inverted_transparent-bg.png" alt="logo" aria-label="Gå til admin side" /> | ||
</button> | ||
<div class="result-container"> | ||
<div class="result-section"> | ||
<div id="header"> | ||
<p id="header-text"> | ||
@if (!ismultiplayer) { | ||
{{ 'DIFFICULTY' | translate }}: | ||
<span id="difficulty-text"> | ||
@switch (difficulty) { @case (1){ | ||
{{ 'EASY_BUTTON' | translate }} | ||
} @case(2) { | ||
{{ 'MEDIUM_BUTTON' | translate }} | ||
} @case(3) { | ||
{{ 'HARD_BUTTON' | translate }} | ||
} @default { | ||
{{ 'EASY_BUTTON' | translate }} | ||
} }</span | ||
> | ||
} | ||
</p> | ||
<div id="highscore-section"> | ||
@if (newHighscore) { | ||
<h2 id="highscore-number">{{ 'NEW_HIGHSCORE_TEXT' | translate }}</h2> | ||
} @else { | ||
<h2 id="header-text"> | ||
{{ 'TODAYS_HIGHSCORE_TEXT' | translate }} | ||
<span id="highscore-points"> {{ todaysHighscore.toString() }} {{ 'POINTS' | translate }}</span> | ||
</h2> | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
<div [@fadeIn]="IState" id="i-text-box-container"> | ||
<app-i-avatar [height]="190" [width]="38" [color]="CustomColorsIO.white" /> | ||
<app-speech-bubble | ||
[pointerSide]="PointerSide.Left" | ||
[arrowAlignment]="ArrowAlignment.Top" | ||
[titleText]="''" | ||
[bodyText]="''" | ||
[textColor]="CustomColorsIO.white" | ||
[bubbleColor]="CustomColorsIO.pastelBlue" | ||
[bubbleSize]="'large'" | ||
> | ||
<ng-content slot="body-alt"> | ||
<h1> | ||
@if (ismultiplayer && score > opponentScore && score > 0) { | ||
{{ 'SUMMARY_I_MULTIPLAYER_WIN' | translate }} | ||
<span id="points">{{ score }} {{ 'POINTS' | translate }} </span> | ||
}@else if (ismultiplayer && score === opponentScore) { | ||
{{ 'SUMMARY_I_MULTIPLAYER_DRAW' | translate }} | ||
<span id="points">{{ score }} {{ 'POINTS' | translate }}</span> | ||
} @else if (ismultiplayer && score < opponentScore) { | ||
{{ 'SUMMARY_I_MULTIPLAYER_LOSS' | translate }} | ||
<span id="points"> {{ score }} {{ 'POINTS' | translate }} </span> | ||
} @else if (score === 0) { {{ 'SUMMARY_I_NO_POINTS_1' | translate }} <span id="o-avatar">O</span> | ||
{{ 'SUMMARY_I_NO_POINTS_2' | translate }} <span id="points">{{ 'SUMMARY_I_NO_POINTS_3' | translate }}</span> | ||
} @else { | ||
{{ 'SUMMARY_I_1' | translate }} <span id="o-avatar">O</span> {{ 'SUMMARY_I_2' | translate }} | ||
<span id="points"> {{ score }} {{ 'SUMMARY_I_3' | translate }}</span> | ||
} | ||
</h1> | ||
<div id="result-card-container"> | ||
@for (result of results; track result) { | ||
<div id="result-card"> | ||
<img | ||
mat-card-image | ||
[src]="result.imageData" | ||
[className]="result.hasWon ? 'game-result-img card-won' : 'game-result-img card-loss'" | ||
alt="" | ||
/> | ||
<p id="result-subtitle"> | ||
@if (result.word) { | ||
<span class="result-word">{{ result.word | titlecase }} </span> | ||
<span [className]="result.hasWon ? 'score win' : 'score loss'"> {{ result.score }} p</span> | ||
} | ||
</p> | ||
</div> | ||
} | ||
</div> | ||
</ng-content></app-speech-bubble | ||
> | ||
</div> | ||
|
||
<div [@fadeIn]="OState" id="o-text-box-container"> | ||
<app-speech-bubble | ||
id="o-speech-bubble" | ||
[pointerSide]="PointerSide.Right" | ||
[arrowAlignment]="ArrowAlignment.Center" | ||
[titleText]="''" | ||
[bodyText]="''" | ||
[textColor]="CustomColorsIO.white" | ||
[bubbleColor]="CustomColorsIO.indigo" | ||
[bubbleSize]="'medium'" | ||
> | ||
<ng-content slot="body-alt"> | ||
<h1> | ||
@if (score === 0) { | ||
{{ 'SUMMARY_O_NO_POINTS' | translate }} | ||
} @else { | ||
{{ 'SUMMARY_O' | translate }} | ||
} | ||
</h1> | ||
</ng-content> | ||
</app-speech-bubble> | ||
<app-o-avatar [height]="130" [width]="130" [color]="CustomColorsIO.white" /> | ||
</div> | ||
|
||
<div id="summary-buttons-container"> | ||
<button (click)="endGame()" class="btn btn-secondary"> | ||
<div class="btn-text btn-text-secondary"> | ||
{{ 'END_GAME_BUTTON' | translate }} | ||
</div> | ||
</button> | ||
<button (click)="playAgain()" class="btn"> | ||
<div class="btn-text"> | ||
{{ 'PLAY_AGAIN_BUTTON' | translate }} | ||
</div> | ||
</button> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.