Skip to content

Commit

Permalink
feat(registration): show sensors regardless of the selected hardware (#…
Browse files Browse the repository at this point in the history
…444)

Show sensors regardless of the selected hardware and not only on custom configured devices.

closes #374
  • Loading branch information
mpfeil authored Sep 14, 2022
1 parent 6a28baf commit 681ac68
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
29 changes: 29 additions & 0 deletions app/scripts/controllers/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,35 @@
vm.sensorSetup = '';
vm.extensions.feinstaub.id = '';
vm.newModel.connection = null;
vm.newModel.sensors = {
temp: false,
pressure: false,
light: false,
pollution: false,
bme680: false,
co2: false,
};
vm.modelSelected.name = 'Custom';

vm.invalidHardware = false;

return;
}

if (newValue === 'edu') {
vm.sensorSetup = '';
vm.sensors = [];
vm.extensions.feinstaub.id = '';
vm.newModel.connection = null;
vm.newModel.sensors = {
temp: false,
pressure: false,
light: false,
pollution: false,
bme680: false,
co2: false,
};
vm.modelSelected.name = 'senseBox Edu';

vm.invalidHardware = false;

Expand Down
8 changes: 4 additions & 4 deletions app/views/account.box.register.html
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ <h1><small>{{ 'STEP2_SUB4' | translate }}</small></h1>
</div>
<div uib-alert ng-repeat="alert in register.alerts" ng-class="'alert-' + (alert.type)">{{alert.msg}}</div>

<h3>senseBox</h3>
<h3>senseBox</h3> <!-- TODO: Later {{'DEVICE'|translate}} -->
<div class="well">
<table class="table table-striped table-bordered">
<tbody>
Expand All @@ -1423,13 +1423,13 @@ <h3>senseBox</h3>
<td style="width: 50%;"><strong>{{register.newModel.connection}}</strong></td>
</tr>
<tr ng-hide="register.isSenseBoxModel() === 'homeV2' || register.isSenseBoxModel() ===''">
<td style="width: 50%;">senseBox {{'EDIT_EXTENSIONS'|translate}}</td>
<td style="width: 50%;">{{'EDIT_EXTENSIONS'|translate}}</td>
<td style="width: 50%;"><strong
ng-if="register.extensions.feinstaub.id !== ''">{{'EXTENSIONS_FINE_PARTICULATE_MATTER'|translate}}</strong>
</td>
</tr>
<tr>
<td style="width: 50%;">senseBox Name</td>
<td style="width: 50%;">Name</td>
<td style="width: 50%;"><strong>{{register.newSenseBox.name}}</strong></td>
</tr>
<tr>
Expand All @@ -1443,7 +1443,7 @@ <h3>senseBox</h3>
</tbody>
</table>
</div>
<div ng-show="register.modelSelected.id == 'custom'">
<div>
<h3>{{'SENSORS' | translate}}</h3>
<div class="well">
<ul>
Expand Down

0 comments on commit 681ac68

Please sign in to comment.