Skip to content

Commit

Permalink
feat(registration): Add possibility to register hackAIR home station
Browse files Browse the repository at this point in the history
  • Loading branch information
mpfeil committed Nov 12, 2018
1 parent b9dd69e commit efa79a9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
}
},
resolve: { /* @ngInject */
boxes: function(BoxesService) {
boxes: function (BoxesService) {
return BoxesService.getBoxesFullMetadata();
},
}
Expand All @@ -144,7 +144,7 @@
}
},
resolve: { /* @ngInject */
boxes: function(BoxesService) {
boxes: function (BoxesService) {
return BoxesService.getBoxesFullMetadata();
},
}
Expand Down
9 changes: 8 additions & 1 deletion app/scripts/controllers/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
collapse2: false,
collapse3: false,
collapse4: false,
collapse5: false
collapse5: false,
collapse6: false
};

vm.markers = {};
Expand Down Expand Up @@ -480,6 +481,12 @@
return;
}

if (newValue.indexOf('hackair') === 0) {
vm.sensorSetup = vm.modelSelected.id;
vm.extensions.feinstaub.id = '';
vm.newModel.connection = null;
}

if (newValue === 'custom') {
vm.sensorSetup = '';
vm.extensions.feinstaub.id = '';
Expand Down
11 changes: 11 additions & 0 deletions app/views/account.box.register.html
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,17 @@ <h3>Sicherheit</h3>
</label>
</div>
</div>
<div uib-accordion-group class="panel-default" is-open="register.open.collapse6">
<uib-accordion-heading>
hackAIR <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': register.open.collapse6, 'glyphicon-chevron-right': !register.open.collapse6}"></i>
</uib-accordion-heading>
<div class="radio radio-success">
<input type="radio" name="model" id="hackair-home-v2" value="hackair_home_v2" ng-model="register.modelSelected.id" required>
<label for="hackair-home-v2">
hackAIR home sensor V2
</label>
</div>
</div>
<div uib-accordion-group class="panel-default" is-open="register.open.collapse3">
<uib-accordion-heading>
{{'MANUAL_CONFIGURATION'|translate}} <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': register.open.collapse3, 'glyphicon-chevron-right': !register.open.collapse3}"></i>
Expand Down

0 comments on commit efa79a9

Please sign in to comment.