Skip to content

Commit

Permalink
added checkbox for debugging and slightly restructured script page (#466
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Thiemann96 authored Mar 1, 2023
1 parent ed38ec5 commit 2d3eefe
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 18,618 deletions.
4 changes: 3 additions & 1 deletion app/scripts/controllers/account.box.edit.script.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
var vm = this;
vm.box = boxData;
vm.display_enabled = false;
vm.enable_debug = false;
vm.serialPort = 'Serial1';
vm.boxScript = '';
vm.showConfiguration = false;
Expand Down Expand Up @@ -99,7 +100,8 @@
devEUI: vm.ttn.devEUI,
appEUI: vm.ttn.appEUI,
appKey: vm.ttn.appKey,
display_enabled: vm.display_enabled
display_enabled: vm.display_enabled,
enable_debug: vm.enable_debug
})
.then(function (response) {
vm.boxScript = response;
Expand Down
1 change: 1 addition & 0 deletions app/scripts/controllers/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
bmePhenomenon: 'tempHumiPress',
};
vm.display_enabled = false;
vm.enable_debug = false;
vm.wifi = {
ssid: '',
pasword: '',
Expand Down
38 changes: 24 additions & 14 deletions app/views/account.box.edit.script.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,33 @@ <h2 style="margin-top: 0px; margin-bottom: 0px">{{'EDIT_SCRIPT'|translate}}</h2>

<div ng-if="script.showConfiguration">
<h3>{{'CONFIGURATION'|translate}}</h3>
<form class="form-inline">
<form class="form">
<!-- Firefox workaround https://github.com/sensebox/openSenseMap/issues/295-->
<input type="password" style="display:none;">
<!-- Firefox workaround end -->
<div class="form-group break" ng-if="script.box.model === 'homeV2Wifi' || script.box.model === 'homeV2WifiFeinstaub' || script.box.model === 'homeV2Lora' || script.box.model === 'homeV2Ethernet' || script.box.model === 'homeV2EthernetFeinstaub'">
<div style="text-align: left;">
<div class="checkbox checkbox-success checkbox-inline"
style="vertical-align: middle;" uib-tooltip="{{'DEBUG_ENABLED_WARNING' ||translate}}" tooltip-placement="top" tooltip-trigger="'mouseenter'">
<input type="checkbox" id="enable_debug" ng-model="script.enable_debug" ng-change="script.generateScript()">
<label for="enable_debug"> </label>
</div>
<span style="vertical-align: middle;">{{'ENABLE_DEBUG' | translate}}</span>
</div>
</div>
<div class="form-group" ng-if="script.box.model === 'homeV2Wifi' || script.box.model === 'homeV2WifiFeinstaub' || script.box.model === 'homeV2Lora'">
<div style="text-align: left;">
<div class="checkbox checkbox-success checkbox-inline"
style="vertical-align: middle;">
<input type="checkbox" id="display_enabled" ng-model="script.display_enabled" ng-change="script.generateScript()">
<label for="display_enabled"> </label>
</div>
<img
src="https://sensebox.kaufen/api/public/uploads/1524084885676-oled_top.png"
style="vertical-align: middle; height: 60px; width: 80px;" />
<span style="vertical-align: middle;">{{'DISPLAY_ENABLED' | translate}}</span>
</div>
</div>
<div class="form-group break" ng-if="script.showSerialPort">
<label for="serialport">{{'PORT'|translate}}</label>
<div class="input-group" uib-tooltip-template="'tooltip_serialports.html'" tooltip-placement="bottom"
Expand Down Expand Up @@ -63,19 +86,6 @@ <h3>{{'CONFIGURATION'|translate}}</h3>
</div>
</div>
</div>
<div class="form-group" ng-if="script.box.model === 'homeV2Wifi' || script.box.model === 'homeV2WifiFeinstaub' || script.box.model === 'homeV2Lora'">
<div style="text-align: left;">
<div class="checkbox checkbox-success checkbox-inline"
style="vertical-align: middle;">
<input type="checkbox" id="display_enabled" ng-model="script.display_enabled" ng-change="script.generateScript()">
<label for="display_enabled"> </label>
</div>
<img
src="https://sensebox.kaufen/api/public/uploads/1524084885676-oled_top.png"
style="vertical-align: middle; height: 60px; width: 80px;" />
<span style="vertical-align: middle;">{{'DISPLAY_ENABLED' | translate}}</span>
</div>
</div>
<div class="form-group break" ng-if="script.showWifiConfiguration">
<label for="ssid">WiFi SSID</label>
<div class="input-group" uib-tooltip="{{'DATA_NOT_STORED'|translate}}" tooltip-placement="top"
Expand Down
Loading

0 comments on commit 2d3eefe

Please sign in to comment.