Skip to content
This repository was archived by the owner on Mar 17, 2023. It is now read-only.

Commit 15bb33d

Browse files
committed
Added logout button on home screen and home link
1 parent 10945f9 commit 15bb33d

File tree

3 files changed

+213
-177
lines changed

3 files changed

+213
-177
lines changed

Source/Services/RPSLS.Web/Pages/Index.razor

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@
4545
else
4646
{
4747
<div class="subtitle-container">
48-
<h2 class="subtitle" @onclick="Logout">HELLO, @Username.ToUpperInvariant()</h2>
48+
<h2 class="subtitle">HELLO, @Username.ToUpperInvariant()</h2> <span @onclick="Logout">LOGOUT</span>
49+
</div>
50+
<div class="leaderboard-link">
51+
<div class="leaderboard-link-info">
52+
<a href="/leaderboard">LOGOUT</a>
53+
</div>
4954
</div>
5055
}
5156

@@ -120,7 +125,7 @@
120125
{
121126
if (!string.IsNullOrWhiteSpace(Username))
122127
{
123-
128+
UserName = string.Empty;
124129
}
125130

126131
NavigationManager.NavigateTo("/", true);

Source/Services/RPSLS.Web/Shared/ConsoleLayout.razor

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,39 @@
33
@inject SvgHelper svgHelper
44
@inject IOptions<MultiplayerSettings> MultiplayerSettings
55

6-
<div class="game-content">
7-
<div class="header-layout">
8-
<div class="header-layout-item"></div>
9-
<div class="header-layout-item header-layout-item--large">
10-
<RPSLS.Web.Components.MainTitle Title="@Title" ShowHelp="@ShowHelp"></RPSLS.Web.Components.MainTitle>
11-
</div>
12-
<div class="header-layout-item">
13-
@if (ShowLeaderboardLink)
14-
{
15-
<RPSLS.Web.Components.LeaderboardLink MultiplayerSettings="MultiplayerSettings.Value" />
16-
}
17-
</div>
18-
</div>
19-
<div class="console">
20-
<div class="console-content">
21-
<div class="console-controls">
22-
@svgHelper.GetImage($"/assets/images/svg/controls_left.svg")
23-
</div>
24-
<CascadingValue Value="this">
25-
@Body
26-
</CascadingValue>
27-
<div class="console-controls">
28-
@svgHelper.GetImage($"/assets/images/svg/controls_right.svg")
6+
<div class="game-content">
7+
<div class="header-layout">
8+
<div class="header-layout-item">
9+
<div class="home-link">
10+
<div class="home-link-info">
11+
<a href="/index">HOME</a>
12+
</div>
2913
</div>
14+
</div>
15+
<div class="header-layout-item header-layout-item--large">
16+
<RPSLS.Web.Components.MainTitle Title="@Title" ShowHelp="@ShowHelp"></RPSLS.Web.Components.MainTitle>
17+
</div>
18+
<div class="header-layout-item">
19+
@if (ShowLeaderboardLink)
20+
{
21+
<RPSLS.Web.Components.LeaderboardLink MultiplayerSettings="MultiplayerSettings.Value" />
22+
}
23+
</div>
24+
</div>
25+
<div class="console">
26+
<div class="console-content">
27+
<div class="console-controls">
28+
@svgHelper.GetImage($"/assets/images/svg/controls_left.svg")
29+
</div>
30+
<CascadingValue Value="this">
31+
@Body
32+
</CascadingValue>
33+
<div class="console-controls">
34+
@svgHelper.GetImage($"/assets/images/svg/controls_right.svg")
3035
</div>
3136
</div>
3237
</div>
38+
</div>
3339

3440
@if (ShowGithub)
3541
{

0 commit comments

Comments
 (0)