Merge branch 'fix-brunny' into 'dev'

fix di brunner

See merge request sa4-2020/the-sanmarinoes/frontend!129
This commit is contained in:
Claudio Maggioni 2020-05-06 13:47:46 +02:00
commit 717734fecb
4 changed files with 42 additions and 19 deletions

View file

@ -1,7 +1,7 @@
// vim: set ts=2 sw=2 et tw=80:
import React, { Component } from "react";
import { Segment, Card } from "semantic-ui-react";
import { Segment, Card, Header, Icon } from "semantic-ui-react";
import Device from "./devices/Device";
import NewDevice from "./devices/NewDevice";
import { connect } from "react-redux";
@ -25,16 +25,31 @@ class DevicePanel extends Component {
render() {
return (
<Card.Group centered style={{ paddingTop: "3rem" }}>
{this.props.devices.map((e, i) => {
return <Device key={i} tab={this.props.tab} id={e.id} />;
})}
{!this.props.isActiveRoomHome ? (
<Card style={{ height: "27em" }}>
<Segment basic style={{ width: "100%", height: "100%" }}>
<NewDevice />
</Segment>
</Card>
) : null}
{this.props.devices.length !== 0 ? (
<React.Fragment>
{this.props.devices.map((e, i) => {
return <Device key={i} tab={this.props.tab} id={e.id} />;
})}
{!this.props.isActiveRoomHome ? (
<Card style={{ height: "27em" }}>
<Segment basic style={{ width: "100%", height: "100%" }}>
<NewDevice />
</Segment>
</Card>
) : null}
</React.Fragment>
) : (
<Segment placeholder>
<Header icon>
<Icon
name="exclamation triangle"
style={{ paddingBottom: "1rem" }}
/>
Please create a room on the left, and then add devices to the
same.
</Header>
</Segment>
)}
</Card.Group>
);
}

View file

@ -19,12 +19,17 @@ class HostsPanel extends Component {
render() {
if (this.props.isActiveDefaultHost) {
return (
<Segment placeholder style={{ paddingTop: "3rem" }}>
<Header icon>
<Icon name="folder open" />
Please select a host to visit on the left.
</Header>
</Segment>
<Card.Group centered style={{ paddingTop: "3rem" }}>
<Segment placeholder>
<Header icon>
<Icon
name="exclamation triangle"
style={{ paddingBottom: "1rem" }}
/>
Please select a host to visit on the left.
</Header>
</Segment>
</Card.Group>
);
}

View file

@ -44,7 +44,10 @@ class ScenesPanel extends Component {
) : (
<Segment placeholder>
<Header icon>
<Icon name="folder open" />
<Icon
name="exclamation triangle"
style={{ paddingBottom: "1rem" }}
/>
Please select a scene on the left or add a new one.
</Header>
</Segment>

View file

@ -116,7 +116,7 @@ export default class Signup extends Component {
<Form.Input
icon="lock"
iconPosition="left"
placeholder="Password (at least 8 characters)"
placeholder="Password (at least 6 characters)"
name="password"
type="password"
onChange={this.onChangeHandler}