Skip to content

Commit b3f926f

Browse files
Merge pull request #113 from CodebreakerApp/93-title-with-game-page
Changed header of game page
2 parents 4877a88 + 7eb2b4c commit b3f926f

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/CodeBreaker.Blazor.Client/Pages/GamePage.razor

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
@using Codebreaker.GameAPIs.Client.Models
55

66
<FluentCard>
7-
<h2>@Loc["GamePage_Title"]</h2>
8-
97
@if (_gameStatus == GameMode.NotRunning)
108
{
9+
<h2>@Loc["GamePage_Title"]</h2>
1110
<FluentGrid Class="align-items-end">
1211
<FluentGridItem xs="12" md="6">
1312
@if (_isNamePrefilled)
@@ -59,7 +58,7 @@
5958
{
6059
<div class="header flex">
6160
<div>
62-
<h2 class="flex-1">@_game?.GameType</h2>
61+
<h2 class="flex-1">@Loc["GamePage_Title"] @FormatGameTypeString(_game?.GameType)</h2>
6362
<StopWatch Running="@(_gameStatus == GameMode.MoveSet || _gameStatus == GameMode.Started)" />
6463
</div>
6564
<div>

src/CodeBreaker.Blazor.Client/Pages/GamePage.razor.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ private async ValueTask OnLocationChanging(LocationChangingContext context)
217217
StateHasChanged();
218218
}
219219

220+
private string? FormatGameTypeString(string? gameTypeString) =>
221+
gameTypeString?.Replace("Game", null);
222+
220223
public void Dispose()
221224
{
222225
_timer?.Dispose();

0 commit comments

Comments
 (0)