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:
Matteo Omenetti 2020-03-25 15:46:15 +01:00
commit db2916ac2a
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>