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:
@@ -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; }
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user