new logo, image upload, image for background

This commit is contained in:
Nicola Brunner 2020-03-25 15:43:03 +01:00
parent 8952aea4bb
commit fba2321b55
5 changed files with 13 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View file

@ -17,7 +17,7 @@ const IconHomeImage = () => (
/> />
); );
const TitleImage = () => <Image src="title7.png" size="medium" centered />; const TitleImage = () => <Image src="sm_logo.png" size="medium" centered />;
const BrowserStructure = (props) => ( const BrowserStructure = (props) => (
<Grid columns="equal" divided inverted padded> <Grid columns="equal" divided inverted padded>

View file

@ -135,7 +135,11 @@ export default class DevicePanel extends Component {
mode: this.state.editMode, mode: this.state.editMode,
openModal: this.openModal, openModal: this.openModal,
}; };
var backGroundImg =
this.props.activeItem === -1 ? "" : this.props.room.image;
const ds = this.state.devices ? this.state.devices : this.props.devices; const ds = this.state.devices ? this.state.devices : this.props.devices;
return ( return (
<div style={panelStyle}> <div style={panelStyle}>
<button style={editButtonStyle} onClick={this.editModeController}> <button style={editButtonStyle} onClick={this.editModeController}>

View file

@ -15,7 +15,7 @@ export const editButtonStyle = {
export const panelStyle = { export const panelStyle = {
position: "relative", position: "relative",
backgroundColor: "#fafafa", backgroundColor: "black",
height: "100vh", height: "100vh",
width: "auto", width: "auto",
padding: "0rem 3rem", padding: "0rem 3rem",

View file

@ -152,6 +152,11 @@ export default class Dashboard extends Component {
console.log(err); console.log(err);
}); });
} }
this.state.rooms.forEach((item) => {
if (item.id === id) {
this.setState({ room: item });
}
});
} }
addDevice(data) { addDevice(data) {
@ -209,6 +214,7 @@ export default class Dashboard extends Component {
activeItem={this.state.activeItem} activeItem={this.state.activeItem}
addDevice={this.addDevice} addDevice={this.addDevice}
devices={this.state.devices} devices={this.state.devices}
room={this.state.room}
/> />
</Grid.Column> </Grid.Column>
</Grid.Row> </Grid.Row>
@ -242,6 +248,7 @@ export default class Dashboard extends Component {
addDevice={this.addDevice} addDevice={this.addDevice}
devices={this.state.devices} devices={this.state.devices}
updateDev={this.updateDeviceUi} updateDev={this.updateDeviceUi}
room={this.state.room}
/> />
</Grid.Column> </Grid.Column>
</Grid.Row> </Grid.Row>