diff --git a/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml b/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml
index 99defc544c..0d4e464d0f 100644
--- a/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml
+++ b/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml
@@ -51,6 +51,8 @@
+
+
diff --git a/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml.cs b/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml.cs
index a97eee26fd..8372e3aa49 100644
--- a/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml.cs
+++ b/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml.cs
@@ -51,6 +51,8 @@ public sealed partial class AdminLogsControl : Control
public int SelectedRoundId => RoundSpinBox.Value;
public string Search => LogSearch.Text;
+ private int ShownLogs { get; set; }
+ private int TotalLogs { get; set; }
public HashSet SelectedTypes { get; } = new();
@@ -200,6 +202,8 @@ public sealed partial class AdminLogsControl : Control
private void UpdateLogs()
{
+ ShownLogs = 0;
+
foreach (var child in LogsContainer.Children)
{
if (child is not AdminLogLabel log)
@@ -208,7 +212,13 @@ public sealed partial class AdminLogsControl : Control
}
child.Visible = ShouldShowLog(log);
+ if (child.Visible)
+ {
+ ShownLogs++;
+ }
}
+
+ UpdateCount();
}
private bool ShouldShowType(AdminLogTypeButton button)
@@ -399,17 +409,41 @@ public sealed partial class AdminLogsControl : Control
var label = new AdminLogLabel(ref log, separator);
label.Visible = ShouldShowLog(label);
+ TotalLogs++;
+ if (label.Visible)
+ {
+ ShownLogs++;
+ }
+
LogsContainer.AddChild(label);
LogsContainer.AddChild(separator);
}
+
+ UpdateCount();
}
public void SetLogs(List logs)
{
LogsContainer.RemoveAllChildren();
+ UpdateCount(0, 0);
AddLogs(logs);
}
+ private void UpdateCount(int? shown = null, int? total = null)
+ {
+ if (shown != null)
+ {
+ ShownLogs = shown.Value;
+ }
+
+ if (total != null)
+ {
+ TotalLogs = total.Value;
+ }
+
+ Count.Text = Loc.GetString("admin-logs-count", ("showing", ShownLogs), ("total", TotalLogs));
+ }
+
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
diff --git a/Resources/Locale/en-US/administration/ui/admin-logs.ftl b/Resources/Locale/en-US/administration/ui/admin-logs.ftl
index 64f7d8c834..c5787eea0a 100644
--- a/Resources/Locale/en-US/administration/ui/admin-logs.ftl
+++ b/Resources/Locale/en-US/administration/ui/admin-logs.ftl
@@ -1,4 +1,5 @@
admin-logs-title = Admin Logs Panel
+admin-logs-count = Showing {$showing}/{$total}
admin-logs-pop-out = Pop Out
# Round