diff --git a/client/public/cardIcons/Interface.svg b/client/public/cardIcons/Interface.svg
new file mode 100644
index 000000000..304d5cf85
--- /dev/null
+++ b/client/public/cardIcons/Interface.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/client/src/components/client/simulatorData.js b/client/src/components/client/simulatorData.js
index be9e0d640..459281eac 100644
--- a/client/src/components/client/simulatorData.js
+++ b/client/src/components/client/simulatorData.js
@@ -75,6 +75,7 @@ class SimulatorData extends Component {
const { simulators } = data;
if (loading || !simulators) return null;
if (!simulators[0]) return
{
diff --git a/client/src/components/layouts/LayoutEpsilon/cardSwitcher.js b/client/src/components/layouts/LayoutEpsilon/cardSwitcher.js
index 6a5f75c62..e8ddf3238 100644
--- a/client/src/components/layouts/LayoutEpsilon/cardSwitcher.js
+++ b/client/src/components/layouts/LayoutEpsilon/cardSwitcher.js
@@ -1,7 +1,7 @@
import React, { Component } from "react";
const spregex = /.*.{8}-.{4}-.{4}-.{4}-.{12}/gi;
-const intregex = /interface-.{8}-.{4}-.{4}-.{4}-.{12}/gi;
+const intregex = /interface-id:.{8}-.{4}-.{4}-.{4}-.{12}/gi;
class CardSwitcher extends Component {
state = {};
render() {
diff --git a/client/src/components/layouts/LayoutLine/cardSwitcher.js b/client/src/components/layouts/LayoutLine/cardSwitcher.js
index e68439709..5585bdd67 100644
--- a/client/src/components/layouts/LayoutLine/cardSwitcher.js
+++ b/client/src/components/layouts/LayoutLine/cardSwitcher.js
@@ -2,7 +2,7 @@ import React, { Component, Fragment } from "react";
import { Tooltip } from "reactstrap";
const spregex = /.*.{8}-.{4}-.{4}-.{4}-.{12}/gi;
-const intregex = /interface-.{8}-.{4}-.{4}-.{4}-.{12}/gi;
+const intregex = /interface-id:.{8}-.{4}-.{4}-.{4}-.{12}/gi;
class CardButton extends Component {
state = {};
card = React.createRef();
diff --git a/client/src/components/layouts/cardRenderer.js b/client/src/components/layouts/cardRenderer.js
index 6b456f548..5a0dd8f58 100644
--- a/client/src/components/layouts/cardRenderer.js
+++ b/client/src/components/layouts/cardRenderer.js
@@ -30,7 +30,7 @@ export default function renderCards(props) {
function getCompName(name) {
const cleanedName = name
.replace("software-panel-", "")
- .replace("interface-", "");
+ .replace("interface-id:", "");
if (props.simulator.panels.includes(cleanedName)) {
return "SoftwarePanels";
}
@@ -60,7 +60,7 @@ export default function renderCards(props) {
return (
diff --git a/client/src/components/views/DamageControl/core.js b/client/src/components/views/DamageControl/core.js
index 63e8a3dd2..7cb3f5376 100644
--- a/client/src/components/views/DamageControl/core.js
+++ b/client/src/components/views/DamageControl/core.js
@@ -184,6 +184,17 @@ class DamageControlCore extends Component {
});
//this.toggleDamage(e, s, true)
};
+ renderEngineSpeed = system => {
+ if (system.type !== "Engine") return null;
+ const engines = this.props.data.engines;
+ const engine = engines.find(e => e.id === system.id);
+ const speedIndex =
+ system.power.powerLevels.filter(p => p <= system.power.power).length - 1;
+ const maxSpeed = engine.speeds[speedIndex]
+ ? engine.speeds[speedIndex].number
+ : 0;
+ return `(${maxSpeed})`;
+ };
damageOption = (e, option) => {
const { system } = this.state.context;
if (option === "destroy") {
@@ -287,7 +298,7 @@ class DamageControlCore extends Component {
onContextMenu={e => this.setContext(e, s)}
style={this.systemStyle(s)}
>
- {this.systemName(s)}
+ {this.systemName(s)} {this.renderEngineSpeed(s)}
{(s.power.power || s.power.power === 0) && (
@@ -418,6 +429,12 @@ const SYSTEMS_QUERY = gql`
reactors(simulatorId: $simulatorId) {
...PowerData
}
+ engines(simulatorId: $simulatorId) {
+ id
+ speeds {
+ number
+ }
+ }
systems(simulatorId: $simulatorId) {
id
name
diff --git a/client/src/components/views/Interfaces/interfaces.js b/client/src/components/views/Interfaces/interfaces.js
index d86308653..73249991f 100644
--- a/client/src/components/views/Interfaces/interfaces.js
+++ b/client/src/components/views/Interfaces/interfaces.js
@@ -1,5 +1,5 @@
import React, { Component } from "react";
-
+import "./style.scss";
import * as comps from "./components";
function parseComponents({ components, config, values }) {
@@ -23,6 +23,7 @@ class Interfaces extends Component {
const components = parseComponents(iFace);
return (
);
}
}
diff --git a/client/src/components/views/TractorBeam/style.scss b/client/src/components/views/TractorBeam/style.scss
index 9db6b45ad..f51076e98 100644
--- a/client/src/components/views/TractorBeam/style.scss
+++ b/client/src/components/views/TractorBeam/style.scss
@@ -75,9 +75,8 @@
}
.tractor-beam-core {
label {
- display: block;
- float: left;
- width: 100%;
+ width: 90%;
+ margin-right: 20px;
}
}
diff --git a/client/src/containers/FlightDirector/SetConfig.js b/client/src/containers/FlightDirector/SetConfig.js
index ef465e6fc..b720c135e 100644
--- a/client/src/containers/FlightDirector/SetConfig.js
+++ b/client/src/containers/FlightDirector/SetConfig.js
@@ -359,7 +359,9 @@ class SetConfig extends Component {
}
return (
- Keyboards
+
+ Keyboards
+
{keyboard.map(k => (
-
- Mobile
- {mobileScreens.map(k => (
-
- this.setState({
- selectedStation: `mobile:${k}`
- })
+
- {k}
+ interfaces {
+ id
+ name
+ }
+ }
+ `}
+ variables={{ id: selectedSimulator }}
+ >
+ {({ loading, data }) => {
+ if (!data.simulators) return null;
+ const interfaces = data.simulators[0].interfaces
+ .map(i => data.interfaces.find(ii => ii.id === i))
+ .filter(Boolean);
+ if (loading || interfaces.length === 0) {
+ return null;
+ }
+ return (
+
+
+ Interfaces
+
+ {interfaces.map(k => (
+
+ this.setState({
+ selectedStation: `interface-id:${k.id}`
+ })
+ }
+ >
+ {k.name}
+
+ ))}
+
+ );
+ }}
+
+ {mobileScreens.length > 0 ? (
+
+
+ Mobile
- ))}
-
+ {mobileScreens
+ .filter(k => k !== "Interfaces")
+ .map(k => (
+
+ this.setState({
+ selectedStation: `mobile:${k}`
+ })
+ }
+ >
+ {k}
+
+ ))}
+
+ ) : null}
)}
@@ -408,11 +464,13 @@ class SetConfig extends Component {
|