small changes
This commit is contained in:
parent
a097ee447c
commit
1d4945a6a2
5 changed files with 55 additions and 19 deletions
22
smart-hut/package-lock.json
generated
22
smart-hut/package-lock.json
generated
|
@ -10922,6 +10922,11 @@
|
||||||
"scheduler": "^0.18.0"
|
"scheduler": "^0.18.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"react-dom-factories": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-dom-factories/-/react-dom-factories-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-63cFxNs2+1AbOqOP91lhaqD/luA="
|
||||||
|
},
|
||||||
"react-error-overlay": {
|
"react-error-overlay": {
|
||||||
"version": "6.0.6",
|
"version": "6.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.6.tgz",
|
||||||
|
@ -10932,6 +10937,23 @@
|
||||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz",
|
||||||
"integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q=="
|
"integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q=="
|
||||||
},
|
},
|
||||||
|
"react-modal": {
|
||||||
|
"version": "2.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-modal/-/react-modal-2.2.2.tgz",
|
||||||
|
"integrity": "sha512-tdgyEyfbyfzDUj40XtWldAQe7e+yhJDUtVSlsQ9AQCGifzWck6v1XTtIVGViVftOsEA3cBWCZCjF3rq6FPJzMg==",
|
||||||
|
"requires": {
|
||||||
|
"exenv": "1.2.0",
|
||||||
|
"prop-types": "^15.5.10",
|
||||||
|
"react-dom-factories": "^1.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"exenv": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.0.tgz",
|
||||||
|
"integrity": "sha1-ODXxJ6vwdb/ggtCu1EhAV8eOPIk="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"react-popper": {
|
"react-popper": {
|
||||||
"version": "1.3.7",
|
"version": "1.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.7.tgz",
|
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.7.tgz",
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
"react-circular-slider-svg": "^0.1.5",
|
"react-circular-slider-svg": "^0.1.5",
|
||||||
"react-device-detect": "^1.11.14",
|
"react-device-detect": "^1.11.14",
|
||||||
"react-dom": "^16.12.0",
|
"react-dom": "^16.12.0",
|
||||||
"react-modal": "2.2.2",
|
"react-modal": "^2.2.2",
|
||||||
"react-redux": "^7.2.0",
|
"react-redux": "^7.2.0",
|
||||||
"react-round-slider": "^1.0.1",
|
"react-round-slider": "^1.0.1",
|
||||||
"react-router": "^5.1.2",
|
"react-router": "^5.1.2",
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
* Lights have an internal state that can be changed and it must
|
* Lights have an internal state that can be changed and it must
|
||||||
* be shown accordingly in the SmartHut views (house view and room views).
|
* be shown accordingly in the SmartHut views (house view and room views).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import {
|
import {
|
||||||
iconStyle,
|
iconStyle,
|
||||||
|
|
|
@ -112,8 +112,20 @@ class NewDevice extends Component {
|
||||||
if (this.state.deviceName === "") {
|
if (this.state.deviceName === "") {
|
||||||
data.name = defaultNames[this.state.typeOfDevice];
|
data.name = defaultNames[this.state.typeOfDevice];
|
||||||
}
|
}
|
||||||
|
console.log("-------------------------");
|
||||||
|
console.log(this.state.typeOfDevice);
|
||||||
|
|
||||||
switch (this.state.typeOfDevice) {
|
switch (this.state.typeOfDevice) {
|
||||||
|
//trying to make securityCamera work
|
||||||
|
case "securityCamera":
|
||||||
|
// data.path="/security_camera_videos/security_camera_1.mp4";
|
||||||
|
// data.on=false;
|
||||||
|
break;
|
||||||
|
//trying to make thermostat work
|
||||||
|
case "thermostat":
|
||||||
|
data.targetTemperature=0;
|
||||||
|
data.measuredTemperuature=0;
|
||||||
|
break;
|
||||||
case "dimmableLight":
|
case "dimmableLight":
|
||||||
data.intensity = 0;
|
data.intensity = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -145,6 +157,20 @@ class NewDevice extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const deviceOptions = [
|
const deviceOptions = [
|
||||||
|
//stuff
|
||||||
|
{key:"securityCamera",
|
||||||
|
text:"SecurityCamera",
|
||||||
|
value:"securityCamera",
|
||||||
|
image:{}},
|
||||||
|
{key:"thermostat",
|
||||||
|
text:"Thermostat",
|
||||||
|
value:"thermostat",
|
||||||
|
image:{}},
|
||||||
|
{key:"curtains",
|
||||||
|
text:"Curtain",
|
||||||
|
value:"curtains",
|
||||||
|
image:{}},
|
||||||
|
//stuff ends
|
||||||
{
|
{
|
||||||
key: "light",
|
key: "light",
|
||||||
text: "Normal Light",
|
text: "Normal Light",
|
||||||
|
|
|
@ -4243,12 +4243,7 @@ execa@^1.0.0:
|
||||||
signal-exit "^3.0.0"
|
signal-exit "^3.0.0"
|
||||||
strip-eof "^1.0.0"
|
strip-eof "^1.0.0"
|
||||||
|
|
||||||
exenv@1.2.0:
|
exenv@^1.2.0, exenv@^1.2.2:
|
||||||
version "1.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.0.tgz#3835f127abf075bfe082d0aed4484057c78e3c89"
|
|
||||||
integrity sha1-ODXxJ6vwdb/ggtCu1EhAV8eOPIk=
|
|
||||||
|
|
||||||
exenv@^1.2.2:
|
|
||||||
version "1.2.2"
|
version "1.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
|
resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
|
||||||
integrity sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=
|
integrity sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=
|
||||||
|
@ -8741,11 +8736,6 @@ react-device-detect@^1.11.14:
|
||||||
dependencies:
|
dependencies:
|
||||||
ua-parser-js "^0.7.20"
|
ua-parser-js "^0.7.20"
|
||||||
|
|
||||||
react-dom-factories@^1.0.0:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/react-dom-factories/-/react-dom-factories-1.0.2.tgz#eb7705c4db36fb501b3aa38ff759616aa0ff96e0"
|
|
||||||
integrity sha1-63cFxNs2+1AbOqOP91lhaqD/luA=
|
|
||||||
|
|
||||||
react-dom@^16.12.0:
|
react-dom@^16.12.0:
|
||||||
version "16.12.0"
|
version "16.12.0"
|
||||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.12.0.tgz#0da4b714b8d13c2038c9396b54a92baea633fe11"
|
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.12.0.tgz#0da4b714b8d13c2038c9396b54a92baea633fe11"
|
||||||
|
@ -8776,14 +8766,13 @@ react-is@^16.9.0:
|
||||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
||||||
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
|
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
|
||||||
|
|
||||||
react-modal@2.2.2:
|
react-modal@^2.2.2:
|
||||||
version "2.2.2"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-2.2.2.tgz#4bbf98bc506e61c446c9f57329c7a488ea7d504b"
|
resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-2.4.1.tgz#cb09b26711b148eb9f59cb180e1b7d82980ded05"
|
||||||
integrity sha512-tdgyEyfbyfzDUj40XtWldAQe7e+yhJDUtVSlsQ9AQCGifzWck6v1XTtIVGViVftOsEA3cBWCZCjF3rq6FPJzMg==
|
integrity sha512-3WQCn3xqkbEUvxRUO3nkeqxMNgt1F4CyEU3BiUIrg7C71tnqjQIuSE7+JXp85yFl8X1iRTJouySNpwNqv4kiWg==
|
||||||
dependencies:
|
dependencies:
|
||||||
exenv "1.2.0"
|
exenv "^1.2.0"
|
||||||
prop-types "^15.5.10"
|
prop-types "^15.5.10"
|
||||||
react-dom-factories "^1.0.0"
|
|
||||||
|
|
||||||
react-popper@^1.3.4:
|
react-popper@^1.3.4:
|
||||||
version "1.3.7"
|
version "1.3.7"
|
||||||
|
|
Loading…
Reference in a new issue