diff --git a/res/app/components/stf/control/control-service.js b/res/app/components/stf/control/control-service.js index 471dd8df..b004941e 100644 --- a/res/app/components/stf/control/control-service.js +++ b/res/app/components/stf/control/control-service.js @@ -157,9 +157,10 @@ module.exports = function ControlServiceFactory( return sendTwoWay('device.reboot') } - this.rotate = function(rotation) { + this.rotate = function(rotation, lock) { return sendOneWay('display.rotate', { - rotation: rotation + rotation: rotation, + lock: lock }) } diff --git a/res/app/control-panes/automation/device-settings/device-settings.jade b/res/app/control-panes/automation/device-settings/device-settings.jade index 68230116..4f2b33fa 100644 --- a/res/app/control-panes/automation/device-settings/device-settings.jade +++ b/res/app/control-panes/automation/device-settings/device-settings.jade @@ -3,21 +3,28 @@ stacked-icon(icon='fa-gears', color='color-darkgray') span(translate) Device Settings .widget-content.padded + .row + .col-md-6 + h6(translate) Manner Mode + .btn-group + label.btn.btn-sm.btn-primary-outline(ng-model='ringerMode', btn-radio='"SILENT"') + i.fa.fa-volume-off.fa-fw(tooltip='{{"Silent Mode" | translate}}') + label.btn.btn-sm.btn-primary-outline(ng-model='ringerMode', btn-radio='"VIBRATE"') + i.fa.fa-mobile.fa-fw(tooltip='{{"Vibrate Mode" | translate}}') + label.btn.btn-sm.btn-primary-outline(ng-model='ringerMode', btn-radio='"NORMAL"') + i.fa.fa-volume-up.fa-fw(tooltip='{{"Normal Mode" | translate}}') - div - h6(translate) WiFi + .col-md-6 + h6(translate) WiFi + button.btn.btn-sm.btn-primary-outline(ng-click='toggleWifi()', + ng-model='wifiEnabled', btn-checkbox) + i.fa.fa-wifi.fa-fw(ng-show='wifiEnabled', tooltip='{{"Disable WiFi" | translate}}') + i.fa.fa-wifi.fa-fw(ng-hide='wifiEnabled', tooltip='{{"Enable WiFi" | translate}}') + //.row + .col-md-12 + h6(translate) Lock Rotation - button.btn.btn-sm.btn-primary-outline(ng-click='toggleWifi()', - ng-model='wifiEnabled', btn-checkbox) - i.fa.fa-wifi.fa-fw(ng-show='wifiEnabled', tooltip='{{"Disable WiFi" | translate}}') - i.fa.fa-wifi.fa-fw(ng-hide='wifiEnabled', tooltip='{{"Enable WiFi" | translate}}') - - div - h6(translate) Manner Mode - .btn-group - label.btn.btn-sm.btn-primary-outline(ng-model='ringerMode', btn-radio='"SILENT"') - i.fa.fa-volume-off.fa-fw(tooltip='{{"Silent Mode" | translate}}') - label.btn.btn-sm.btn-primary-outline(ng-model='ringerMode', btn-radio='"VIBRATE"') - i.fa.fa-mobile.fa-fw(tooltip='{{"Vibrate Mode" | translate}}') - label.btn.btn-sm.btn-primary-outline(ng-model='ringerMode', btn-radio='"NORMAL"') - i.fa.fa-volume-up.fa-fw(tooltip='{{"Normal Mode" | translate}}') + button.btn.btn-sm.btn-primary-outline(ng-click='toggleLockRotation()', + ng-model='lockRotation', btn-checkbox) + i.fa.fa-repeat.fa-fw(ng-show='lockRotation', tooltip='{{"Unlock Rotation" | translate}}') + i.fa.fa-repeat.fa-fw(ng-hide='lockRotation', tooltip='{{"Lock Rotation" | translate}}')