Better notes and bans (#14228)

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
This commit is contained in:
Riggle
2023-07-21 13:38:52 +02:00
committed by GitHub
parent c6cb6ad928
commit 579913b617
84 changed files with 9820 additions and 886 deletions

View File

@@ -0,0 +1,34 @@
using Content.Client.Administration.UI.Notes;
using Content.Client.Eui;
using Content.Shared.Administration.Notes;
using Content.Shared.Eui;
using JetBrains.Annotations;
namespace Content.Client.Administration.UI.AdminRemarks;
[UsedImplicitly]
public sealed class UserNotesEui : BaseEui
{
public UserNotesEui()
{
NoteWindow = new AdminRemarksWindow();
NoteWindow.OnClose += () => SendMessage(new CloseEuiMessage());
}
private AdminRemarksWindow NoteWindow { get; }
public override void HandleState(EuiStateBase state)
{
if (state is not UserNotesEuiState s)
{
return;
}
NoteWindow.SetNotes(s.Notes);
}
public override void Opened()
{
NoteWindow.OpenCentered();
}
}