bug fixes for days
This commit is contained in:
parent
48a2bc7a80
commit
8980ac3925
5 changed files with 10 additions and 18 deletions
|
|
@ -198,7 +198,8 @@ export default Em.Component.extend({
|
|||
|
||||
if(!this.get('trial')) {
|
||||
this.doUpdateGroupsData();
|
||||
this.set('lightsDataIntervalHandle', setInterval(this.updateLightData.bind(this), 1000));
|
||||
this.updateLightData();
|
||||
this.set('lightsDataIntervalHandle', setInterval(this.updateLightData.bind(this), 2000));
|
||||
}
|
||||
|
||||
if (!Em.isNone(this.get('storage').get('huegasm.selectedTab'))) {
|
||||
|
|
@ -208,17 +209,14 @@ export default Em.Component.extend({
|
|||
|
||||
onUpdateGroupsDataChange: function(){
|
||||
if(this.get('updateGroupsData')){
|
||||
var self = this;
|
||||
setTimeout(function(){ self.doUpdateGroupsData(); }, 1000);
|
||||
setTimeout(()=>{ this.doUpdateGroupsData(); }, 1000);
|
||||
}
|
||||
}.observes('updateGroupsData'),
|
||||
|
||||
doUpdateGroupsData(){
|
||||
var self = this;
|
||||
|
||||
Em.$.get(this.get('apiURL') + '/groups', function (result, status) {
|
||||
Em.$.get(this.get('apiURL') + '/groups', (result, status)=>{
|
||||
if (status === 'success' ) {
|
||||
self.set('groupsData', result);
|
||||
this.set('groupsData', result);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export default Em.Component.extend({
|
|||
|
||||
actions: {
|
||||
clickLight(id, data){
|
||||
var light = Em.$(event.target);
|
||||
var light = Em.$('.light'+id);
|
||||
|
||||
if(!light.hasClass('bootstrapTooltip')){
|
||||
light = light.parent();
|
||||
|
|
@ -68,7 +68,7 @@ export default Em.Component.extend({
|
|||
if(!this.get('isHovering')){
|
||||
var lightsData = this.get('lightsData'), lightsList = Em.A(), type;
|
||||
for (var key in lightsData) {
|
||||
if (lightsData.hasOwnProperty(key)) {
|
||||
if (lightsData.hasOwnProperty(key) && lightsData[key].state.reachable) {
|
||||
switch(lightsData[key].modelid){
|
||||
case 'LCT001':
|
||||
type = 'a19';
|
||||
|
|
@ -114,8 +114,6 @@ export default Em.Component.extend({
|
|||
|
||||
if(!this.get('activeLights').contains(key)){
|
||||
activeClass = 'lightInactive';
|
||||
} else if(!lightsData[key].state.reachable){
|
||||
activeClass = 'lightUnreachable';
|
||||
}
|
||||
|
||||
lightsList.push({type: type, name: lightsData[key].name, id: key, data: lightsData[key], activeClass: activeClass});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{#each lightsList as |light|}}
|
||||
<div class="{{light.activeClass}} bootstrapTooltip" data-toggle="tooltip" data-placement="top auto" data-title={{light.name}} {{action "clickLight" light.id light.data}} {{action "lightStartHover" light.id on="mouseEnter"}} {{action "lightStopHover" light.id on="mouseLeave"}}>
|
||||
<div class="{{light.activeClass}} bootstrapTooltip light{{light.id}}" data-toggle="tooltip" data-placement="top auto" data-title={{light.name}} {{action "clickLight" light.id light.data}} {{action "lightStartHover" light.id on="mouseEnter"}} {{action "lightStopHover" light.id on="mouseLeave"}}>
|
||||
<img class="hueLight" width="40" src="assets/images/lights/{{light.type}}{{if dimmerOn "w"}}.svg">
|
||||
</div>
|
||||
{{/each}}
|
||||
|
|
@ -66,7 +66,6 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
|
|||
if(resultObj instanceof Array){
|
||||
resultObj.forEach(processResult);
|
||||
} else {
|
||||
|
||||
processResult(resultObj);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ body {
|
|||
#introPic {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
.introParagraph {
|
||||
|
|
@ -337,10 +339,6 @@ md-slider.md-default-theme .md-thumb:after {
|
|||
}
|
||||
}
|
||||
|
||||
.lightUnreachable {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.lightActive {
|
||||
cursor: pointer;
|
||||
|
||||
|
|
@ -900,7 +898,6 @@ body.dimmerOn {
|
|||
}
|
||||
svg {
|
||||
-webkit-filter: drop-shadow(0 0 5px #228DFF);
|
||||
filter: drop-shadow(0 0 5px #228DFF);
|
||||
}
|
||||
md-input-container {
|
||||
label {
|
||||
|
|
|
|||
Reference in a new issue