Merge branch 'background-img' into 'dev'
new logo, image upload, image for background See merge request sa4-2020/the-sanmarinoes/frontend!68
This commit is contained in:
commit
db2916ac2a
5 changed files with 13 additions and 2 deletions
BIN
smart-hut/public/sm_logo.png
Normal file
BIN
smart-hut/public/sm_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
|
@ -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>
|
||||||
|
|
|
@ -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}>
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue