Skip to content

Commit

Permalink
fix(TTN): TTN port optional and sketch params layout
Browse files Browse the repository at this point in the history
  • Loading branch information
felixerdy committed Apr 29, 2020
1 parent 383ccef commit b557c85
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions app/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1783,4 +1783,8 @@ nav > a.active {
.btn-toClipboard:hover {
color:#fff;
background-color: #4EAF47;
}

.break {
display: block !important;
}
16 changes: 8 additions & 8 deletions app/views/account.box.edit.script.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h3>{{'CONFIGURATION'|translate}}</h3>
<!-- Firefox workaround https://github.com/sensebox/openSenseMap/issues/295-->
<input type="password" style="display:none;">
<!-- Firefox workaround end -->
<div class="form-group" ng-if="script.showSerialPort">
<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"
tooltip-trigger="'mouseenter'">
Expand All @@ -21,7 +21,7 @@ <h3>{{'CONFIGURATION'|translate}}</h3>
</div>
</div>
</div>
<div class="form-group" ng-if="script.showSoilDigitalPort">
<div class="form-group break" ng-if="script.showSoilDigitalPort">
<label for="soilDigitalPort">{{'SOIL_MOISTURE'|translate}}<br />{{'DIGITAL_PORT'|translate}}</label>
<div class="input-group">
<select type="text" class="form-control" id="soilDigitalPort" ng-model="script.soilDigitalPort"
Expand All @@ -35,7 +35,7 @@ <h3>{{'CONFIGURATION'|translate}}</h3>
</div>
</div>
</div>
<div class="form-group" ng-if="script.showSoundMeterPort">
<div class="form-group break" ng-if="script.showSoundMeterPort">
<label for="soundMeterPort">{{'SOUND_LEVEL'|translate}}<br />{{'DIGITAL_PORT'|translate}}</label>
<div class="input-group">
<select type="text" class="form-control" id="soundMeterPort" ng-model="script.soundMeterPort"
Expand All @@ -49,7 +49,7 @@ <h3>{{'CONFIGURATION'|translate}}</h3>
</div>
</div>
</div>
<div class="form-group" ng-if="script.showWifiConfiguration">
<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"
tooltip-trigger="'mouseenter'">
Expand All @@ -60,7 +60,7 @@ <h3>{{'CONFIGURATION'|translate}}</h3>
</div>
</div>
</div>
<div class="form-group" ng-if="script.showWifiConfiguration">
<div class="form-group break" ng-if="script.showWifiConfiguration">
<label for="password">WiFi {{'ACCOUNT_PASSWORD'|translate}}</label>
<div class="input-group" uib-tooltip="{{'DATA_NOT_STORED'|translate}}" tooltip-placement="top"
tooltip-trigger="'mouseenter'">
Expand All @@ -74,7 +74,7 @@ <h3>{{'CONFIGURATION'|translate}}</h3>
</div>
</div>
</div>
<div class="form-group" ng-if="script.showTTNConfiguration">
<div class="form-group break" ng-if="script.showTTNConfiguration">
<label for="devEUI">The Things Network Device EUI</label>
<div class="input-group" uib-tooltip-template="'tooltip_ttn_keys.html'" tooltip-placement="top"
tooltip-trigger="'mouseenter'">
Expand All @@ -85,7 +85,7 @@ <h3>{{'CONFIGURATION'|translate}}</h3>
</div>
</div>
</div>
<div class="form-group" ng-if="script.showTTNConfiguration">
<div class="form-group break" ng-if="script.showTTNConfiguration">
<label for="appEUI">The Things Network Application EUI</label>
<div class="input-group" uib-tooltip-template="'tooltip_ttn_keys.html'" tooltip-placement="top"
tooltip-trigger="'mouseenter'">
Expand All @@ -98,7 +98,7 @@ <h3>{{'CONFIGURATION'|translate}}</h3>
</div>
</div>
</div>
<div class="form-group" ng-if="script.showTTNConfiguration">
<div class="form-group break" ng-if="script.showTTNConfiguration">
<label for="appKey">The Things Network Application Key</label>
<div class="input-group" uib-tooltip-template="'tooltip_ttn_keys.html'" tooltip-placement="top"
tooltip-trigger="'mouseenter'">
Expand Down
2 changes: 1 addition & 1 deletion app/views/account.box.edit.ttn.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h2 style="margin-top: 0px; margin-bottom: 0px">{{'EDIT_TTN'|translate}} - TTN</
</div>
<!-- TTN Port -->
<div class="form-group">
<label class="control-label">{{ 'TTN_PORT' | translate }}</label>
<label class="control-label">{{ 'TTN_PORT' | translate }} (optional)</label>
<input type="number" name="ttn_decodeoptions" class="form-control monospace" ng-model="ttn.settings.port" min="1" max="65535">
</div>
<div uib-alert class="alert-danger" ng-hide="ttn.validTTNconfig">{{ 'TTN_INVALID_DECODEOPTS' | translate }}</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/account.box.register.html
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ <h1><small>{{ 'STEP2_SUB4' | translate }}</small></h1>
</div>
<!-- TTN Port -->
<div class="form-group">
<label class="control-label">{{ 'TTN_PORT' | translate }}</label>
<label class="control-label">{{ 'TTN_PORT' | translate }} (optional)</label>
<input type="number" name="ttn_decodeoptions" class="form-control monospace"
ng-model="register.ttn.port" min="1" max="65535">
</div>
Expand Down

0 comments on commit b557c85

Please sign in to comment.