Admin notes (#7259)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
66
Content.Shared/Administration/Notes/AdminNotesEuiState.cs
Normal file
66
Content.Shared/Administration/Notes/AdminNotesEuiState.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using Content.Shared.Eui;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Administration.Notes;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class AdminNotesEuiState : EuiStateBase
|
||||
{
|
||||
public AdminNotesEuiState(string notedPlayerName, Dictionary<int, SharedAdminNote> notes, bool canCreate, bool canDelete, bool canEdit)
|
||||
{
|
||||
NotedPlayerName = notedPlayerName;
|
||||
Notes = notes;
|
||||
CanCreate = canCreate;
|
||||
CanDelete = canDelete;
|
||||
CanEdit = canEdit;
|
||||
}
|
||||
|
||||
public string NotedPlayerName { get; }
|
||||
public Dictionary<int, SharedAdminNote> Notes { get; }
|
||||
public bool CanCreate { get; }
|
||||
public bool CanDelete { get; }
|
||||
public bool CanEdit { get; }
|
||||
}
|
||||
|
||||
public static class AdminNoteEuiMsg
|
||||
{
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class Close : EuiMessageBase
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class CreateNoteRequest : EuiMessageBase
|
||||
{
|
||||
public CreateNoteRequest(string message)
|
||||
{
|
||||
Message = message;
|
||||
}
|
||||
|
||||
public string Message { get; set; }
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class DeleteNoteRequest : EuiMessageBase
|
||||
{
|
||||
public DeleteNoteRequest(int id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class EditNoteRequest : EuiMessageBase
|
||||
{
|
||||
public EditNoteRequest(int id, string message)
|
||||
{
|
||||
Id = id;
|
||||
Message = message;
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user