Fix claims.

Use OID instead of email for microsoft identifier.
Fix PlayerCount route.
Add created date to user table.
Create spectator icon.
This commit is contained in:
2023-01-20 20:48:38 -06:00
parent 1d0beaf69f
commit 26fd955aa4
35 changed files with 672 additions and 1426 deletions

View File

@@ -2,6 +2,16 @@
@inject PromotePrompt PromotePrompt;
<article class="game-board">
@if (IsSpectating)
{
<aside class="icons">
<div class="spectating" title="You are spectating.">
<svg width="32" height="32" fill="currentColor">
<use xlink:href="css/bootstrap/bootstrap-icons.svg#camera-reels" />
</svg>
</div>
</aside>
}
<!-- Game board -->
<section class="board" data-perspective="@Perspective">
@for (var rank = 1; rank < 10; rank++)
@@ -79,6 +89,7 @@
</article>
@code {
[Parameter] public bool IsSpectating { get; set; } = false;
[Parameter] public WhichPlayer Perspective { get; set; }
[Parameter] public Session? Session { get; set; }
[Parameter] public string? SelectedPosition { get; set; }

View File

@@ -1,9 +1,10 @@
.game-board {
display: grid;
grid-template-areas: "board side-board";
grid-template-columns: 3fr minmax(10rem, 1fr);
grid-template-areas: "board side-board icons";
grid-template-columns: 3fr minmax(10rem, 1fr) auto;
gap: 0.5rem;
background-color: #444;
position: relative; /* For absolute positioned children. */
}
.board {
@@ -13,6 +14,9 @@
.side-board {
grid-area: side-board;
}
.icons {
grid-area: icons;
}
.board {
position: relative;
@@ -110,3 +114,11 @@
.promote-prompt[data-visible="true"] {
display: block;
}
.spectating {
position: absolute;
right: 0;
top: 0;
z-index: 100;
color: var(--contrast-color)
}

View File

@@ -1,7 +1,6 @@
@using Contracts.Types;
<p>You are spectating</p>
<GameBoardPresentation Perspective="WhichPlayer.Player1" Session="Session" />
<GameBoardPresentation IsSpectating="true" Perspective="WhichPlayer.Player1" Session="Session" />
@code {
[Parameter] public Session Session { get; set; }