Skip to content

Commit

Permalink
Show NoHwid denies
Browse files Browse the repository at this point in the history
  • Loading branch information
nikthechampiongr committed Feb 20, 2025
1 parent 35422b8 commit 60e4626
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions SS14.Admin/Pages/Connections/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
<input type="checkbox" class="form-check-input" id="showIPChecks" name="showIPChecks" @(Model.ShowIPChecks ? "checked" : "") value="true">
<label class="form-check-label" for="showIPChecks">IP Checks</label>
</div>
<div class="form-check col">
<input type="checkbox" class="form-check-input" id="showNoHwId" name="showNoHwId" @(Model.ShowNoHwid ? "checked" : "") value="true">
<label class="form-check-label" for="showNoHwId">No HWID</label>
</div>
</div>
</form>

Expand Down
8 changes: 7 additions & 1 deletion SS14.Admin/Pages/Connections/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class ConnectionsIndexModel : PageModel
public bool ShowPanic { get; set; }
public bool ShowBabyJail { get; set; }
public bool ShowIPChecks { get; set; }
public bool ShowNoHwid { get; set; }

public ConnectionsIndexModel(PostgresServerDbContext dbContext)
{
Expand All @@ -40,7 +41,8 @@ public async Task OnGetAsync(
bool showFull,
bool showPanic,
bool showBabyJail,
bool showIPChecks)
bool showIPChecks,
bool showNoHwid)
{

Pagination.Init(pageIndex, perPage, AllRouteData);
Expand All @@ -61,6 +63,7 @@ public async Task OnGetAsync(
showPanic = true;
showBabyJail = true;
showIPChecks = true;
showNoHwid = true;
}

CurrentFilter = search;
Expand All @@ -71,6 +74,7 @@ public async Task OnGetAsync(
ShowPanic = showPanic;
ShowBabyJail = showBabyJail;
ShowIPChecks = showIPChecks;
ShowNoHwid = showNoHwid;

AllRouteData.Add("search", CurrentFilter);
AllRouteData.Add("showAccepted", showAccepted.ToString());
Expand Down Expand Up @@ -98,6 +102,8 @@ public async Task OnGetAsync(
acceptableDenies.Add(ConnectionDenyReason.BabyJail);
if (showIPChecks)
acceptableDenies.Add(ConnectionDenyReason.IPChecks);
if (showNoHwid)
acceptableDenies.Add(ConnectionDenyReason.NoHwId);

Check failure on line 106 in SS14.Admin/Pages/Connections/Index.cshtml.cs

View workflow job for this annotation

GitHub Actions / build

'ConnectionDenyReason' does not contain a definition for 'NoHwId'

Check failure on line 106 in SS14.Admin/Pages/Connections/Index.cshtml.cs

View workflow job for this annotation

GitHub Actions / build

'ConnectionDenyReason' does not contain a definition for 'NoHwId'

logQuery = logQuery.Where(c => acceptableDenies.Contains(c.Denied));

Expand Down

0 comments on commit 60e4626

Please sign in to comment.