Fix Telecomms machine browser and log browser.

This commit is contained in:
Casey
2022-06-04 12:18:57 -04:00
committed by CHOMPStation2
parent ee099334c3
commit 4194d7d3e6
5 changed files with 18 additions and 14 deletions

View File

@@ -26,13 +26,13 @@
data["network"] = network data["network"] = network
data["temp"] = temp data["temp"] = temp
var/list/servers = list() var/list/serverData = list()
for(var/obj/machinery/telecomms/T in servers) for(var/obj/machinery/telecomms/T in servers)
servers.Add(list(list( serverData.Add(list(list(
"id" = T.id, "id" = T.id,
"name" = T.name, "name" = T.name,
))) )))
data["servers"] = servers data["servers"] = serverData
data["selectedServer"] = null data["selectedServer"] = null
if(SelectedServer) if(SelectedServer)

View File

@@ -26,13 +26,13 @@
data["network"] = network data["network"] = network
data["temp"] = temp data["temp"] = temp
var/list/machinelist = list() var/list/machinelistData = list()
for(var/obj/machinery/telecomms/T in machinelist) for(var/obj/machinery/telecomms/T in machinelist)
machinelist.Add(list(list( machinelistData.Add(list(list(
"id" = T.id, "id" = T.id,
"name" = T.name, "name" = T.name,
))) )))
data["machinelist"] = machinelist data["machinelist"] = machinelistData
data["selectedMachine"] = null data["selectedMachine"] = null
if(SelectedMachine) if(SelectedMachine)

View File

@@ -21,10 +21,10 @@ export const TelecommsLogBrowser = (props, context) => {
height={450} height={450}
resizable> resizable>
<Window.Content scrollable> <Window.Content scrollable>
{(temp && temp.length) ? ( {temp ? (
<NoticeBox warning> <NoticeBox danger={temp.color === "bad"} warning={temp.color !== "bad"}>
<Box display="inline-box" verticalAlign="middle"> <Box display="inline-box" verticalAlign="middle">
{temp} {temp.text}
</Box> </Box>
<Button <Button
icon="times-circle" icon="times-circle"
@@ -97,7 +97,7 @@ const TelecommsServerSelection = (props, context) => {
} }
return ( return (
<Section title="Detected Telecommunication Servers"> <Section title="Detected Telecommunications Servers">
<LabeledList> <LabeledList>
{servers.map(server => ( {servers.map(server => (
<LabeledList.Item <LabeledList.Item

View File

@@ -20,10 +20,10 @@ export const TelecommsMachineBrowser = (props, context) => {
height={450} height={450}
resizable> resizable>
<Window.Content scrollable> <Window.Content scrollable>
{(temp && temp.length) ? ( {temp ? (
<NoticeBox warning> <NoticeBox danger={temp.color === "bad"} warning={temp.color !== "bad"}>
<Box display="inline-box" verticalAlign="middle"> <Box display="inline-box" verticalAlign="middle">
{temp} {temp.text}
</Box> </Box>
<Button <Button
icon="times-circle" icon="times-circle"

File diff suppressed because one or more lines are too long