Merge branch 'dev-copy' into 'dev'

Dev copy

See merge request sa4-2020/the-sanmarinoes/frontend!107
This commit is contained in:
Claudio Maggioni 2020-05-01 11:47:45 +02:00
commit 9d8524c7c9
5 changed files with 21 additions and 14 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -4,6 +4,10 @@
box-sizing: border-box; box-sizing: border-box;
} }
body {
overflow-y: hidden;
}
.container.curtain-container { .container.curtain-container {
position: relative; position: relative;
margin-top: 10%; margin-top: 10%;

View File

@ -207,7 +207,7 @@ class NewDevice extends Component {
key: "securityCamera", key: "securityCamera",
text: "Security Camera", text: "Security Camera",
value: "securityCamera", value: "securityCamera",
image: { avatar: true, src: "/img/plusMinus.svg" }, image: { avatar: true, src: "/img/security-icon.png" },
}, },
]; ];
const sensorOptions = [ const sensorOptions = [

View File

@ -2,16 +2,19 @@ import React from "react";
import Modal from "react-modal"; import Modal from "react-modal";
import { Button } from "semantic-ui-react"; import { Button } from "semantic-ui-react";
const ModalStyle = { const modal = {
content: { opacity: 0,
top: "20%", alignItems: "center",
left: "45%", display: "flex",
right: "auto", justifyContent: "center",
bottom: "auto", transition: "opacity 200ms ease-in-out",
marginRight: "-40%", background: "grey",
width: "80%", color: "white",
transform: "translate(-40%, -10%)", maxWidth: "2rem",
}, outline: "none",
padding: "2rem",
textAlign: "center",
maxHeight: "50vh",
}; };
const VideocamModal = (props) => ( const VideocamModal = (props) => (
@ -19,10 +22,10 @@ const VideocamModal = (props) => (
isOpen={!!props.selectedVideo} isOpen={!!props.selectedVideo}
contentLabel="Live Cam" contentLabel="Live Cam"
onRequestClose={props.closeModal} onRequestClose={props.closeModal}
style={ModalStyle} style={modal}
> >
{props.selectedVideo && ( {props.selectedVideo && (
<video autoPlay loop muted width="100%" height="auto"> <video autoPlay loop muted width="100%" height="90%">
<source src={props.url} type="video/mp4" /> <source src={props.url} type="video/mp4" />
</video> </video>
)} )}

View File

@ -21,7 +21,7 @@ class Dashboard extends Component {
super(props); super(props);
this.state = this.initialState; this.state = this.initialState;
this.setInitialState(); this.setInitialState();
this.activeTab = "Automations"; //TODO Remove this to not put automations first this.activeTab = "Devices";
this.selectTab = this.selectTab.bind(this); this.selectTab = this.selectTab.bind(this);
} }