* Add admin ui tests * fix notes test * Apply suggestions from code review --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
28 lines
793 B
C#
28 lines
793 B
C#
using Content.Server.Administration.Logs;
|
|
using Content.Server.EUI;
|
|
using Content.Shared.Administration;
|
|
using Robust.Shared.Console;
|
|
|
|
namespace Content.Server.Administration.Commands;
|
|
|
|
[AdminCommand(AdminFlags.Logs)]
|
|
public sealed class OpenAdminLogsCommand : LocalizedEntityCommands
|
|
{
|
|
[Dependency] private readonly EuiManager _euiManager = default!;
|
|
|
|
public override string Command => Cmd;
|
|
public const string Cmd = "adminlogs";
|
|
|
|
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
{
|
|
if (shell.Player is not { } player)
|
|
{
|
|
shell.WriteError(Loc.GetString("shell-cannot-run-command-from-server"));
|
|
return;
|
|
}
|
|
|
|
var ui = new AdminLogsEui();
|
|
_euiManager.OpenEui(ui, player);
|
|
}
|
|
}
|