diff --git a/smart-hut/src/components/HeaderController.js b/smart-hut/src/components/HeaderController.js index 6c797ab..f67edfe 100644 --- a/smart-hut/src/components/HeaderController.js +++ b/smart-hut/src/components/HeaderController.js @@ -58,7 +58,7 @@ export class MyHeader extends React.Component { - + @@ -68,7 +68,7 @@ export class MyHeader extends React.Component { - + } checked={this.props.cameraEnabled} toggle onChange={(e, val) => this.setCameraEnabled(val.checked)} /> + @@ -104,6 +108,15 @@ export class MyHeader extends React.Component { + + Share cameras} + checked={this.props.cameraEnabled} + toggle + onChange={(e, val) => this.setCameraEnabled(val.checked)} + /> + diff --git a/smart-hut/src/components/dashboard/devices/Curtains.css b/smart-hut/src/components/dashboard/devices/Curtains.css index 5d1939b..c4ec319 100644 --- a/smart-hut/src/components/dashboard/devices/Curtains.css +++ b/smart-hut/src/components/dashboard/devices/Curtains.css @@ -4,10 +4,6 @@ box-sizing: border-box; } -body { - overflow-y: hidden; -} - .container.curtain-container { position: relative; margin-top: 10%; diff --git a/smart-hut/src/components/dashboard/devices/Thermostats.js b/smart-hut/src/components/dashboard/devices/Thermostats.js index 9ec24ff..fcab8a6 100644 --- a/smart-hut/src/components/dashboard/devices/Thermostats.js +++ b/smart-hut/src/components/dashboard/devices/Thermostats.js @@ -164,7 +164,10 @@ class Thermostats extends Component { const mapStateToProps2 = (state, ownProps) => ({ ...mapStateToProps(state, ownProps), get tempSensorsInRoom() { - const deviceIds = state.rooms[state.devices[ownProps.id].roomId].devices; + if (state.active.activeTab !== "Devices") return false; + const room = state.rooms[state.devices[ownProps.id].roomId]; + if (!room) return false; + const deviceIds = room.devices; const devices = [...deviceIds].map((id) => state.devices[id]); const sensors = devices.filter( (d) => d.kind === "sensor" && d.sensor === "TEMPERATURE" diff --git a/smart-hut/src/views/Dashboard.js b/smart-hut/src/views/Dashboard.js index ab2c952..45cec4a 100644 --- a/smart-hut/src/views/Dashboard.js +++ b/smart-hut/src/views/Dashboard.js @@ -85,12 +85,12 @@ class Dashboard extends Component {
- + - +