refactor(app): split dashboard settings and layout into partial classes
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
namespace Duempelkas.App.Pages;
|
||||
|
||||
public partial class Settings
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string clubName = string.Empty;
|
||||
private bool saving;
|
||||
private bool saved;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Lifecycle
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
clubName = await SettingsService.GetClubNameAsync() ?? string.Empty;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Actions
|
||||
|
||||
private async Task Save()
|
||||
{
|
||||
saving = true;
|
||||
saved = false;
|
||||
await SettingsService.SetClubNameAsync(clubName);
|
||||
saved = true;
|
||||
saving = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user