@page "/Users/{baid:int}/Profile" @inject HttpClient Client @inject IGameDataService GameDataService @inject IDialogService DialogService @inject LoginService LoginService @inject IJSRuntime Js @inject NavigationManager NavigationManager @if (response is not null) { @if (LoginService.LoginRequired && (!LoginService.IsLoggedIn || (LoginService.GetLoggedInUser().Baid != Baid && !LoginService.IsAdmin))) { if (!LoginService.IsLoggedIn) { NavigationManager.NavigateTo("/Login"); } else { NavigationManager.NavigateTo("/"); } } else { @Localizer["Profile"] @Localizer["Profile Options"] @for (uint i = 0; i < LanguageStrings.Length; i++) { var index = i; @LanguageStrings[index] } @if (LoginService.AllowFreeProfileEditing) { } else { } @Localizer["Select a Title"] @if (LoginService.AllowFreeProfileEditing) { @for (uint i = 0; i < TitlePlateStrings.Length; i++) { var index = i; @TitlePlateStrings[index] } } @foreach (var item in Enum.GetValues()) { } @for (uint i = 0; i < DifficultySettingCourseStrings.Length; i++) { var index = i; @DifficultySettingCourseStrings[index] } @for (uint i = 0; i < DifficultySettingStarStrings.Length; i++) { var index = i; @DifficultySettingStarStrings[index] } @for (uint i = 0; i < DifficultySettingSortStrings.Length; i++) { var index = i; @DifficultySettingSortStrings[index] } @Localizer["Costume Options"] @if (LoginService.AllowFreeProfileEditing) { @for (var i = 0; i < costumeFlagArraySizes[1]; i++) { var index = (uint)i; var costumeTitle = GameDataService.GetHeadTitle(index); @index - @costumeTitle } @for (var i = 0; i < costumeFlagArraySizes[2]; i++) { var index = (uint)i; var costumeTitle = GameDataService.GetBodyTitle(index); @index - @costumeTitle } @for (var i = 0; i < costumeFlagArraySizes[3]; i++) { var index = (uint)i; var costumeTitle = GameDataService.GetFaceTitle(index); @index - @costumeTitle } @for (var i = 0; i < costumeFlagArraySizes[0]; i++) { var index = (uint)i; var costumeTitle = GameDataService.GetKigurumiTitle(index); @index - @costumeTitle } @for (var i = 0; i < costumeFlagArraySizes[4]; i++) { var index = (uint)i; var costumeTitle = GameDataService.GetPuchiTitle(index); @index - @costumeTitle } } else { @foreach (var i in unlockedHeadCostumes) { var index = i; var costumeTitle = GameDataService.GetHeadTitle(index); @index - @costumeTitle } @foreach (var i in unlockedBodyCostumes) { var index = i; var costumeTitle = GameDataService.GetBodyTitle(index); @index - @costumeTitle } @foreach (var i in unlockedFaceCostumes) { var index = i; var costumeTitle = GameDataService.GetFaceTitle(index); @index - @costumeTitle } @foreach (var i in unlockedKigurumiCostumes) { var index = i; var costumeTitle = GameDataService.GetKigurumiTitle(index); @index - @costumeTitle } @foreach (var i in unlockedPuchiCostumes) { var index = i; var costumeTitle = GameDataService.GetPuchiTitle(index); @index - @costumeTitle } } @for (uint i = 0; i < Constants.COSTUME_COLOR_MAX; i++) { var index = i;
@index
}
@for (uint i = 0; i < Constants.COSTUME_COLOR_MAX; i++) { var index = i;
@index
}
@for (uint i = 0; i < Constants.COSTUME_COLOR_MAX; i++) { var index = i;
@index
}
@Localizer["Song Options"] @for (uint i = 0; i < SpeedStrings.Length; i++) { var index = i; @SpeedStrings[index] } @foreach (var item in Enum.GetValues()) { } @for (uint i = 0; i < ToneStrings.Length; i++) { var index = i; @ToneStrings[index] } @Localizer["Notes Position"]
@* Player Visualizer *@ @if (response.Kigurumi == 0) { } else { } @* Player Nameplate *@ @* Title text *@ @response.Title @* Name text *@ @* Name textoffset to the right for Dan Rank *@ @response.MyDonName @response.MyDonName @if (response.IsDisplayDanOnNamePlate) { } @if (response.IsDisplayAchievement) { @* Achievement panel Text *@ @* First row *@ @scoresArray[0] @scoresArray[0] @* Second row *@ @scoresArray[1] @scoresArray[1] @scoresArray[2] @scoresArray[2] @scoresArray[3] @scoresArray[3] @* Third row *@ @scoresArray[4] @scoresArray[4] @scoresArray[5] @scoresArray[5] @scoresArray[6] @scoresArray[6] @* Fourth row (Crowns) *@ @scoresArray[7] @scoresArray[7] @scoresArray[8] @scoresArray[8] @scoresArray[9] @scoresArray[9] @* Forbidden one-liner : Changes the AchievementDisplayDifficulty image asset. When "Difficulty.None" is selected, Defaults to highest difficulty the player currently has crowns / Ranks for. *@ } @if (isSavingOptions) { Saving... } else { @Localizer["Save"] }
} } else { } @code { private async Task UpdateMyDonName() { @if (response is not null) await Js.InvokeVoidAsync("updateMyDonNameText", response.MyDonName); } private async Task UpdateTitle() { @if (response is not null) await Js.InvokeVoidAsync("updateTitleText", response.Title); } private async Task UpdateScoreboard(Difficulty difficulty) { UpdateScores(difficulty); await Js.InvokeVoidAsync("updateScoreboardText", scoresArray); } }