Test card page
This commit is contained in:
parent
9d37f10a3b
commit
fa16d4d56f
8
TaikoWebUI/Pages/Card.razor
Normal file
8
TaikoWebUI/Pages/Card.razor
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
@page "/Card/{baid}"
|
||||||
|
|
||||||
|
<h1>Card: @Baid</h1>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter]
|
||||||
|
public string? Baid { get; set; }
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
@using SharedProject.Models.Responses
|
@using SharedProject.Models.Responses
|
||||||
@inject HttpClient Client
|
@inject HttpClient Client
|
||||||
|
@inject NavigationManager UriHelper
|
||||||
|
|
||||||
@page "/Dashboard"
|
@page "/Dashboard"
|
||||||
<MudContainer>
|
<MudContainer>
|
||||||
@ -18,6 +19,9 @@
|
|||||||
<CardHeaderContent>
|
<CardHeaderContent>
|
||||||
<MudText Typo="Typo.h5">Baid @user.Baid</MudText>
|
<MudText Typo="Typo.h5">Baid @user.Baid</MudText>
|
||||||
</CardHeaderContent>
|
</CardHeaderContent>
|
||||||
|
<CardHeaderActions>
|
||||||
|
<MudIconButton OnClick="() => NavigateToProfile(user.Baid)" Icon="@Icons.Material.Filled.Settings" Color="Color.Default" />
|
||||||
|
</CardHeaderActions>
|
||||||
</MudCardHeader>
|
</MudCardHeader>
|
||||||
<MudCardContent>
|
<MudCardContent>
|
||||||
<MudText Typo="Typo.h6">Access Code</MudText>
|
<MudText Typo="Typo.h6">Access Code</MudText>
|
||||||
@ -40,4 +44,9 @@
|
|||||||
response = await Client.GetFromJsonAsync<DashboardResponse>("api/Dashboard");
|
response = await Client.GetFromJsonAsync<DashboardResponse>("api/Dashboard");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void NavigateToProfile(uint baid)
|
||||||
|
{
|
||||||
|
UriHelper.NavigateTo($"/Card/{baid}");
|
||||||
|
}
|
||||||
}
|
}
|
@ -18,7 +18,7 @@
|
|||||||
<NavMenu/>
|
<NavMenu/>
|
||||||
</MudDrawer>
|
</MudDrawer>
|
||||||
<MudMainContent>
|
<MudMainContent>
|
||||||
<MudContainer MaxWidth="MaxWidth.Large" Class="my-16 pt-16">
|
<MudContainer MaxWidth="MaxWidth.Large" Class="my-8 pt-8">
|
||||||
@Body
|
@Body
|
||||||
</MudContainer>
|
</MudContainer>
|
||||||
</MudMainContent>
|
</MudMainContent>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user