55 lines
1.3 KiB
C#
55 lines
1.3 KiB
C#
using IOB_MAN.Core;
|
|
using IOB_MAN.Core.Services;
|
|
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.JSInterop;
|
|
|
|
namespace IOB_MAN.Components.Pages
|
|
{
|
|
public partial class Index
|
|
{
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected AppControlService ACService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected async Task ForceCheck()
|
|
{
|
|
ACService.DoAutoRestart(true);
|
|
await ACService.DoScan();
|
|
}
|
|
|
|
protected async Task SetupMode(bool reqSetup)
|
|
{
|
|
DoSetup = reqSetup;
|
|
if (!DoSetup)
|
|
{
|
|
await ForceCheck();
|
|
}
|
|
}
|
|
|
|
protected void ToggleSetup()
|
|
{
|
|
DoSetup = !DoSetup;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Properties
|
|
|
|
/// <summary>
|
|
/// Indica richiesta modifica setup applicazione
|
|
/// </summary>
|
|
private bool DoSetup { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Indica mancanza auth di primo e secondo livello e relativa necessità auth da server LiMan o da config esplicito locale
|
|
/// </summary>
|
|
private bool MissingAuth { get; set; } = false;
|
|
|
|
#endregion Private Properties
|
|
}
|
|
} |