Add user name functionality
This commit is contained in:
parent
1f8726c46a
commit
5b6559620b
@ -19,4 +19,6 @@ public class UserSetting
|
||||
public PlaySetting PlaySetting { get; set; } = new();
|
||||
|
||||
public int NotesPosition { get; set; }
|
||||
|
||||
public string MyDonName { get; set; } = String.Empty;
|
||||
}
|
@ -35,7 +35,8 @@ public class UserSettingsController : BaseController<UserSettingsController>
|
||||
IsSkipOn = user.IsSkipOn,
|
||||
NotesPosition = user.NotesPosition,
|
||||
PlaySetting = PlaySettingConverter.ShortToPlaySetting(user.OptionSetting),
|
||||
ToneId = user.SelectedToneId
|
||||
ToneId = user.SelectedToneId,
|
||||
MyDonName = user.MyDonName
|
||||
};
|
||||
return Ok(response);
|
||||
}
|
||||
@ -58,6 +59,7 @@ public class UserSettingsController : BaseController<UserSettingsController>
|
||||
user.SelectedToneId = userSetting.ToneId;
|
||||
user.AchievementDisplayDifficulty = userSetting.AchievementDisplayDifficulty;
|
||||
user.OptionSetting = PlaySettingConverter.PlaySettingToShort(userSetting.PlaySetting);
|
||||
user.MyDonName = userSetting.MyDonName;
|
||||
|
||||
context.Update(user);
|
||||
await context.SaveChangesAsync();
|
||||
|
@ -16,7 +16,7 @@
|
||||
<MudStack Spacing="6">
|
||||
<h2>Profile Options</h2>
|
||||
|
||||
<MudTextField @bind-Value="name" Label="Name" Variant="Variant.Outlined"></MudTextField>
|
||||
<MudTextField @bind-Value="@response.MyDonName" Label="Name" Variant="Variant.Outlined"></MudTextField>
|
||||
|
||||
<MudSelect @bind-Value="@response.IsDisplayAchievement"
|
||||
Label="Is Display Achievement Panel">
|
||||
@ -117,8 +117,6 @@
|
||||
|
||||
private bool isSavingOptions;
|
||||
|
||||
private string name = "DON-Chan";
|
||||
|
||||
private readonly string[] speedStrings = { "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9",
|
||||
"2.0", "2.5", "3.0", "3.5", "4.0"};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user