diff --git a/.github/workflows/close-master-pr.yml b/.github/workflows/close-master-pr.yml index 66843d35dd6..51ce874dd07 100644 --- a/.github/workflows/close-master-pr.yml +++ b/.github/workflows/close-master-pr.yml @@ -1,4 +1,4 @@ -name: Close PR's on master +name: Close PRs on master on: pull_request_target: diff --git a/Content.Client/Actions/ActionsSystem.cs b/Content.Client/Actions/ActionsSystem.cs index 31d092b25d1..b992e772563 100644 --- a/Content.Client/Actions/ActionsSystem.cs +++ b/Content.Client/Actions/ActionsSystem.cs @@ -95,6 +95,7 @@ private void BaseHandleState(EntityUid uid, BaseActionComponent component, Ba component.Container = EnsureEntity(state.Container, uid); component.EntityIcon = EnsureEntity(state.EntityIcon, uid); component.CheckCanInteract = state.CheckCanInteract; + component.CheckConsciousness = state.CheckConsciousness; component.ClientExclusive = state.ClientExclusive; component.Priority = state.Priority; component.AttachedEntity = EnsureEntity(state.AttachedEntity, uid); diff --git a/Content.Client/Administration/UI/AdminRemarks/AdminMessageEui.cs b/Content.Client/Administration/UI/AdminRemarks/AdminMessageEui.cs index 06eace118d7..502c56a5a69 100644 --- a/Content.Client/Administration/UI/AdminRemarks/AdminMessageEui.cs +++ b/Content.Client/Administration/UI/AdminRemarks/AdminMessageEui.cs @@ -2,6 +2,7 @@ using Content.Shared.Administration.Notes; using Content.Shared.Eui; using JetBrains.Annotations; +using Robust.Client.UserInterface.Controls; using static Content.Shared.Administration.Notes.AdminMessageEuiMsg; namespace Content.Client.Administration.UI.AdminRemarks; @@ -14,9 +15,8 @@ public sealed class AdminMessageEui : BaseEui public AdminMessageEui() { _popup = new AdminMessagePopupWindow(); - _popup.OnAcceptPressed += () => SendMessage(new Accept()); - _popup.OnDismissPressed += () => SendMessage(new Dismiss()); - _popup.OnClose += () => SendMessage(new CloseEuiMessage()); + _popup.OnAcceptPressed += () => SendMessage(new Dismiss(true)); + _popup.OnDismissPressed += () => SendMessage(new Dismiss(false)); } public override void HandleState(EuiStateBase state) @@ -26,13 +26,17 @@ public override void HandleState(EuiStateBase state) return; } - _popup.SetMessage(s.Message); - _popup.SetDetails(s.AdminName, s.AddedOn); - _popup.Timer = s.Time; + _popup.SetState(s); } public override void Opened() { - _popup.OpenCentered(); + _popup.UserInterfaceManager.WindowRoot.AddChild(_popup); + LayoutContainer.SetAnchorPreset(_popup, LayoutContainer.LayoutPreset.Wide); + } + + public override void Closed() + { + _popup.Orphan(); } } diff --git a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupMessage.xaml b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupMessage.xaml new file mode 100644 index 00000000000..9a60a6f72ab --- /dev/null +++ b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupMessage.xaml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupMessage.xaml.cs b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupMessage.xaml.cs new file mode 100644 index 00000000000..7bb425f618e --- /dev/null +++ b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupMessage.xaml.cs @@ -0,0 +1,23 @@ +using Content.Shared.Administration.Notes; +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface; +using Robust.Client.UserInterface.XAML; +using Robust.Shared.Utility; + +namespace Content.Client.Administration.UI.AdminRemarks; + +[GenerateTypedNameReferences] +public sealed partial class AdminMessagePopupMessage : Control +{ + public AdminMessagePopupMessage(AdminMessageEuiState.Message message) + { + RobustXamlLoader.Load(this); + + Admin.SetMessage(FormattedMessage.FromMarkup(Loc.GetString( + "admin-notes-message-admin", + ("admin", message.AdminName), + ("date", message.AddedOn.ToLocalTime())))); + + Message.SetMessage(message.Text); + } +} diff --git a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml index 311829e8b2b..cc5207bb3a0 100644 --- a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml +++ b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml @@ -1,22 +1,36 @@ - - - - -