2020-04-14 12:58:03 +00:00
|
|
|
import React, { Component } from "react";
|
|
|
|
import { connect } from "react-redux";
|
|
|
|
import { RemoteService } from "../../remote";
|
2020-04-16 13:15:33 +00:00
|
|
|
import NewSceneDevice from "./NewSceneDevice";
|
|
|
|
import { Grid } from "semantic-ui-react";
|
2020-04-14 12:58:03 +00:00
|
|
|
|
|
|
|
class ScenesPanel extends Component {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2020-04-16 13:15:33 +00:00
|
|
|
return (
|
|
|
|
<Grid doubling columns={2} divided="vertically">
|
|
|
|
{
|
|
|
|
//TODO DISPLAY DEVICES IN SCENE
|
|
|
|
}
|
|
|
|
{this.props.isActiveDefaultScene ? (
|
|
|
|
<Grid.Column>
|
|
|
|
<NewSceneDevice />
|
|
|
|
</Grid.Column>
|
|
|
|
) : null}
|
|
|
|
</Grid>
|
|
|
|
);
|
2020-04-14 12:58:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const mapStateToProps = (state, _) => ({
|
2020-04-16 13:15:33 +00:00
|
|
|
get isActiveDefaultScene() {
|
|
|
|
return state.active.activeScene === -1;
|
|
|
|
},
|
|
|
|
activeScene: state.active.activeScene,
|
2020-04-14 12:58:03 +00:00
|
|
|
});
|
|
|
|
const ScenesPanelContainer = connect(
|
|
|
|
mapStateToProps,
|
|
|
|
RemoteService
|
|
|
|
)(ScenesPanel);
|
|
|
|
export default ScenesPanelContainer;
|