1
0
mirror of synced 2024-11-24 15:00:16 +01:00
TaikoLocalServer/TaikoWebUI/Pages/Profile.razor

139 lines
6.9 KiB
Plaintext
Raw Normal View History

@page "/Cards/{baid:int}/Profile"
@inject HttpClient Client
2022-09-05 06:52:29 +02:00
2022-09-06 16:32:36 +02:00
<MudBreadcrumbs Items="breadcrumbs" Class="px-0"></MudBreadcrumbs>
2022-09-05 23:42:13 +02:00
<h1>Profile</h1>
<MudText Typo="Typo.caption">Card: @Baid</MudText>
2022-09-05 06:52:29 +02:00
@if (response is not null)
{
2022-09-05 22:44:19 +02:00
<MudGrid>
<MudItem xs="12" md="8">
2022-09-05 23:00:41 +02:00
<MudPaper Class="py-8 px-8 my-8" Outlined="true">
2022-09-07 04:38:42 +02:00
<MudStack Spacing="4">
2022-09-05 23:00:41 +02:00
<h2>Profile Options</h2>
2022-09-05 22:44:19 +02:00
2022-09-07 04:38:42 +02:00
<MudTextField @bind-Value="@response.MyDonName" Label="Name"></MudTextField>
<MudGrid>
2022-09-07 04:38:42 +02:00
<MudItem xs="12" md="8">
<MudTextField @bind-Value="@response.Title" Label="Title"></MudTextField>
</MudItem>
2022-09-07 04:38:42 +02:00
<MudItem xs="12" md="4">
<MudSelect @bind-Value="@response.TitlePlateId" Label="Title Plate">
@for (uint i = 0; i < 8; i++)
2022-09-07 18:42:10 +02:00
{
var index = i;
<MudSelectItem Value="@i">@titlePlateStrings[index]</MudSelectItem>
}
2022-09-07 04:38:42 +02:00
</MudSelect>
</MudItem>
</MudGrid>
2022-09-07 18:42:10 +02:00
2022-09-07 04:38:42 +02:00
<MudSelect @bind-Value="@response.AchievementDisplayDifficulty"
2022-09-07 18:42:10 +02:00
Label="Achievement Panel Difficulty">
2022-09-07 04:38:42 +02:00
@foreach (var item in Enum.GetValues<Difficulty>())
{
2022-09-07 18:42:10 +02:00
<MudSelectItem Value="@item"/>
2022-09-07 04:38:42 +02:00
}
</MudSelect>
2022-09-07 18:42:10 +02:00
<MudSwitch @bind-Checked="@response.IsDisplayAchievement" Label="Display Achievement Panel" Color="Color.Primary"/>
<MudSwitch @bind-Checked="@response.IsDisplayDanOnNamePlate" Label="Display Dan Rank on Name Plate" Color="Color.Primary"/>
2022-09-05 22:44:19 +02:00
</MudStack>
</MudPaper>
2022-09-05 23:00:41 +02:00
<MudPaper Class="py-8 px-8 my-8" Outlined="true">
2022-09-07 04:38:42 +02:00
<MudStack Spacing="4">
2022-09-05 23:00:41 +02:00
<h2>Song Options</h2>
<MudGrid>
<MudItem xs="12" md="4">
2022-09-07 04:38:42 +02:00
<MudStack Spacing="4">
2022-09-06 16:32:36 +02:00
<MudSwitch @bind-Checked="@response.PlaySetting.IsVanishOn" Label="Vanish" Color="Color.Primary"/>
<MudSwitch @bind-Checked="@response.PlaySetting.IsInverseOn" Label="Inverse" Color="Color.Primary"/>
<MudSwitch @bind-Checked="@response.IsSkipOn" Label="Give Up" Color="Color.Primary"/>
<MudSwitch @bind-Checked="@response.IsVoiceOn" Label="Voice" Color="Color.Primary"/>
2022-09-05 23:00:41 +02:00
</MudStack>
</MudItem>
<MudItem xs="12" md="8">
2022-09-07 04:38:42 +02:00
<MudStack Spacing="4">
2022-09-05 23:00:41 +02:00
<MudSelect @bind-Value="@response.PlaySetting.Speed" Label="Speed">
@for (uint i = 0; i < 15; i++)
{
var index = i;
<MudSelectItem Value="@i">@speedStrings[index]</MudSelectItem>
}
</MudSelect>
<MudSelect @bind-Value="@response.PlaySetting.RandomType"
2022-09-06 16:32:36 +02:00
Label="Random">
2022-09-05 23:00:41 +02:00
@foreach (var item in Enum.GetValues<RandomType>())
{
2022-09-06 16:32:36 +02:00
<MudSelectItem Value="@item"/>
2022-09-05 23:00:41 +02:00
}
</MudSelect>
2022-09-07 00:44:06 +02:00
<MudSelect @bind-Value="@response.ToneId" Label="Tone">
@for (uint i = 0; i < 19; i++)
{
var index = i;
<MudSelectItem Value="@i">@toneStrings[index]</MudSelectItem>
}
</MudSelect>
2022-09-05 23:00:41 +02:00
<MudSlider Class="mb-8" @bind-Value="@response.NotesPosition" Size="Size.Medium" Min="-5" Max="5" Step="1" TickMarks="true" TickMarkLabels="@notePositionStrings">
<MudText Typo="Typo.caption">Notes Position</MudText>
</MudSlider>
</MudStack>
</MudItem>
</MudGrid>
</MudStack>
</MudPaper>
<MudPaper Class="py-8 px-8 my-8" Outlined="true">
<MudStack Spacing="4">
<MudText Typo="Typo.h2">Costume Options</MudText>
<MudGrid>
<MudItem xs="12" md="4">
<MudStack Spacing="4">
<MudTextField @bind-Value="@response.Kigurumi" Label="Kigurumi"/>
<MudTextField @bind-Value="@response.Head" Label="Head"/>
<MudTextField @bind-Value="@response.Face" Label="Face"/>
<MudTextField @bind-Value="@response.Body" Label="Body"/>
<MudTextField @bind-Value="@response.Puchi" Label="Puchi"/>
</MudStack>
</MudItem>
<MudItem xs="12" md="4">
<MudStack Spacing="4">
<MudTextField @bind-Value="@response.BodyColor" Label="BodyColor"/>
<MudTextField @bind-Value="@response.FaceColor" Label="FaceColor"/>
<MudTextField @bind-Value="@response.LimbColor" Label="LimbColor"/>
</MudStack>
</MudItem>
</MudGrid>
</MudStack>
</MudPaper>
2022-09-05 22:44:19 +02:00
</MudItem>
<MudItem md="4" xs="12" Class="py-8 px-8 my-4 pt-8">
2022-09-07 04:38:42 +02:00
<MudStack Spacing="4" Style="top:100px" Class="sticky">
2022-09-05 22:44:19 +02:00
<MudButton Disabled="@isSavingOptions"
2022-09-06 16:32:36 +02:00
OnClick="SaveOptions"
Variant="Variant.Filled"
Color="Color.Primary">
2022-09-05 22:44:19 +02:00
@if (isSavingOptions)
{
2022-09-06 16:32:36 +02:00
<MudProgressCircular Class="ms-n1" Size="Size.Small" Indeterminate="true"/>
2022-09-05 22:44:19 +02:00
<MudText Class="ms-2">Saving...</MudText>
}
else
{
2022-09-05 23:00:41 +02:00
<MudIcon Icon="@Icons.Filled.Save" Class="mx-2"></MudIcon>
2022-09-05 22:44:19 +02:00
<MudText>Save</MudText>
}
</MudButton>
</MudStack>
</MudItem>
</MudGrid>
2022-09-05 06:52:29 +02:00
}