Skip to content

Commit 60e4626

Browse files
Show NoHwid denies
1 parent 35422b8 commit 60e4626

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

SS14.Admin/Pages/Connections/Index.cshtml

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
<input type="checkbox" class="form-check-input" id="showIPChecks" name="showIPChecks" @(Model.ShowIPChecks ? "checked" : "") value="true">
4848
<label class="form-check-label" for="showIPChecks">IP Checks</label>
4949
</div>
50+
<div class="form-check col">
51+
<input type="checkbox" class="form-check-input" id="showNoHwId" name="showNoHwId" @(Model.ShowNoHwid ? "checked" : "") value="true">
52+
<label class="form-check-label" for="showNoHwId">No HWID</label>
53+
</div>
5054
</div>
5155
</form>
5256

SS14.Admin/Pages/Connections/Index.cshtml.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public class ConnectionsIndexModel : PageModel
2222
public bool ShowPanic { get; set; }
2323
public bool ShowBabyJail { get; set; }
2424
public bool ShowIPChecks { get; set; }
25+
public bool ShowNoHwid { get; set; }
2526

2627
public ConnectionsIndexModel(PostgresServerDbContext dbContext)
2728
{
@@ -40,7 +41,8 @@ public async Task OnGetAsync(
4041
bool showFull,
4142
bool showPanic,
4243
bool showBabyJail,
43-
bool showIPChecks)
44+
bool showIPChecks,
45+
bool showNoHwid)
4446
{
4547

4648
Pagination.Init(pageIndex, perPage, AllRouteData);
@@ -61,6 +63,7 @@ public async Task OnGetAsync(
6163
showPanic = true;
6264
showBabyJail = true;
6365
showIPChecks = true;
66+
showNoHwid = true;
6467
}
6568

6669
CurrentFilter = search;
@@ -71,6 +74,7 @@ public async Task OnGetAsync(
7174
ShowPanic = showPanic;
7275
ShowBabyJail = showBabyJail;
7376
ShowIPChecks = showIPChecks;
77+
ShowNoHwid = showNoHwid;
7478

7579
AllRouteData.Add("search", CurrentFilter);
7680
AllRouteData.Add("showAccepted", showAccepted.ToString());
@@ -98,6 +102,8 @@ public async Task OnGetAsync(
98102
acceptableDenies.Add(ConnectionDenyReason.BabyJail);
99103
if (showIPChecks)
100104
acceptableDenies.Add(ConnectionDenyReason.IPChecks);
105+
if (showNoHwid)
106+
acceptableDenies.Add(ConnectionDenyReason.NoHwId);
101107

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

0 commit comments

Comments
 (0)