-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Some code refactor / cleanup - new color scheme - update packages
- Loading branch information
Showing
39 changed files
with
2,574 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[*.cs] | ||
|
||
# S112: General exceptions should never be thrown | ||
dotnet_diagnostic.S112.severity = none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@inherits MudComponentBase | ||
@if (LapsInfo != null) | ||
{ | ||
<MudStack Spacing="2"> | ||
<MudField Label="Password" Variant="Variant.Text" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Outlined.Password" AdornmentColor="Color.Default" aria-label="LAPS Password">@LapsInfo.Password</MudField> | ||
@if (LapsInfo.Account != null) | ||
{ | ||
<MudField Label="Account" Variant="Variant.Text" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Outlined.AccountCircle" AdornmentColor="Color.Default" aria-label="LAPS Managed Account">@LapsInfo.Account</MudField> | ||
} | ||
@if (LapsInfo.PasswordSetDate != null) | ||
{ | ||
<MudField Label="Set Date" Variant="Variant.Text" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Outlined.MoreTime" AdornmentColor="Color.Default" aria-label="LAPS Password Set Date">@LapsInfo.PasswordSetDate</MudField> | ||
} | ||
<MudField Label="Expire Date" Variant="Variant.Text" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Outlined.HourglassBottom" AdornmentColor="Color.Default" aria-label="LAPS Password Expire Date">@LapsInfo.PasswordExpireDate</MudField> | ||
</MudStack> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using LAPS_WebUI.Models; | ||
using Microsoft.AspNetCore.Components; | ||
using MudBlazor; | ||
|
||
namespace LAPS_WebUI.Components | ||
{ | ||
public partial class LapsInformationDetail : MudComponentBase | ||
{ | ||
[Parameter] public LapsInformation? LapsInfo { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Runtime.Intrinsics; | ||
|
||
namespace LAPS_WebUI.Enums | ||
{ | ||
public enum LAPSVersion | ||
{ | ||
v1, | ||
v2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using LAPS_WebUI.Enums; | ||
|
||
namespace LAPS_WebUI.Models | ||
{ | ||
public class LapsInformation | ||
{ | ||
public string? Password { get; set; } | ||
public string? Account { get; set; } | ||
public DateTime? PasswordExpireDate { get; set; } | ||
public DateTime? PasswordSetDate { get; set; } | ||
public LAPSVersion? Version { get; set; } | ||
public bool IsCurrent { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using LAPS_WebUI.Enums; | ||
|
||
namespace LAPS_WebUI.Models | ||
{ | ||
public class LapsOptions | ||
{ | ||
public LAPSVersion? ForceVersion { get; set; } | ||
public bool EncryptionDisabled { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace LAPS_WebUI.Models | ||
{ | ||
public class MsLAPSPayload | ||
{ | ||
[JsonPropertyName("n")] | ||
public string? ManagedAccountName { get; set; } | ||
|
||
[JsonPropertyName("t")] | ||
public string? PasswordUpdateTime { get; set; } | ||
|
||
[JsonPropertyName("p")] | ||
public string? Password { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
@page "/" | ||
@inject ISessionManagerService sessionManager | ||
@inject NavigationManager NavigationManager | ||
@code{ | ||
|
||
protected override async Task OnAfterRenderAsync(bool firstRender) | ||
{ | ||
// redirect to home if already logged in | ||
if (await sessionManager.IsUserLoggedInAsync()) | ||
{ | ||
NavigationManager.NavigateTo("/laps"); | ||
} | ||
else | ||
{ | ||
NavigationManager.NavigateTo("/login"); | ||
} | ||
} | ||
|
||
} | ||
@inject NavigationManager NavigationManager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace LAPS_WebUI.Pages | ||
{ | ||
public partial class Index | ||
{ | ||
protected override async Task OnAfterRenderAsync(bool firstRender) | ||
{ | ||
// redirect to home if already logged in | ||
if (await sessionManager.IsUserLoggedInAsync()) | ||
{ | ||
NavigationManager.NavigateTo("/laps"); | ||
} | ||
else | ||
{ | ||
NavigationManager.NavigateTo("/login"); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.