From 268698a0810d72e7dade3091df251662d3dabded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Cape=C3=A1ns=20P=C3=A9rez?= Date: Tue, 21 Apr 2020 12:13:01 +0200 Subject: [PATCH] fix the wrong stuff in the bach I --- .../src/components/dashboard/DevicePanel.js | 7 ++- .../components/dashboard/devices/Device.js | 54 +++++++++++++++++-- .../dashboard/devices/DeviceSettingsModal.js | 21 ++++---- .../dashboard/devices/DimmerStyle.js | 2 + .../src/components/dashboard/devices/Light.js | 4 +- .../dashboard/devices/LightStyle.js | 2 + .../components/dashboard/devices/NewDevice.js | 1 + .../dashboard/devices/SensorStyle.js | 3 ++ .../dashboard/devices/SmartPlugStyle.js | 4 ++ .../dashboard/devices/SwitchStyle.js | 3 ++ .../dashboard/devices/styleComponents.js | 1 + smart-hut/src/store.js | 2 +- 12 files changed, 86 insertions(+), 18 deletions(-) diff --git a/smart-hut/src/components/dashboard/DevicePanel.js b/smart-hut/src/components/dashboard/DevicePanel.js index 449642e..2fb222d 100644 --- a/smart-hut/src/components/dashboard/DevicePanel.js +++ b/smart-hut/src/components/dashboard/DevicePanel.js @@ -24,7 +24,12 @@ class DevicePanel extends Component { render() { return ( - + {this.props.devices.map((e, i) => { return ( diff --git a/smart-hut/src/components/dashboard/devices/Device.js b/smart-hut/src/components/dashboard/devices/Device.js index d71c79e..a743318 100644 --- a/smart-hut/src/components/dashboard/devices/Device.js +++ b/smart-hut/src/components/dashboard/devices/Device.js @@ -5,7 +5,7 @@ import Sensor from "./Sensor"; import { ButtonDimmer, KnobDimmer } from "./Dimmer"; import Switcher from "./Switch"; import Videocam from "./Videocam"; -import { Segment, Grid, Header, Button, Icon } from "semantic-ui-react"; +import { Segment, Grid, Header, Button, Icon, Card } from "semantic-ui-react"; import { RemoteService } from "../../../remote"; import { connect } from "react-redux"; import DeviceSettingsModal from "./DeviceSettingsModal"; @@ -58,12 +58,48 @@ class Device extends React.Component { render() { return ( - + + + {this.props.device.name} + + + {this.renderDeviceComponent()} + + + +
+ + + {this.props.device.kind === "smartPlug" ? ( + + ) : null} + +
+
+ {/* {this.renderDeviceComponent()} {this.props.tab === "Devices" ? ( - -
{this.props.stateOrDevice.name}
+ +
{this.props.device.name}
+ + + + {this.props.device.kind === "smartPlug" ? (