This commit is contained in:
Andre Beging
2024-11-06 16:00:26 +01:00
commit de76b1d432
42 changed files with 1922 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using Microsoft.AspNetCore.Components;
using Server.Data;
using Server.Model;
namespace Server.Components.Pages
{
public partial class SettingsPage : ComponentBase
{
#region Override SetParametersAsync
//// <inheritdoc />
public override async Task SetParametersAsync(ParameterView parameters)
{
parameters.SetParameterProperties(this);
await SettingsData.LoadAsync();
await base.SetParametersAsync(ParameterView.Empty);
}
#endregion
#region Private Method Save
/// <summary>
/// Asynchronously saves the current settings to a JSON file.
/// </summary>
/// <returns>A task that represents the asynchronous save operation.</returns>
private async Task Save() => await SettingsData.SaveAsync();
#endregion
}
}