Aggiunta procedura logout
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<Calendario IdxDipendente="@idxDipendente"></Calendario>
|
||||
@if (idxDipendente <= 0)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
<Calendario IdxDipendente="@idxDipendente"></Calendario>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -75,13 +75,16 @@ namespace GPW.CORE.Smart.Pages
|
||||
authKey = _authKey;
|
||||
}
|
||||
}
|
||||
string devName = "";
|
||||
DateTime adesso = DateTime.Now;
|
||||
string dtData = $"{DateTime.UtcNow:yyyy-MM-dd_ZHH:mm:ss}";
|
||||
string devAgent = await JSRuntime.InvokeAsync<string>("getUserAgent");
|
||||
var dimension = await JSRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
|
||||
string screenSize = $"{dimension.Width}x{dimension.Height}";
|
||||
string devIp = await JSRuntime.InvokeAsync<string>("getIpAddress");
|
||||
IPAddress clientIP = IPAddress.Parse(devIp);
|
||||
IPHostEntry GetIPHost = Dns.GetHostEntry(clientIP);
|
||||
List<string> compName = GetIPHost.HostName.ToString().Split('.').ToList();
|
||||
string devName = compName != null && compName.Count > 0 ? compName[0] : "NA";
|
||||
string randData = SteamCrypto.RandomString(32, true);
|
||||
currDipList = await CDService.DipendentiGetAll();
|
||||
currDip = currDipList.Where(x => x.IdxDipendente == idxDipendente && x.AuthKey == authKey).FirstOrDefault();
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
@page "/LogOut"
|
||||
|
||||
<h3>LogOut Page</h3>
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
using GPW.CORE.Smart.Data;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace GPW.CORE.Smart.Pages
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper page x eseguire logout utente...
|
||||
/// </summary>
|
||||
public partial class LogOut
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected MessageService MService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager navManager { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
// salvo in messageservice valori nulli...
|
||||
await MService.setIdxDipAsync(-3);
|
||||
await MService.setDevSecretAsync("");
|
||||
MService.RigaDip = new CORE.Data.DbModels.DipendentiModel();
|
||||
// rimando a home
|
||||
navManager.NavigateTo("/");
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,8 @@ Pagina x richiesta registrazione nuovo device
|
||||
istruzioni x uso pagina jumper
|
||||
</p>
|
||||
|
||||
<p>aggiungere button x pagina LogOut (creata) ceh resetta dati utente (in storage...)</p>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user