upgrade to the latest ember + fix bug for the power button
This commit is contained in:
parent
f0d2dfb38b
commit
e3c74b0e60
7 changed files with 31 additions and 34 deletions
|
|
@ -45,8 +45,6 @@ export default Em.Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
// TODO figure out how to convert this
|
|
||||||
//this.xyToRgb(0.5,0.5);
|
|
||||||
Em.$(document).click((event)=>{
|
Em.$(document).click((event)=>{
|
||||||
if(this.get('colorPickerDisplayed') && !event.target.classList.contains('color') && !Em.$(event.target).closest('.colorpicker, #colorRow').length) {
|
if(this.get('colorPickerDisplayed') && !event.target.classList.contains('color') && !Em.$(event.target).closest('.colorpicker, #colorRow').length) {
|
||||||
this.toggleProperty('colorPickerDisplayed');
|
this.toggleProperty('colorPickerDisplayed');
|
||||||
|
|
@ -112,18 +110,18 @@ export default Em.Component.extend({
|
||||||
}
|
}
|
||||||
}.observes('colorLoopOn'),
|
}.observes('colorLoopOn'),
|
||||||
|
|
||||||
|
lightsOn: false,
|
||||||
|
|
||||||
// determines whether the lights are on/off for the lights switch
|
// determines whether the lights are on/off for the lights switch
|
||||||
lightsOn: function(){
|
lightsOnCHange: function(){
|
||||||
var lightsData = this.get('lightsData');
|
if(!this.get('strobeOn')){
|
||||||
|
var lightsData = this.get('lightsData'), lightsOn = this.get('activeLights').some(function(light) {
|
||||||
|
return lightsData[light].state.on === true;
|
||||||
|
});
|
||||||
|
|
||||||
if(this.get('strobeOn')){
|
this.set('lightsOn', lightsOn);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
}.observes('lightsData.@each.state.on', 'activeLights.[]'),
|
||||||
return this.get('activeLights').some(function(light) {
|
|
||||||
return lightsData[light].state.on === true;
|
|
||||||
});
|
|
||||||
}.property('lightsData.@each.state.on', 'activeLights.[]', 'strobeOn'),
|
|
||||||
|
|
||||||
// determines the average brightness of the hue system for the brightness slider
|
// determines the average brightness of the hue system for the brightness slider
|
||||||
lightsBrightness: function(){
|
lightsBrightness: function(){
|
||||||
|
|
@ -157,8 +155,6 @@ export default Em.Component.extend({
|
||||||
}
|
}
|
||||||
}.observes('lightsOn'),
|
}.observes('lightsOn'),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onBrightnessChanged: function(){
|
onBrightnessChanged: function(){
|
||||||
var lightsData = this.get('lightsData'), lightsBrightnessSystem = false, lightsBrightness = this.get('lightsBrightness'), activeLights = this.get('activeLights'), self = this;
|
var lightsData = this.get('lightsData'), lightsBrightnessSystem = false, lightsBrightness = this.get('lightsBrightness'), activeLights = this.get('activeLights'), self = this;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
"name": "huegasm",
|
"name": "huegasm",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap-sass": "~3.3.5",
|
"bootstrap-sass": "~3.3.5",
|
||||||
"ember": "~2.3.1",
|
"ember": "~2.4.1",
|
||||||
"ember-cli-shims": "0.1.0",
|
"ember-cli-shims": "0.1.0",
|
||||||
"ember-cli-test-loader": "0.2.1",
|
"ember-cli-test-loader": "0.2.2",
|
||||||
"ember-load-initializers": "0.5.1",
|
"ember-load-initializers": "0.5.1",
|
||||||
"ember-qunit-notifications": "0.1.0",
|
"ember-qunit-notifications": "0.1.0",
|
||||||
"hammerjs": "~2.0.4",
|
"hammerjs": "~2.0.4",
|
||||||
|
|
|
||||||
10
package.json
10
package.json
|
|
@ -21,7 +21,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"broccoli-asset-rev": "^2.2.0",
|
"broccoli-asset-rev": "^2.2.0",
|
||||||
"ember-ajax": "0.7.1",
|
"ember-ajax": "0.7.1",
|
||||||
"ember-cli": "^2.3.0",
|
"ember-cli": "^2.4.2",
|
||||||
"ember-cli-app-version": "^1.0.0",
|
"ember-cli-app-version": "^1.0.0",
|
||||||
"ember-cli-babel": "^5.1.5",
|
"ember-cli-babel": "^5.1.5",
|
||||||
"ember-cli-dependency-checker": "^1.2.0",
|
"ember-cli-dependency-checker": "^1.2.0",
|
||||||
|
|
@ -32,16 +32,16 @@
|
||||||
"ember-cli-qunit": "^1.2.1",
|
"ember-cli-qunit": "^1.2.1",
|
||||||
"ember-cli-release": "0.2.8",
|
"ember-cli-release": "0.2.8",
|
||||||
"ember-cli-sass": "5.2.1",
|
"ember-cli-sass": "5.2.1",
|
||||||
"ember-cli-sri": "^2.0.0",
|
"ember-cli-sri": "^2.1.0",
|
||||||
"ember-cli-uglify": "^1.2.0",
|
"ember-cli-uglify": "^1.2.0",
|
||||||
"ember-cli-windows-addon": "^1.2.2",
|
"ember-cli-windows-addon": "^1.2.2",
|
||||||
"ember-data": "^2.3.0",
|
"ember-data": "^2.4.0",
|
||||||
"ember-disable-proxy-controllers": "^1.0.1",
|
"ember-disable-proxy-controllers": "^1.0.1",
|
||||||
"ember-export-application-global": "^1.0.4",
|
"ember-export-application-global": "^1.0.4",
|
||||||
"ember-load-initializers": "^0.5.0",
|
"ember-load-initializers": "^0.5.0",
|
||||||
"ember-modal-dialog": "0.8.3",
|
"ember-modal-dialog": "0.8.3",
|
||||||
"ember-notify": "^4.0.1",
|
"ember-notify": "^5.0.2",
|
||||||
"ember-paper": "^0.2.11",
|
"ember-paper": "^0.2.12",
|
||||||
"ember-resolver": "^2.0.3",
|
"ember-resolver": "^2.0.3",
|
||||||
"ember-truth-helpers": "1.2.0",
|
"ember-truth-helpers": "1.2.0",
|
||||||
"loader.js": "^4.0.0"
|
"loader.js": "^4.0.0"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
/*jshint node:true*/
|
||||||
|
module.exports = {
|
||||||
"framework": "qunit",
|
"framework": "qunit",
|
||||||
"test_page": "tests/index.html?hidepassed",
|
"test_page": "tests/index.html?hidepassed",
|
||||||
"disable_watching": true,
|
"disable_watching": true,
|
||||||
|
|
@ -9,4 +10,4 @@
|
||||||
"PhantomJS",
|
"PhantomJS",
|
||||||
"Chrome"
|
"Chrome"
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
|
|
@ -13,11 +13,11 @@ export default function(name, options = {}) {
|
||||||
},
|
},
|
||||||
|
|
||||||
afterEach() {
|
afterEach() {
|
||||||
destroyApp(this.application);
|
|
||||||
|
|
||||||
if (options.afterEach) {
|
if (options.afterEach) {
|
||||||
options.afterEach.apply(this, arguments);
|
options.afterEach.apply(this, arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
destroyApp(this.application);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import Resolver from 'ember/resolver';
|
import Resolver from '../../resolver';
|
||||||
import config from '../../config/environment';
|
import config from '../../config/environment';
|
||||||
|
|
||||||
const resolver = Resolver.create();
|
const resolver = Resolver.create();
|
||||||
|
|
|
||||||
|
|
@ -7,28 +7,28 @@
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
{{content-for 'head'}}
|
{{content-for "head"}}
|
||||||
{{content-for 'test-head'}}
|
{{content-for "test-head"}}
|
||||||
|
|
||||||
<link rel="stylesheet" href="assets/vendor.css">
|
<link rel="stylesheet" href="assets/vendor.css">
|
||||||
<link rel="stylesheet" href="assets/huegasm.css">
|
<link rel="stylesheet" href="assets/huegasm.css">
|
||||||
<link rel="stylesheet" href="assets/test-support.css">
|
<link rel="stylesheet" href="assets/test-support.css">
|
||||||
|
|
||||||
{{content-for 'head-footer'}}
|
{{content-for "head-footer"}}
|
||||||
{{content-for 'test-head-footer'}}
|
{{content-for "test-head-footer"}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{content-for 'body'}}
|
{{content-for "body"}}
|
||||||
{{content-for 'test-body'}}
|
{{content-for "test-body"}}
|
||||||
|
|
||||||
|
<script src="testem.js" integrity=""></script>
|
||||||
<script src="assets/vendor.js"></script>
|
<script src="assets/vendor.js"></script>
|
||||||
<script src="assets/test-support.js"></script>
|
<script src="assets/test-support.js"></script>
|
||||||
<script src="assets/huegasm.js"></script>
|
<script src="assets/huegasm.js"></script>
|
||||||
<script src="testem.js" integrity=""></script>
|
|
||||||
<script src="assets/tests.js"></script>
|
<script src="assets/tests.js"></script>
|
||||||
<script src="assets/test-loader.js"></script>
|
<script src="assets/test-loader.js"></script>
|
||||||
|
|
||||||
{{content-for 'body-footer'}}
|
{{content-for "body-footer"}}
|
||||||
{{content-for 'test-body-footer'}}
|
{{content-for "test-body-footer"}}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Reference in a new issue