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) => (
<Grid columns="equal" divided inverted padded>

View File

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

View File

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

View File

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