From c3d7ecace683741d71781707ca41ff451e38f009 Mon Sep 17 00:00:00 2001 From: Flipp Syder <76629141+vulppine@users.noreply.github.com> Date: Mon, 5 Sep 2022 18:22:39 -0700 Subject: [PATCH] Adds a link limit and UI to device list (#11017) * adds a link limit to device list * locale strings * uhhh what's efcore doing there * adds a UI for device list on the device * merge conflict fixing --- .../NetworkConfiguratorBoundUserInterface.cs | 11 +++- .../NetworkConfiguratorConfigurationMenu.xaml | 3 + ...tworkConfiguratorConfigurationMenu.xaml.cs | 9 ++- .../NetworkConfiguratorDeviceList.xaml | 9 +++ .../NetworkConfiguratorDeviceList.xaml.cs | 58 +++++++++++++++++++ .../NetworkConfiguratorListMenu.xaml | 9 +-- .../NetworkConfiguratorListMenu.xaml.cs | 44 +------------- .../Systems/NetworkConfiguratorSystem.cs | 30 ++++++++-- .../Components/DeviceListComponent.cs | 7 +++ .../NetworkConfiguratorUserInterfaceState.cs | 11 ++++ .../Systems/SharedDeviceListSystem.cs | 26 +++++++-- .../en-US/devices/network-configurator.ftl | 2 + 12 files changed, 156 insertions(+), 63 deletions(-) create mode 100644 Content.Client/NetworkConfigurator/NetworkConfiguratorDeviceList.xaml create mode 100644 Content.Client/NetworkConfigurator/NetworkConfiguratorDeviceList.xaml.cs diff --git a/Content.Client/NetworkConfigurator/NetworkConfiguratorBoundUserInterface.cs b/Content.Client/NetworkConfigurator/NetworkConfiguratorBoundUserInterface.cs index 168615ca0b..74b2732826 100644 --- a/Content.Client/NetworkConfigurator/NetworkConfiguratorBoundUserInterface.cs +++ b/Content.Client/NetworkConfigurator/NetworkConfiguratorBoundUserInterface.cs @@ -75,8 +75,15 @@ public sealed class NetworkConfiguratorBoundUserInterface : BoundUserInterface { base.UpdateState(state); - var castState = (NetworkConfiguratorUserInterfaceState) state; - _listMenu?.UpdateState(castState); + switch (state) + { + case NetworkConfiguratorUserInterfaceState configState: + _listMenu?.UpdateState(configState); + break; + case DeviceListUserInterfaceState listState: + _configurationMenu?.UpdateState(listState); + break; + } } protected override void ReceiveMessage(BoundUserInterfaceMessage message) diff --git a/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml b/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml index 7be6c47b7a..950bb14604 100644 --- a/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml +++ b/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml @@ -1,7 +1,9 @@  +