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