diff --git a/GPW.CORE.SMART/Pages/Index.razor b/GPW.CORE.SMART/Pages/Index.razor index 9e5c6e2..9e97b08 100644 --- a/GPW.CORE.SMART/Pages/Index.razor +++ b/GPW.CORE.SMART/Pages/Index.razor @@ -8,6 +8,13 @@
- + @if (idxDipendente <= 0) + { + + } + else + { + + }
diff --git a/GPW.CORE.SMART/Pages/Jumper.razor.cs b/GPW.CORE.SMART/Pages/Jumper.razor.cs index 260cc5c..239b321 100644 --- a/GPW.CORE.SMART/Pages/Jumper.razor.cs +++ b/GPW.CORE.SMART/Pages/Jumper.razor.cs @@ -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("getUserAgent"); var dimension = await JSRuntime.InvokeAsync("getWindowDimensions"); string screenSize = $"{dimension.Width}x{dimension.Height}"; string devIp = await JSRuntime.InvokeAsync("getIpAddress"); + IPAddress clientIP = IPAddress.Parse(devIp); + IPHostEntry GetIPHost = Dns.GetHostEntry(clientIP); + List 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(); diff --git a/GPW.CORE.SMART/Pages/LogOut.razor b/GPW.CORE.SMART/Pages/LogOut.razor new file mode 100644 index 0000000..669af1b --- /dev/null +++ b/GPW.CORE.SMART/Pages/LogOut.razor @@ -0,0 +1,5 @@ +@page "/LogOut" + +

LogOut Page

+ + diff --git a/GPW.CORE.SMART/Pages/LogOut.razor.cs b/GPW.CORE.SMART/Pages/LogOut.razor.cs new file mode 100644 index 0000000..60b15b5 --- /dev/null +++ b/GPW.CORE.SMART/Pages/LogOut.razor.cs @@ -0,0 +1,35 @@ +using GPW.CORE.Smart.Data; +using Microsoft.AspNetCore.Components; + +namespace GPW.CORE.Smart.Pages +{ + /// + /// Helper page x eseguire logout utente... + /// + 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 + } +} \ No newline at end of file diff --git a/GPW.CORE.SMART/Pages/RegNewDevice.razor b/GPW.CORE.SMART/Pages/RegNewDevice.razor index 0ae2471..e8f4df2 100644 --- a/GPW.CORE.SMART/Pages/RegNewDevice.razor +++ b/GPW.CORE.SMART/Pages/RegNewDevice.razor @@ -15,6 +15,8 @@ Pagina x richiesta registrazione nuovo device istruzioni x uso pagina jumper

+

aggiungere button x pagina LogOut (creata) ceh resetta dati utente (in storage...)

+ @code { }