fixed another duplication
This commit is contained in:
parent
746e00baa7
commit
9c89a2ea99
2 changed files with 1 additions and 83 deletions
|
@ -1,82 +0,0 @@
|
|||
import { Dropdown } from "semantic-ui-react";
|
||||
import React, { Component } from "react";
|
||||
|
||||
export default class FilterDevices extends Component {
|
||||
render() {
|
||||
const tagOptions = [
|
||||
{
|
||||
key: "regularLight",
|
||||
text: "regularLight",
|
||||
value: "regularLight",
|
||||
label: { color: "red", empty: true, circular: true },
|
||||
},
|
||||
{
|
||||
key: "dimmableLight",
|
||||
text: "dimmableLight",
|
||||
value: "dimmableLight",
|
||||
label: { color: "blue", empty: true, circular: true },
|
||||
},
|
||||
{
|
||||
key: "buttonDimmer",
|
||||
text: "buttonDimmer",
|
||||
value: "buttonDimmer",
|
||||
label: { color: "black", empty: true, circular: true },
|
||||
},
|
||||
{
|
||||
key: "knobDimmer",
|
||||
text: "knobDimmer",
|
||||
value: "knobDimmer",
|
||||
label: { color: "purple", empty: true, circular: true },
|
||||
},
|
||||
{
|
||||
key: "motionSensor",
|
||||
text: "motionSensor",
|
||||
value: "motionSensor",
|
||||
label: { color: "orange", empty: true, circular: true },
|
||||
},
|
||||
{
|
||||
key: "sensor",
|
||||
text: "sensor",
|
||||
value: "sensor",
|
||||
label: { empty: true, circular: true },
|
||||
},
|
||||
{
|
||||
key: "smartPlug",
|
||||
text: "smartPlug",
|
||||
value: "smartPlug",
|
||||
label: { color: "pink", empty: true, circular: true },
|
||||
},
|
||||
{
|
||||
key: "switch",
|
||||
text: "switch",
|
||||
value: "switch",
|
||||
label: { color: "green", empty: true, circular: true },
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
text="Filter Devices"
|
||||
icon="filter"
|
||||
floating
|
||||
labeled
|
||||
button
|
||||
className="icon"
|
||||
>
|
||||
<Dropdown.Menu>
|
||||
<Dropdown.Divider />
|
||||
<Dropdown.Header icon="tags" content="Tag Device" />
|
||||
<Dropdown.Menu scrolling>
|
||||
{tagOptions.map((option) => (
|
||||
<Dropdown.Item
|
||||
key={option.value}
|
||||
{...option}
|
||||
onClick={this.props.filterDevices}
|
||||
/>
|
||||
))}
|
||||
</Dropdown.Menu>
|
||||
</Dropdown.Menu>
|
||||
</Dropdown>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -431,7 +431,7 @@ class AutomationSaveModal extends Component {
|
|||
automation.id = this.props.id;
|
||||
automation.triggers = [];
|
||||
automation.scenes = [];
|
||||
|
||||
automation.conditions = [];
|
||||
for (let i = 0; i < this.state.order.length; i++) {
|
||||
automation.scenes.push({
|
||||
priority: i,
|
||||
|
|
Loading…
Reference in a new issue