Replace custom socket implementation with SignalR.
Replace MSAL and custom cookie auth with Microsoft.Identity.EntityFramework Also some UI redesign to accommodate different login experience.
This commit is contained in:
28
Shogi.UI/Pages/Play/PlayPage.razor
Normal file
28
Shogi.UI/Pages/Play/PlayPage.razor
Normal file
@@ -0,0 +1,28 @@
|
||||
@attribute [Authorize]
|
||||
@page "/play/{sessionId}"
|
||||
|
||||
@inject GameHubNode node
|
||||
|
||||
@if (string.IsNullOrWhiteSpace(SessionId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
<main class="PrimaryTheme">
|
||||
<AuthorizeView>
|
||||
<GameBoard SessionId="@SessionId" />
|
||||
</AuthorizeView>
|
||||
</main>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public string? SessionId { get; set; }
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (!node.IsConnected)
|
||||
{
|
||||
await node.BeginListen();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user