From b20fcf51411761710a7289765d216bd3980ded35 Mon Sep 17 00:00:00 2001 From: Arimah Greene <30327355+arimah@users.noreply.github.com> Date: Mon, 25 Dec 2023 02:08:15 +0100 Subject: [PATCH] Add a 'Copy' button to the fax UI (#22027) * Add a 'Copy' button to the fax UI * Add ValidatePrototypeId attribute Co-authored-by: Kara --------- Co-authored-by: Kara --- Content.Client/Fax/UI/FaxBoundUi.cs | 6 +++ Content.Client/Fax/UI/FaxWindow.xaml | 4 ++ Content.Client/Fax/UI/FaxWindow.xaml.cs | 3 ++ Content.Server/Fax/FaxSystem.cs | 58 +++++++++++++++++++++++-- Content.Shared/Fax/SharedFax.cs | 8 ++++ Resources/Locale/en-US/fax/fax.ftl | 1 + 6 files changed, 76 insertions(+), 4 deletions(-) diff --git a/Content.Client/Fax/UI/FaxBoundUi.cs b/Content.Client/Fax/UI/FaxBoundUi.cs index ab6f170639..ef6661b3ef 100644 --- a/Content.Client/Fax/UI/FaxBoundUi.cs +++ b/Content.Client/Fax/UI/FaxBoundUi.cs @@ -22,6 +22,7 @@ public sealed class FaxBoundUi : BoundUserInterface _window.OpenCentered(); _window.OnClose += Close; + _window.CopyButtonPressed += OnCopyButtonPressed; _window.SendButtonPressed += OnSendButtonPressed; _window.RefreshButtonPressed += OnRefreshButtonPressed; _window.PeerSelected += OnPeerSelected; @@ -32,6 +33,11 @@ public sealed class FaxBoundUi : BoundUserInterface SendMessage(new FaxSendMessage()); } + private void OnCopyButtonPressed() + { + SendMessage(new FaxCopyMessage()); + } + private void OnRefreshButtonPressed() { SendMessage(new FaxRefreshMessage()); diff --git a/Content.Client/Fax/UI/FaxWindow.xaml b/Content.Client/Fax/UI/FaxWindow.xaml index 7b68316b11..1e6ef23376 100644 --- a/Content.Client/Fax/UI/FaxWindow.xaml +++ b/Content.Client/Fax/UI/FaxWindow.xaml @@ -20,6 +20,10 @@ +