Allow unauthorized users to search and spectate.
This commit is contained in:
@@ -3,39 +3,39 @@
|
||||
@inject ShogiApi Api
|
||||
|
||||
<gameBrowserEntry>
|
||||
<AuthorizeView>
|
||||
@if (showDeletePrompt)
|
||||
{
|
||||
<modal class="PrimaryTheme ThemeVariant--Contrast">
|
||||
<div style="display: flex; gap: 1rem; justify-content: flex-end;">
|
||||
@if (showDeleteError)
|
||||
{
|
||||
<p style="color: darkred;">An error occurred.</p>
|
||||
<div style="flex: 1;" />
|
||||
<button @onclick="HideModal">Cancel</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>Do you wish to delete this session?</p>
|
||||
<div style="flex: 1;" />
|
||||
<button @onclick="HideModal">No</button>
|
||||
<button @onclick="DeleteSession">Yes</button>
|
||||
}
|
||||
</div>
|
||||
</modal>
|
||||
}
|
||||
@if (showDeletePrompt)
|
||||
{
|
||||
<modal class="PrimaryTheme ThemeVariant--Contrast">
|
||||
<div style="display: flex; gap: 1rem; justify-content: flex-end;">
|
||||
@if (showDeleteError)
|
||||
{
|
||||
<p style="color: darkred;">An error occurred.</p>
|
||||
<div style="flex: 1;" />
|
||||
<button @onclick="HideModal">Cancel</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>Do you wish to delete this session?</p>
|
||||
<div style="flex: 1;" />
|
||||
<button @onclick="HideModal">No</button>
|
||||
<button @onclick="DeleteSession">Yes</button>
|
||||
}
|
||||
</div>
|
||||
</modal>
|
||||
}
|
||||
|
||||
<div>
|
||||
<a href="play/@Session.SessionId">@Session.Player1</a>
|
||||
</div>
|
||||
@if (string.IsNullOrEmpty(Session.Player2))
|
||||
{
|
||||
<span>1 / 2</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>Full</span>
|
||||
}
|
||||
<div>
|
||||
<a href="play/@Session.SessionId">@Session.Player1</a>
|
||||
</div>
|
||||
@if (string.IsNullOrEmpty(Session.Player2))
|
||||
{
|
||||
<span>1 / 2</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>Full</span>
|
||||
}
|
||||
<AuthorizeView>
|
||||
@if (context.User.Identity?.Name == Session.Player1)
|
||||
{
|
||||
<IconButton OnClick="() => showDeletePrompt = true">
|
||||
|
||||
Reference in New Issue
Block a user