generated from Game-as-a-Service/Gaas-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
67 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,39 @@ | ||
@page "/" | ||
<MudStack> | ||
@foreach (var item in Users) | ||
<MudCard> | ||
<MudCardHeader> | ||
<CardHeaderContent> | ||
<MudText Typo="Typo.h5">玩家列表</MudText> | ||
</CardHeaderContent> | ||
</MudCardHeader> | ||
<MudCardContent> | ||
@foreach (var item in users) | ||
{ | ||
<MudPaper Class="pa-3" Outlined Elevation="5">@item.Id</MudPaper> | ||
} | ||
</MudStack> | ||
</MudCardContent> | ||
</MudCard> | ||
<MudButton OnClick="CreateGame" Variant="Variant.Filled" Color="Color.Primary">Create Game</MudButton> | ||
<MudTextField @bind-Value="GameId" Label="Game Id" Variant="Variant.Outlined" | ||
Adornment="Adornment.End" | ||
AdornmentIcon="@Icons.Material.Filled.PlayArrow" | ||
OnAdornmentClick="JoinGame" /> | ||
<MudStack Row Style="height:100vh"> | ||
<MudCard> | ||
<MudCardHeader> | ||
<CardHeaderContent> | ||
<MudText Typo="Typo.h5">房間列表</MudText> | ||
</CardHeaderContent> | ||
</MudCardHeader> | ||
<MudCardContent> | ||
@foreach (var id in rooms!) | ||
{ | ||
<MudButton Class="pa-3" Color="Color.Secondary" Variant="Variant.Outlined" OnClick="() => JoinGame(id)">@id</MudButton> | ||
} | ||
</MudCardContent> | ||
</MudCard> | ||
<MudDivider /> | ||
<MudText Typo="Typo.h5">遊戲視窗</MudText> | ||
|
||
<MudGrid Justify="Justify.SpaceEvenly" Style="height:100vh;width:100%;" Spacing="1"> | ||
@foreach (var game in games) | ||
{ | ||
<iframe src="/@[email protected]"></iframe> | ||
<MudItem xs="6" Class="pa-0 border-2"> | ||
<iframe src="/@[email protected]" Style="width: 100%; height: 100%;"></iframe> | ||
</MudItem> | ||
} | ||
</MudStack> | ||
</MudGrid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters